diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libffmpeg/libavcodec/avcodec.h | 1 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/h263dec.c | 7 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/mpegvideo.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/avcodec.h b/src/libffmpeg/libavcodec/avcodec.h index 6ee2b84cd..06b348fa7 100644 --- a/src/libffmpeg/libavcodec/avcodec.h +++ b/src/libffmpeg/libavcodec/avcodec.h @@ -523,6 +523,7 @@ typedef struct AVCodecContext { #define FF_BUG_AC_VLC 32 #define FF_BUG_QPEL_CHROMA 64 #define FF_BUG_STD_QPEL 128 +#define FF_BUG_QPEL_CHROMA2 256 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% /** diff --git a/src/libffmpeg/libavcodec/h263dec.c b/src/libffmpeg/libavcodec/h263dec.c index ff3773bed..5f6454d5a 100644 --- a/src/libffmpeg/libavcodec/h263dec.c +++ b/src/libffmpeg/libavcodec/h263dec.c @@ -497,6 +497,10 @@ retry: s->workaround_bugs|= FF_BUG_QPEL_CHROMA; } + if(s->divx_version>502){ + s->workaround_bugs|= FF_BUG_QPEL_CHROMA2; + } + if(s->avctx->fourcc == ff_get_fourcc("XVID") && s->xvid_build==0) s->workaround_bugs|= FF_BUG_QPEL_CHROMA; @@ -509,6 +513,9 @@ retry: if(s->xvid_build && s->xvid_build<=1) s->workaround_bugs|= FF_BUG_QPEL_CHROMA; + if(s->xvid_build && s->xvid_build>=8) + s->workaround_bugs|= FF_BUG_QPEL_CHROMA2; + #define SET_QPEL_FUNC(postfix1, postfix2) \ s->dsp.put_ ## postfix1 = ff_put_ ## postfix2;\ s->dsp.put_no_rnd_ ## postfix1 = ff_put_no_rnd_ ## postfix2;\ 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); |