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

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

Issue 1880103002: Revert of Make QualityScaler more responsive to downgrades. (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 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 35291dfb1e4d43f6eae3986b99a6a30d2ec646d2..b46d82ecd719c3927eb24b17626a714faf2daa4e 100644
--- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -382,17 +382,15 @@
const int kLowQpThreshold = 32;
const int kBadQpThreshold = 92;
quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold, false,
- codec_settings->startBitrate, codec_settings->width,
- codec_settings->height,
- codec_settings->maxFramerate);
+ codec_settings->startBitrate,
+ codec_settings->width, codec_settings->height);
} else if (codecType_ == kVideoCodecH264) {
// H264 QP is in the range [0, 51].
const int kLowQpThreshold = 21;
const int kBadQpThreshold = 36;
quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold, false,
- codec_settings->startBitrate, codec_settings->width,
- codec_settings->height,
- codec_settings->maxFramerate);
+ codec_settings->startBitrate,
+ codec_settings->width, codec_settings->height);
} else {
// When adding codec support to additional hardware codecs, also configure
// their QP thresholds for scaling.
@@ -400,6 +398,7 @@
scale_ = false;
}
quality_scaler_.SetMinResolution(kMinDimension, kMinDimension);
+ quality_scaler_.ReportFramerate(codec_settings->maxFramerate);
QualityScaler::Resolution res = quality_scaler_.GetScaledResolution();
init_width = std::max(res.width, kMinDimension);
init_height = std::max(res.height, kMinDimension);
« 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