Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 594 stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate, | 594 stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate, |
| 595 &configurations_[i]); | 595 &configurations_[i]); |
| 596 } | 596 } |
| 597 } | 597 } |
| 598 | 598 |
| 599 rps_.Init(); | 599 rps_.Init(); |
| 600 // Disable both high-QP limits and framedropping. Both are handled by libvpx | 600 // Disable both high-QP limits and framedropping. Both are handled by libvpx |
| 601 // internally. | 601 // internally. |
| 602 const int kDisabledBadQpThreshold = 64; | 602 const int kDisabledBadQpThreshold = 64; |
| 603 quality_scaler_.Init(codec_.qpMax / QualityScaler::kDefaultLowQpDenominator, | 603 quality_scaler_.Init(codec_.qpMax / QualityScaler::kDefaultLowQpDenominator, |
| 604 kDisabledBadQpThreshold, false); | 604 kDisabledBadQpThreshold, false, 0, 0, 0); |
|
pbos-webrtc
2016/02/10 13:43:21
I'd like to have this here as well, as I think the
AlexG
2016/02/10 19:07:16
I think it is too early to enable this on all plat
pbos-webrtc
2016/02/10 19:12:27
Initial bitrates, including keyframes, look bad at
| |
| 605 quality_scaler_.ReportFramerate(codec_.maxFramerate); | 605 quality_scaler_.ReportFramerate(codec_.maxFramerate); |
| 606 | 606 |
| 607 // Only apply scaling to improve for single-layer streams. The scaling metrics | 607 // Only apply scaling to improve for single-layer streams. The scaling metrics |
| 608 // use frame drops as a signal and is only applicable when we drop frames. | 608 // use frame drops as a signal and is only applicable when we drop frames. |
| 609 quality_scaler_enabled_ = encoders_.size() == 1 && | 609 quality_scaler_enabled_ = encoders_.size() == 1 && |
| 610 configurations_[0].rc_dropframe_thresh > 0 && | 610 configurations_[0].rc_dropframe_thresh > 0 && |
| 611 codec_.codecSpecific.VP8.automaticResizeOn; | 611 codec_.codecSpecific.VP8.automaticResizeOn; |
| 612 | 612 |
| 613 return InitAndSetControlSettings(); | 613 return InitAndSetControlSettings(); |
| 614 } | 614 } |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1400 return -1; | 1400 return -1; |
| 1401 } | 1401 } |
| 1402 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1402 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
| 1403 VPX_CODEC_OK) { | 1403 VPX_CODEC_OK) { |
| 1404 return -1; | 1404 return -1; |
| 1405 } | 1405 } |
| 1406 return 0; | 1406 return 0; |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 } // namespace webrtc | 1409 } // namespace webrtc |
| OLD | NEW |