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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 1888843002: Use bitstream-level QP for libvpx VP8 quality. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: use correct bitstream-level QP 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index b20ce4921c0227f630a41283e78ebc0af8876456..c7fa66eae70d46e91588cf3fb722bfd3b6c041e7 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -600,8 +600,8 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
rps_.Init();
// Disable both high-QP limits and framedropping. Both are handled by libvpx
// internally.
- const int kLowQpThreshold = 18;
- const int kDisabledBadQpThreshold = 64;
+ const int kLowQpThreshold = 23;
stefan-webrtc 2016/04/15 09:21:08 Please clarify in the code why this was chosen to
+ const int kDisabledBadQpThreshold = 128;
// TODO(glaznev/sprang): consider passing codec initial bitrate to quality
// scaler to avoid starting with HD for low initial bitrates.
quality_scaler_.Init(kLowQpThreshold, kDisabledBadQpThreshold, false, 0, 0, 0,
@@ -1053,9 +1053,9 @@ int VP8EncoderImpl::GetEncodedPartitions(const VideoFrame& input_image,
}
if (encoders_.size() == 1 && send_stream_[0]) {
if (encoded_images_[0]._length > 0) {
- int qp;
- vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER_64, &qp);
- quality_scaler_.ReportQP(qp);
+ int qp_128;
+ vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER, &qp_128);
+ quality_scaler_.ReportQP(qp_128);
} else {
quality_scaler_.ReportDroppedFrame();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698