1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0

We currently read a whole 16x16 block from the input at a few places

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-20 16:36:02 +01:00
parent ea4b477a1b
commit d08dd32863

View 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);