avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Jan 2014 15:36:02 +0000 (16:36 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 20 Jan 2014 16:04:57 +0000 (17:04 +0100)
We currently read a whole 16x16 block from the input at a few places

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegvideo_enc.c

index aca1bae..62c9345 100644 (file)
@@ -1035,6 +1035,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
             direct = 0;
         if (pic_arg->linesize[2] != s->uvlinesize)
             direct = 0;
+        if ((s->width & 15) || (s->height & 15))
+            direct = 0;
 
         av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
                 pic_arg->linesize[1], s->linesize, s->uvlinesize);