OSDN Git Service

SoftFFmpegVideo: use AVDISCARD_DEFAULT in skip_loop_filter
authorMichael Goffioul <michael.goffioul@gmail.com>
Fri, 11 Aug 2017 08:17:21 +0000 (16:17 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 11 Aug 2017 08:17:21 +0000 (16:17 +0800)
After a lot of trials and errors, it appears the rendering problem
has nothing to do with color depth. The problem is that the codec
is configured with skip_loop_filter = AVDISCARD_ALL. I'm not sure
what's the reason for that choice. By comparison, it was using
AVDISCARD_DEFAULT in kitkat-x86 branch. If I change the value to
AVDISCARD_DEFAULT instead, I get correct decoding.

Fixes: a5d3c4c2 "stagefright-plugins: Implement frame dropping and AV sync"

omx/SoftFFmpegVideo.cpp

index e59992b..6c00997 100644 (file)
@@ -91,7 +91,7 @@ void SoftFFmpegVideo::setDefaultCtx(AVCodecContext *avctx, const AVCodec *codec)
     avctx->idct_algo         = 0;
     avctx->skip_frame        = AVDISCARD_DEFAULT;
     avctx->skip_idct         = AVDISCARD_DEFAULT;
-    avctx->skip_loop_filter  = AVDISCARD_ALL;
+    avctx->skip_loop_filter  = AVDISCARD_DEFAULT;
     avctx->error_concealment = 3;
 
     if (fast)   avctx->flags2 |= AV_CODEC_FLAG2_FAST;