[FFmpeg-cvslog] avcodec/utvideodec: fix decoding odd sizes with interlaced video with some formats

Paul B Mahol git at videolan.org
Fri Apr 21 13:56:13 EEST 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Apr 21 12:27:17 2017 +0200| [9ef21a897c64417a0575cbc6fad6222f3163d103] | committer: Paul B Mahol

avcodec/utvideodec: fix decoding odd sizes with interlaced video with some formats

Fixes #6316.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ef21a897c64417a0575cbc6fad6222f3163d103
---

 libavcodec/utvideodec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index a49cae8e41..25e32a6055 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -238,7 +238,7 @@ static int decode_plane(UtvideoContext *c, int plane_no,
     VLC vlc;
     GetBitContext gb;
     int prev, fsym;
-    const int cmask = ~(!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P);
+    const int cmask = c->interlaced ? ~(1 + 2 * (!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P)) : ~(!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P);
 
     if (build_huff(src, &vlc, &fsym)) {
         av_log(c->avctx, AV_LOG_ERROR, "Cannot build Huffman codes\n");



More information about the ffmpeg-cvslog mailing list