aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-02 19:54:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-02 19:54:33 +0000
commitb44bdf7eec8b84df81a0e688984157e4247e92ec (patch)
treee1b416cec89d5177563a19962fa86c434008920b /libavcodec/mpegvideo.c
parent8680741006c9bf4476e231f1b71f0d3f78ee8f42 (diff)
downloadffmpeg-b44bdf7eec8b84df81a0e688984157e4247e92ec.tar.gz
interlaced chroma MC divx-bug workaround
Originally committed as revision 2947 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 07d16e8e69..50aa254009 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2430,9 +2430,17 @@ if(s->quarter_sample)
src_y = s->mb_y*(16>>field_based) + (motion_y >> 1);
if (s->out_format == FMT_H263) {
- uvdxy = dxy | (motion_y & 2) | ((motion_x & 2) >> 1);
- uvsrc_x = src_x>>1;
- uvsrc_y = src_y>>1;
+ if((s->workaround_bugs & FF_BUG_HPEL_CHROMA) && field_based){
+ mx = (motion_x>>1)|(motion_x&1);
+ my = motion_y >>1;
+ uvdxy = ((my & 1) << 1) | (mx & 1);
+ uvsrc_x = s->mb_x* 8 + (mx >> 1);
+ uvsrc_y = s->mb_y*(8>>field_based) + (my >> 1);
+ }else{
+ uvdxy = dxy | (motion_y & 2) | ((motion_x & 2) >> 1);
+ uvsrc_x = src_x>>1;
+ uvsrc_y = src_y>>1;
+ }
} else {
mx = motion_x / 2;
my = motion_y / 2;