X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fmpegvideo.c;h=e5424cbacfd5b04f207beb641c62786c1524e70e;hb=55eab1733b9e730ceac33edce9aab56c17ea87b2;hp=9a17a6e25c8e865c0786ff1ae754d2463b4748b3;hpb=68b0d7e0be66bfa8141f8bd3eaa004b8104b8c34;p=ffmpeg diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 9a17a6e25c8..e5424cbacfd 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2116,7 +2116,9 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, ptr_y = s->sc.edge_emu_buffer; if (!CONFIG_GRAY || !(s->avctx->flags & AV_CODEC_FLAG_GRAY)) { uint8_t *ubuf = s->sc.edge_emu_buffer + 18 * s->linesize; - uint8_t *vbuf =ubuf + 9 * s->uvlinesize; + uint8_t *vbuf =ubuf + 10 * s->uvlinesize; + if (s->workaround_bugs & FF_BUG_IEDGE) + vbuf -= s->uvlinesize; s->vdsp.emulated_edge_mc(ubuf, ptr_cb, uvlinesize >> field_based, uvlinesize >> field_based, 9, 9 + field_based,