OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... | |
34 static const int kFramedropPercentThreshold = 60; | 34 static const int kFramedropPercentThreshold = 60; |
35 // QP scaling threshold defaults: | 35 // QP scaling threshold defaults: |
36 static const int kLowH264QpThreshold = 24; | 36 static const int kLowH264QpThreshold = 24; |
37 static const int kHighH264QpThreshold = 37; | 37 static const int kHighH264QpThreshold = 37; |
38 // QP is obtained from VP8-bitstream for HW, so the QP corresponds to the | 38 // QP is obtained from VP8-bitstream for HW, so the QP corresponds to the |
39 // bitstream range of [0, 127] and not the user-level range of [0,63]. | 39 // bitstream range of [0, 127] and not the user-level range of [0,63]. |
40 static const int kLowVp8QpThreshold = 29; | 40 static const int kLowVp8QpThreshold = 29; |
41 static const int kHighVp8QpThreshold = 95; | 41 static const int kHighVp8QpThreshold = 95; |
42 // QP is obtained from VP9-bitstream for HW, so the QP corresponds to the | 42 // QP is obtained from VP9-bitstream for HW, so the QP corresponds to the |
43 // bitstream range of [0, 255] and not the user-level range of [0,63]. | 43 // bitstream range of [0, 255] and not the user-level range of [0,63]. |
44 // Current VP9 settings are mapped from VP8 thresholds above. | 44 // Current VP9 settings are mapped from VP8 thresholds above. |
åsapersson
2017/06/13 06:05:54
maybe remove sentence above
| |
45 static const int kLowVp9QpThreshold = 96; | 45 static const int kLowVp9QpThreshold = 96; |
46 static const int kHighVp9QpThreshold = 208; | 46 static const int kHighVp9QpThreshold = 185; |
47 static const int kMinFramesNeededToScale = 2 * 30; | 47 static const int kMinFramesNeededToScale = 2 * 30; |
48 | 48 |
49 static VideoEncoder::QpThresholds CodecTypeToDefaultThresholds( | 49 static VideoEncoder::QpThresholds CodecTypeToDefaultThresholds( |
50 VideoCodecType codec_type) { | 50 VideoCodecType codec_type) { |
51 int low = -1; | 51 int low = -1; |
52 int high = -1; | 52 int high = -1; |
53 switch (codec_type) { | 53 switch (codec_type) { |
54 case kVideoCodecH264: | 54 case kVideoCodecH264: |
55 low = kLowH264QpThreshold; | 55 low = kLowH264QpThreshold; |
56 high = kHighH264QpThreshold; | 56 high = kHighH264QpThreshold; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 fast_rampup_ = false; | 196 fast_rampup_ = false; |
197 } | 197 } |
198 } | 198 } |
199 | 199 |
200 void QualityScaler::ClearSamples() { | 200 void QualityScaler::ClearSamples() { |
201 RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_); | 201 RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_); |
202 framedrop_percent_.Reset(); | 202 framedrop_percent_.Reset(); |
203 average_qp_.Reset(); | 203 average_qp_.Reset(); |
204 } | 204 } |
205 } // namespace webrtc | 205 } // namespace webrtc |
OLD | NEW |