Tune QP thresholds for HW H.264 encoder.

Boost low QP threashold to 21, otherwise VGA encoding never
scales up even at 2.5 Mbps.
Also reduce high QP threshold to scale down faster.

BUG=b/26504665
R=jackychen@google.com

Review URL: https://codereview.webrtc.org/1717763003 .

Cr-Commit-Position: refs/heads/master@{#11712}
This commit is contained in:
Alex Glaznev 2016-02-22 15:05:15 -08:00
parent 18f9ddd7b3
commit 67b81f92f4

View File

@ -387,8 +387,8 @@ int32_t MediaCodecVideoEncoder::InitEncode(
codec_settings->width, codec_settings->height);
} else if (codecType_ == kVideoCodecH264) {
// H264 QP is in the range [0, 51].
const int kLowQpThreshold = 17;
const int kBadQpThreshold = 40;
const int kLowQpThreshold = 21;
const int kBadQpThreshold = 36;
quality_scaler_.Init(kLowQpThreshold, kBadQpThreshold, false,
codec_settings->startBitrate,
codec_settings->width, codec_settings->height);