Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1898183002: Revert of Use initial bitrates for software VP8. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/base/videoengine_unittest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 rps_.Init(); 600 rps_.Init();
601 // Disable both high-QP limits and framedropping. Both are handled by libvpx 601 // Disable both high-QP limits and framedropping. Both are handled by libvpx
602 // internally. 602 // internally.
603 // QP thresholds are chosen to be high enough to be hit in practice when 603 // QP thresholds are chosen to be high enough to be hit in practice when
604 // quality is good, but also low enough to not cause a flip-flop behavior 604 // quality is good, but also low enough to not cause a flip-flop behavior
605 // (e.g. going up in resolution shouldn't give so bad quality that we should 605 // (e.g. going up in resolution shouldn't give so bad quality that we should
606 // go back down). 606 // go back down).
607 const int kLowQpThreshold = 29; 607 const int kLowQpThreshold = 29;
608 const int kDisabledBadQpThreshold = 100; 608 const int kDisabledBadQpThreshold = 100;
609 quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false, 609 // TODO(glaznev/sprang): consider passing codec initial bitrate to quality
610 codec_.startBitrate, codec_.width, codec_.height, 610 // scaler to avoid starting with HD for low initial bitrates.
611 quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false, 0, 0, 0,
611 codec_.maxFramerate); 612 codec_.maxFramerate);
612 613
613 // Only apply scaling to improve for single-layer streams. The scaling metrics 614 // Only apply scaling to improve for single-layer streams. The scaling metrics
614 // use frame drops as a signal and is only applicable when we drop frames. 615 // use frame drops as a signal and is only applicable when we drop frames.
615 quality_scaler_enabled_ = encoders_.size() == 1 && 616 quality_scaler_enabled_ = encoders_.size() == 1 &&
616 configurations_[0].rc_dropframe_thresh > 0 && 617 configurations_[0].rc_dropframe_thresh > 0 &&
617 codec_.codecSpecific.VP8.automaticResizeOn; 618 codec_.codecSpecific.VP8.automaticResizeOn;
618 619
619 return InitAndSetControlSettings(); 620 return InitAndSetControlSettings();
620 } 621 }
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 return -1; 1413 return -1;
1413 } 1414 }
1414 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != 1415 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) !=
1415 VPX_CODEC_OK) { 1416 VPX_CODEC_OK) {
1416 return -1; 1417 return -1;
1417 } 1418 }
1418 return 0; 1419 return 0;
1419 } 1420 }
1420 1421
1421 } // namespace webrtc 1422 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/base/videoengine_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698