| Index: webrtc/modules/video_coding/utility/quality_scaler.cc
|
| diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| index 76bf9f5b0399ed0d7558eed398f6894797490672..f6da4a3a6d8104199b20a8c7ade81ee3a8ffb9b1 100644
|
| --- a/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| +++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
|
| @@ -30,11 +30,22 @@ QualityScaler::QualityScaler()
|
|
|
| void QualityScaler::Init(int low_qp_threshold,
|
| int high_qp_threshold,
|
| - bool use_framerate_reduction) {
|
| + bool use_framerate_reduction,
|
| + int initial_bitrate_kbps,
|
| + int width,
|
| + int height) {
|
| ClearSamples();
|
| low_qp_threshold_ = low_qp_threshold;
|
| high_qp_threshold_ = high_qp_threshold;
|
| use_framerate_reduction_ = use_framerate_reduction;
|
| + if (initial_bitrate_kbps > 0 && initial_bitrate_kbps < 500) {
|
| + // Start scaling to roughly VGA.
|
| + while (width * height > 700 * 500) {
|
| + ++downscale_shift_;
|
| + width /= 2;
|
| + height /= 2;
|
| + }
|
| + }
|
| target_framerate_ = -1;
|
| }
|
|
|
|
|