diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-15 20:47:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-15 20:47:09 +0000 |
commit | 1c6dcb0f420c747b263d5c17641ae9c216c2e9de (patch) | |
tree | 256457d99ff8daa9150643f35c25880d42681992 /libavcodec | |
parent | d518aebdee8bb5068f43e4fef783dc63ced1679c (diff) | |
download | ffmpeg-1c6dcb0f420c747b263d5c17641ae9c216c2e9de.tar.gz |
cleaner & more flexible edge bug workaround
Originally committed as revision 1685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 1 | ||||
-rw-r--r-- | libavcodec/h263.c | 2 | ||||
-rw-r--r-- | libavcodec/h263dec.c | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 93907072ad..47fc5efa15 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -583,6 +583,7 @@ typedef struct AVCodecContext { #define FF_BUG_STD_QPEL 128 #define FF_BUG_QPEL_CHROMA2 256 #define FF_BUG_DIRECT_BLOCKSIZE 512 +#define FF_BUG_EDGE 1024 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100% /** diff --git a/libavcodec/h263.c b/libavcodec/h263.c index f07602e165..2baed96a8d 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -4814,7 +4814,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table; //FIXME add short header support s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table; - if(s->divx_version==0 || s->divx_version < 500){ + if(!(s->workaround_bugs&FF_BUG_EDGE)){ s->h_edge_pos= s->width; s->v_edge_pos= s->height; } diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 15383d12f0..bd0f7ff97d 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -538,6 +538,11 @@ retry: //printf("padding_bug_score: %d\n", s->padding_bug_score); if(s->divx_version==501 && s->divx_build==20020416) s->padding_bug_score= 256*256*256*64; + + if(s->divx_version>=500){ + s->workaround_bugs|= FF_BUG_EDGE; + } + #if 0 if(s->divx_version==500) s->padding_bug_score= 256*256*256*64; |