blob: 0c06e9a47f9fac2bf39f11cad888f616465db39b [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_
12#define MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
philipel9d3ab612015-12-21 04:12:39 -080014namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000015
16#define MASK_32_BITS(x) (0xFFFFFFFF & (x))
17
philipel9d3ab612015-12-21 04:12:39 -080018inline uint32_t MaskWord64ToUWord32(int64_t w64) {
19 return static_cast<uint32_t>(MASK_32_BITS(w64));
niklase@google.com470e71d2011-07-07 08:21:25 +000020}
21
stefan@webrtc.orgeb658602011-10-28 12:25:34 +000022#define VCM_MAX(a, b) (((a) > (b)) ? (a) : (b))
23#define VCM_MIN(a, b) (((a) < (b)) ? (a) : (b))
niklase@google.com470e71d2011-07-07 08:21:25 +000024
25#define VCM_DEFAULT_CODEC_WIDTH 352
26#define VCM_DEFAULT_CODEC_HEIGHT 288
27#define VCM_DEFAULT_FRAME_RATE 30
28#define VCM_MIN_BITRATE 30
mikhal@webrtc.org425b3772011-11-22 23:41:29 +000029#define VCM_FLUSH_INDICATOR 4
niklase@google.com470e71d2011-07-07 08:21:25 +000030
niklase@google.com470e71d2011-07-07 08:21:25 +000031#define VCM_NO_RECEIVER_ID 0
32
philipel9d3ab612015-12-21 04:12:39 -080033inline int32_t VCMId(const int32_t vcmId, const int32_t receiverId = 0) {
34 return static_cast<int32_t>((vcmId << 16) + receiverId);
niklase@google.com470e71d2011-07-07 08:21:25 +000035}
36
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000037} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000038
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020039#endif // MODULES_VIDEO_CODING_INTERNAL_DEFINES_H_