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

Unified Diff: webrtc/modules/video_coding/utility/quality_scaler.cc

Issue 2914363002: MediaCodecVideoEncoder: Add QP stats to Encoded callback for VP9 and turn on quality scaling. (Closed)
Patch Set: Created 3 years, 6 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 | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/sdk/android/src/jni/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/utility/quality_scaler.cc
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
index f1623cb6e974b66c4857570bf23ef3a4df3782f2..3709ee3bf51f4b34bb6695d7765f970c243b14fd 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.cc
+++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
@@ -39,6 +39,11 @@ static const int kHighH264QpThreshold = 37;
// bitstream range of [0, 127] and not the user-level range of [0,63].
static const int kLowVp8QpThreshold = 29;
static const int kHighVp8QpThreshold = 95;
+// QP is obtained from VP9-bitstream for HW, so the QP corresponds to the
+// bitstream range of [0, 255] and not the user-level range of [0,63].
+// Current VP9 settings are mapped from VP8 thresholds above.
+static const int kLowVp9QpThreshold = 96;
+static const int kHighVp9QpThreshold = 208;
static const int kMinFramesNeededToScale = 2 * 30;
static VideoEncoder::QpThresholds CodecTypeToDefaultThresholds(
@@ -54,6 +59,10 @@ static VideoEncoder::QpThresholds CodecTypeToDefaultThresholds(
low = kLowVp8QpThreshold;
high = kHighVp8QpThreshold;
break;
+ case kVideoCodecVP9:
+ low = kLowVp9QpThreshold;
+ high = kHighVp9QpThreshold;
+ break;
default:
RTC_NOTREACHED() << "Invalid codec type for QualityScaler.";
}
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/sdk/android/src/jni/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698