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

Unified Diff: webrtc/api/java/jni/androidmediaencoder_jni.cc

Issue 1966213002: Unify hardware and software QP thresholds. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compromise at 95 Created 4 years, 7 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 | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/jni/androidmediaencoder_jni.cc
diff --git a/webrtc/api/java/jni/androidmediaencoder_jni.cc b/webrtc/api/java/jni/androidmediaencoder_jni.cc
index 5a817b6e8446ed3bca12bce62ab0dc6b5be326b2..4c38df646787f02290b8ae880e03af9fc25a3edb 100644
--- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -388,21 +388,13 @@ int32_t MediaCodecVideoEncoder::InitEncode(
if (scale_) {
if (codecType_ == kVideoCodecVP8) {
- // QP is obtained from VP8-bitstream for HW, so the QP corresponds to the
- // (internal) range: [0, 127]. And we cannot change QP_max in HW, so it is
- // always = 127. Note that in SW, QP is that of the user-level range [0,
- // 63].
- const int kLowQpThreshold = 29;
- const int kBadQpThreshold = 90;
- quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold,
- codec_settings->startBitrate, codec_settings->width,
- codec_settings->height,
- codec_settings->maxFramerate);
+ quality_scaler_.Init(
+ QualityScaler::kLowVp8QpThreshold, QualityScaler::kBadVp8QpThreshold,
+ codec_settings->startBitrate, codec_settings->width,
+ codec_settings->height, codec_settings->maxFramerate);
} else if (codecType_ == kVideoCodecH264) {
- // H264 QP is in the range [0, 51].
- const int kLowQpThreshold = 22;
- const int kBadQpThreshold = 35;
- quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold,
+ quality_scaler_.Init(QualityScaler::kLowH264QpThreshold,
+ QualityScaler::kBadH264QpThreshold,
codec_settings->startBitrate, codec_settings->width,
codec_settings->height,
codec_settings->maxFramerate);
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698