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

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

Issue 2309743002: Move the QP scaling thresholds to the relevant encoders (Closed)
Patch Set: Created 4 years, 3 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
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 179081ae333fef4b3cc0e6fcbbd42bd31c7bb80e..75b667456bf57d942a0a396e1d800ad10eb0f546 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -34,6 +34,12 @@
namespace webrtc {
namespace {
+// QP is obtained from VP8-bitstream for HW, so the QP corresponds to the
+// bitstream range of [0, 127] and not the user-level range of [0,63].
+static const int kLowVp8QpThreshold = 29;
+static const int kHighVp8QpThreshold = 95;
+
magjed_webrtc 2016/09/06 07:49:09 nit: remove extra line
+
enum { kVp8ErrorPropagationTh = 30 };
enum { kVp832ByteAlign = 32 };
@@ -603,8 +609,8 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
}
rps_.Init();
- quality_scaler_.Init(QualityScaler::kLowVp8QpThreshold,
- QualityScaler::kBadVp8QpThreshold, codec_.startBitrate,
+ quality_scaler_.Init(kLowVp8QpThreshold,
+ kHighVp8QpThreshold, codec_.startBitrate,
codec_.width, codec_.height, codec_.maxFramerate);
// Only apply scaling to improve for single-layer streams. The scaling metrics

Powered by Google App Engine
This is Rietveld 408576698