Originally committed as revision 2947 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.5
| @@ -840,6 +840,7 @@ typedef struct AVCodecContext { | |||||
| #define FF_BUG_QPEL_CHROMA2 256 | #define FF_BUG_QPEL_CHROMA2 256 | ||||
| #define FF_BUG_DIRECT_BLOCKSIZE 512 | #define FF_BUG_DIRECT_BLOCKSIZE 512 | ||||
| #define FF_BUG_EDGE 1024 | #define FF_BUG_EDGE 1024 | ||||
| #define FF_BUG_HPEL_CHROMA 2048 | |||||
| //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% | //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% | ||||
| /** | /** | ||||
| @@ -551,6 +551,8 @@ retry: | |||||
| s->workaround_bugs|= FF_BUG_EDGE; | s->workaround_bugs|= FF_BUG_EDGE; | ||||
| } | } | ||||
| if(s->divx_version) | |||||
| s->workaround_bugs|= FF_BUG_HPEL_CHROMA; | |||||
| #if 0 | #if 0 | ||||
| if(s->divx_version==500) | if(s->divx_version==500) | ||||
| s->padding_bug_score= 256*256*256*64; | s->padding_bug_score= 256*256*256*64; | ||||
| @@ -2430,9 +2430,17 @@ if(s->quarter_sample) | |||||
| src_y = s->mb_y*(16>>field_based) + (motion_y >> 1); | src_y = s->mb_y*(16>>field_based) + (motion_y >> 1); | ||||
| if (s->out_format == FMT_H263) { | 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 { | } else { | ||||
| mx = motion_x / 2; | mx = motion_x / 2; | ||||
| my = motion_y / 2; | my = motion_y / 2; | ||||