niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Henrik Kjellander | 2557b86 | 2015-11-18 22:00:21 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
pbos@webrtc.org | a440732 | 2013-07-16 12:32:05 +0000 | [diff] [blame] | 14 | #include "webrtc/typedefs.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 15 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 16 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 17 | |
| 18 | #define MASK_32_BITS(x) (0xFFFFFFFF & (x)) |
| 19 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 20 | inline uint32_t MaskWord64ToUWord32(int64_t w64) { |
| 21 | return static_cast<uint32_t>(MASK_32_BITS(w64)); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 22 | } |
| 23 | |
stefan@webrtc.org | eb65860 | 2011-10-28 12:25:34 +0000 | [diff] [blame] | 24 | #define VCM_MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| 25 | #define VCM_MIN(a, b) (((a) < (b)) ? (a) : (b)) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
| 27 | #define VCM_DEFAULT_CODEC_WIDTH 352 |
| 28 | #define VCM_DEFAULT_CODEC_HEIGHT 288 |
| 29 | #define VCM_DEFAULT_FRAME_RATE 30 |
| 30 | #define VCM_MIN_BITRATE 30 |
mikhal@webrtc.org | 425b377 | 2011-11-22 23:41:29 +0000 | [diff] [blame] | 31 | #define VCM_FLUSH_INDICATOR 4 |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 32 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | #define VCM_NO_RECEIVER_ID 0 |
| 34 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 35 | inline int32_t VCMId(const int32_t vcmId, const int32_t receiverId = 0) { |
| 36 | return static_cast<int32_t>((vcmId << 16) + receiverId); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | } |
| 38 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 39 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 40 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 41 | #endif // WEBRTC_MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_ |