comparison mpegvideo.c @ 1048:75a659fae7e0 libavcodec

divx503 decoding fix
author michaelni
date Sun, 02 Feb 2003 23:34:30 +0000
parents a78f6f72d54e
children e5a9dbf597d4
comparison
equal deleted inserted replaced
1047:3f316a471019 1048:75a659fae7e0
1678 if(s->flags&CODEC_FLAG_GRAY) return; 1678 if(s->flags&CODEC_FLAG_GRAY) return;
1679 1679
1680 if(field_based){ 1680 if(field_based){
1681 mx= motion_x/2; 1681 mx= motion_x/2;
1682 my= motion_y>>1; 1682 my= motion_y>>1;
1683 }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA2){
1684 static const int rtab[8]= {0,0,1,1,0,0,0,1};
1685 mx= (motion_x>>1) + rtab[motion_x&7];
1686 my= (motion_y>>1) + rtab[motion_y&7];
1683 }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA){ 1687 }else if(s->workaround_bugs&FF_BUG_QPEL_CHROMA){
1684 mx= (motion_x>>1)|(motion_x&1); 1688 mx= (motion_x>>1)|(motion_x&1);
1685 my= (motion_y>>1)|(motion_y&1); 1689 my= (motion_y>>1)|(motion_y&1);
1686 }else{ 1690 }else{
1687 mx= motion_x/2; 1691 mx= motion_x/2;
1688 my= motion_y/2; 1692 my= motion_y/2;
1689 } 1693 }
1690 mx= (mx>>1)|(mx&1); 1694 mx= (mx>>1)|(mx&1);
1691 my= (my>>1)|(my&1); 1695 my= (my>>1)|(my&1);
1696
1692 dxy= (mx&1) | ((my&1)<<1); 1697 dxy= (mx&1) | ((my&1)<<1);
1693 mx>>=1; 1698 mx>>=1;
1694 my>>=1; 1699 my>>=1;
1695 1700
1696 src_x = s->mb_x * 8 + mx; 1701 src_x = s->mb_x * 8 + mx;