Implement a high-QP threshold for Android H.264.

Android hardware H.264 seems to keep a steady high-QP flow instead of
dropping frames, so framedrops aren't sufficient to detect a bad state
where downscaling would be beneficial.

BUG=webrtc:4968
R=magjed@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10078}
This commit is contained in:
Peter Boström
2015-09-25 17:03:26 +02:00
parent a323fd66de
commit 1741770742
5 changed files with 58 additions and 10 deletions

View File

@ -579,8 +579,11 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
}
rps_.Init();
// Disable both high-QP limits and framedropping. Both are handled by libvpx
// internally.
const int kDisabledBadQpThreshold = 64;
quality_scaler_.Init(codec_.qpMax / QualityScaler::kDefaultLowQpDenominator,
false);
kDisabledBadQpThreshold, false);
quality_scaler_.ReportFramerate(codec_.maxFramerate);
return InitAndSetControlSettings();