diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2003-03-21 12:26:05 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2003-03-21 12:26:05 +0000 |
commit | b255ed200ac2f628c82e6e5420e0a8f310003a78 (patch) | |
tree | b7e425338dc95c215df3df00616c319889bc2d05 /src/libffmpeg/libavcodec/mpegvideo.c | |
parent | fab960c330cfedd8cdd1476b42394353dccd50f1 (diff) | |
download | xine-lib-b255ed200ac2f628c82e6e5420e0a8f310003a78.tar.gz xine-lib-b255ed200ac2f628c82e6e5420e0a8f310003a78.tar.bz2 |
libavcodec divx/xvid qpel bug workaround ported from ffmpeg cvs
CVS patchset: 4458
CVS date: 2003/03/21 12:26:05
Diffstat (limited to 'src/libffmpeg/libavcodec/mpegvideo.c')
-rw-r--r-- | src/libffmpeg/libavcodec/mpegvideo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/mpegvideo.c b/src/libffmpeg/libavcodec/mpegvideo.c index f49b1c2b5..31535c263 100644 --- a/src/libffmpeg/libavcodec/mpegvideo.c +++ b/src/libffmpeg/libavcodec/mpegvideo.c @@ -1684,6 +1684,10 @@ static inline void qpel_motion(MpegEncContext *s, if(field_based){ mx= motion_x/2; my= motion_y>>1; + }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA2){ + static const int rtab[8]= {0,0,1,1,0,0,0,1}; + mx= (motion_x>>1) + rtab[motion_x&7]; + my= (motion_y>>1) + rtab[motion_y&7]; }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA){ mx= (motion_x>>1)|(motion_x&1); my= (motion_y>>1)|(motion_y&1); |