aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h
blob: c2cefdd94e788d45b56b2ab3fc0e0038a4b75c04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_COMMON_TYPES_H_
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_COMMON_TYPES_H_

#include "webrtc/common_types.h"

namespace webrtc {

// Ratio allocation between temporal streams:
// Values as required for the VP8 codec (accumulating).
static const float
    kVp8LayerRateAlloction[kMaxTemporalStreams][kMaxTemporalStreams] = {
      {1.0f, 1.0f, 1.0f, 1.0f},  // 1 layer
      {0.6f, 1.0f, 1.0f, 1.0f},  // 2 layers {60%, 40%}
      {0.4f, 0.6f, 1.0f, 1.0f},  // 3 layers {40%, 20%, 40%}
      {0.25f, 0.4f, 0.6f, 1.0f}  // 4 layers {25%, 15%, 20%, 40%}
};

}  // namespace webrtc
#endif  // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_COMMON_TYPES_H_