diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-12 12:31:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-17 12:21:48 +0100 |
commit | 2c9106257ffca8faef367a410c16bd8220942f6e (patch) | |
tree | c282f20ab4b59aab491719d2cbb1241ea4c458d9 /libavcodec/mpegvideo_motion.c | |
parent | 85407c7e63722a2d723257e8cf5f281a8c9f34a4 (diff) | |
download | ffmpeg-streaming-2c9106257ffca8faef367a410c16bd8220942f6e.zip ffmpeg-streaming-2c9106257ffca8faef367a410c16bd8220942f6e.tar.gz |
avcodec/mpeg4videodec: Workaround interlaced mpeg4 edge MC bug
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r-- | libavcodec/mpegvideo_motion.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index b97a6cb..a310bd4 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -327,6 +327,8 @@ void mpeg_motion_internal(MpegEncContext *s, 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 + 10 * s->uvlinesize; + if (s->workaround_bugs & FF_BUG_IEDGE) + vbuf -= s->uvlinesize; uvsrc_y = (unsigned)uvsrc_y << field_based; s->vdsp.emulated_edge_mc(ubuf, ptr_cb, s->uvlinesize, s->uvlinesize, @@ -550,6 +552,8 @@ static inline void qpel_motion(MpegEncContext *s, 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 + 10 * s->uvlinesize; + if (s->workaround_bugs & FF_BUG_IEDGE) + vbuf -= s->uvlinesize; s->vdsp.emulated_edge_mc(ubuf, ptr_cb, s->uvlinesize, s->uvlinesize, 9, 9 + field_based, |