Enable H.264 HW decoder soft rest.

Also tune up scale thresholds a little.

BUG=b/27674326
R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12337}
This commit is contained in:
Alex Glaznev
2016-04-12 16:39:39 -07:00
parent bdb7af692f
commit 79299afa30
2 changed files with 6 additions and 7 deletions

View File

@ -532,10 +532,9 @@ int32_t MediaCodecVideoDecoder::Decode(
codec_.width = inputImage._encodedWidth;
codec_.height = inputImage._encodedHeight;
int32_t ret;
if (use_surface_ && codecType_ == kVideoCodecVP8) {
// Soft codec reset - only for VP8 and surface decoding.
// TODO(glaznev): try to use similar approach for H.264
// and buffer decoding.
if (use_surface_ &&
(codecType_ == kVideoCodecVP8 || codecType_ == kVideoCodecH264)) {
// Soft codec reset - only for surface decoding.
ret = codec_thread_->Invoke<int32_t>(Bind(
&MediaCodecVideoDecoder::ResetDecodeOnCodecThread, this));
} else {