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 #include "webrtc/modules/video_coding/utility/include/quality_scaler.h" | 10 #include "webrtc/modules/video_coding/utility/quality_scaler.h" |
11 | 11 |
12 namespace webrtc { | 12 namespace webrtc { |
13 | 13 |
14 static const int kMinFps = 10; | 14 static const int kMinFps = 10; |
15 static const int kMeasureSeconds = 5; | 15 static const int kMeasureSeconds = 5; |
16 static const int kFramedropPercentThreshold = 60; | 16 static const int kFramedropPercentThreshold = 60; |
17 | 17 |
18 const int QualityScaler::kDefaultLowQpDenominator = 3; | 18 const int QualityScaler::kDefaultLowQpDenominator = 3; |
19 // Note that this is the same for width and height to permit 120x90 in both | 19 // Note that this is the same for width and height to permit 120x90 in both |
20 // portrait and landscape mode. | 20 // portrait and landscape mode. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 | 148 |
149 void QualityScaler::AdjustScale(bool up) { | 149 void QualityScaler::AdjustScale(bool up) { |
150 downscale_shift_ += up ? -1 : 1; | 150 downscale_shift_ += up ? -1 : 1; |
151 if (downscale_shift_ < 0) | 151 if (downscale_shift_ < 0) |
152 downscale_shift_ = 0; | 152 downscale_shift_ = 0; |
153 ClearSamples(); | 153 ClearSamples(); |
154 } | 154 } |
155 | 155 |
156 } // namespace webrtc | 156 } // namespace webrtc |
OLD | NEW |