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

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

Issue 1867643003: Make QualityScaler not downscale below QVGA. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: update test 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/utility/quality_scaler.h » ('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 593554e5e0a72839a1a3cc45d8cd9df2cfef2416..d9d7a809b8685829aa21c152cddd8ec77e098f5b 100644
--- a/webrtc/api/java/jni/androidmediaencoder_jni.cc
+++ b/webrtc/api/java/jni/androidmediaencoder_jni.cc
@@ -352,7 +352,6 @@ int32_t MediaCodecVideoEncoder::InitEncode(
const webrtc::VideoCodec* codec_settings,
int32_t /* number_of_cores */,
size_t /* max_payload_size */) {
- const int kMinDimension = 180;
if (codec_settings == NULL) {
ALOGE << "NULL VideoCodec instance";
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
@@ -396,10 +395,9 @@ int32_t MediaCodecVideoEncoder::InitEncode(
RTC_NOTREACHED() << "Unsupported codec without configured QP thresholds.";
scale_ = false;
}
- quality_scaler_.SetMinResolution(kMinDimension, kMinDimension);
QualityScaler::Resolution res = quality_scaler_.GetScaledResolution();
- init_width = std::max(res.width, kMinDimension);
- init_height = std::max(res.height, kMinDimension);
+ init_width = res.width;
+ init_height = res.height;
ALOGD << "Scaled resolution: " << init_width << " x " << init_height;
}
« no previous file with comments | « no previous file | webrtc/modules/video_coding/utility/quality_scaler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698