| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 inst->simulcastStream[stream_idx].height, kVp832ByteAlign); | 572 inst->simulcastStream[stream_idx].height, kVp832ByteAlign); |
| 573 SetStreamState(stream_bitrates[stream_idx] > 0, stream_idx); | 573 SetStreamState(stream_bitrates[stream_idx] > 0, stream_idx); |
| 574 configurations_[i].rc_target_bitrate = stream_bitrates[stream_idx]; | 574 configurations_[i].rc_target_bitrate = stream_bitrates[stream_idx]; |
| 575 temporal_layers_[stream_idx]->ConfigureBitrates( | 575 temporal_layers_[stream_idx]->ConfigureBitrates( |
| 576 stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate, | 576 stream_bitrates[stream_idx], inst->maxBitrate, inst->maxFramerate, |
| 577 &configurations_[i]); | 577 &configurations_[i]); |
| 578 } | 578 } |
| 579 } | 579 } |
| 580 | 580 |
| 581 rps_.Init(); | 581 rps_.Init(); |
| 582 // Disable both high-QP limits and framedropping. Both are handled by libvpx |
| 583 // internally. |
| 584 const int kDisabledBadQpThreshold = 64; |
| 582 quality_scaler_.Init(codec_.qpMax / QualityScaler::kDefaultLowQpDenominator, | 585 quality_scaler_.Init(codec_.qpMax / QualityScaler::kDefaultLowQpDenominator, |
| 583 false); | 586 kDisabledBadQpThreshold, false); |
| 584 quality_scaler_.ReportFramerate(codec_.maxFramerate); | 587 quality_scaler_.ReportFramerate(codec_.maxFramerate); |
| 585 | 588 |
| 586 return InitAndSetControlSettings(); | 589 return InitAndSetControlSettings(); |
| 587 } | 590 } |
| 588 | 591 |
| 589 int VP8EncoderImpl::SetCpuSpeed(int width, int height) { | 592 int VP8EncoderImpl::SetCpuSpeed(int width, int height) { |
| 590 #if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) | 593 #if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) |
| 591 // On mobile platform, always set to -12 to leverage between cpu usage | 594 // On mobile platform, always set to -12 to leverage between cpu usage |
| 592 // and video quality. | 595 // and video quality. |
| 593 return -12; | 596 return -12; |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 return -1; | 1396 return -1; |
| 1394 } | 1397 } |
| 1395 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) | 1398 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) |
| 1396 != VPX_CODEC_OK) { | 1399 != VPX_CODEC_OK) { |
| 1397 return -1; | 1400 return -1; |
| 1398 } | 1401 } |
| 1399 return 0; | 1402 return 0; |
| 1400 } | 1403 } |
| 1401 | 1404 |
| 1402 } // namespace webrtc | 1405 } // namespace webrtc |
| OLD | NEW |