Commit d08dd328 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ea4b477a
...@@ -1035,6 +1035,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) ...@@ -1035,6 +1035,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
direct = 0; direct = 0;
if (pic_arg->linesize[2] != s->uvlinesize) if (pic_arg->linesize[2] != s->uvlinesize)
direct = 0; direct = 0;
if ((s->width & 15) || (s->height & 15))
direct = 0;
av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0], av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
pic_arg->linesize[1], s->linesize, s->uvlinesize); pic_arg->linesize[1], s->linesize, s->uvlinesize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment