| 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 24 matching lines...) Expand all Loading... |
| 35 // is good, but also low enough to not cause a flip-flop behavior (e.g. going up | 35 // is good, but also low enough to not cause a flip-flop behavior (e.g. going up |
| 36 // in resolution shouldn't give so bad quality that we should go back down). | 36 // in resolution shouldn't give so bad quality that we should go back down). |
| 37 | 37 |
| 38 const int QualityScaler::kLowVp8QpThreshold = 29; | 38 const int QualityScaler::kLowVp8QpThreshold = 29; |
| 39 const int QualityScaler::kBadVp8QpThreshold = 95; | 39 const int QualityScaler::kBadVp8QpThreshold = 95; |
| 40 | 40 |
| 41 #if defined(WEBRTC_IOS) | 41 #if defined(WEBRTC_IOS) |
| 42 const int QualityScaler::kLowH264QpThreshold = 32; | 42 const int QualityScaler::kLowH264QpThreshold = 32; |
| 43 const int QualityScaler::kBadH264QpThreshold = 42; | 43 const int QualityScaler::kBadH264QpThreshold = 42; |
| 44 #else | 44 #else |
| 45 const int QualityScaler::kLowH264QpThreshold = 22; | 45 const int QualityScaler::kLowH264QpThreshold = 24; |
| 46 const int QualityScaler::kBadH264QpThreshold = 35; | 46 const int QualityScaler::kBadH264QpThreshold = 37; |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 QualityScaler::QualityScaler() : low_qp_threshold_(-1) {} | 49 QualityScaler::QualityScaler() : low_qp_threshold_(-1) {} |
| 50 | 50 |
| 51 void QualityScaler::Init(int low_qp_threshold, | 51 void QualityScaler::Init(int low_qp_threshold, |
| 52 int high_qp_threshold, | 52 int high_qp_threshold, |
| 53 int initial_bitrate_kbps, | 53 int initial_bitrate_kbps, |
| 54 int width, | 54 int width, |
| 55 int height, | 55 int height, |
| 56 int fps) { | 56 int fps) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (downscale_shift_ < 0) | 182 if (downscale_shift_ < 0) |
| 183 downscale_shift_ = 0; | 183 downscale_shift_ = 0; |
| 184 if (!up) { | 184 if (!up) { |
| 185 // First downscale hit, start using a slower threshold for going up. | 185 // First downscale hit, start using a slower threshold for going up. |
| 186 measure_seconds_upscale_ = kMeasureSecondsUpscale; | 186 measure_seconds_upscale_ = kMeasureSecondsUpscale; |
| 187 UpdateSampleCounts(); | 187 UpdateSampleCounts(); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace webrtc | 191 } // namespace webrtc |
| OLD | NEW |