# HG changeset patch # User michaelni # Date 1063193298 0 # Node ID 460e5ead67226773d82501aeadec28a847d20acc # Parent 670fca257a69c0ad77339f1448210288bf5cbc08 detect old xvid with fourcc=DIVX remove "this file was encoded with ..." stuff (use debug=4096 if u want to know that) diff -r 670fca257a69 -r 460e5ead6722 avcodec.h --- a/avcodec.h Wed Sep 10 08:20:14 2003 +0000 +++ b/avcodec.h Wed Sep 10 11:28:18 2003 +0000 @@ -979,6 +979,7 @@ #define FF_DEBUG_PTS 0x00000200 #define FF_DEBUG_ER 0x00000400 #define FF_DEBUG_MMCO 0x00000800 +#define FF_DEBUG_BUGS 0x00001000 /** * error. diff -r 670fca257a69 -r 460e5ead6722 h263.c --- a/h263.c Wed Sep 10 08:20:14 2003 +0000 +++ b/h263.c Wed Sep 10 11:28:18 2003 +0000 @@ -4781,13 +4781,6 @@ s->divx_version= ver; s->divx_build= build; s->divx_packed= e==3 && last=='p'; - if(s->picture_number==0){ - printf("This file was encoded with DivX%d Build%d", ver, build); - if(s->divx_packed) - printf("p\n"); - else - printf("\n"); - } } /* ffmpeg detection */ @@ -4803,16 +4796,12 @@ if(e==4){ s->ffmpeg_version= ver*256*256 + ver2*256 + ver3; s->lavc_build= build; - if(s->picture_number==0) - printf("This file was encoded with libavcodec build %d\n", build); } /* xvid detection */ e=sscanf(buf, "XviD%d", &build); if(e==1){ s->xvid_build= build; - if(s->picture_number==0) - printf("This file was encoded with XviD build %d\n", build); } //printf("User Data: %s\n", buf); @@ -4982,12 +4971,12 @@ s->b_code=1; if(s->avctx->debug&FF_DEBUG_PICT_INFO){ - printf("qp:%d fc:%d,%d %s size:%d pro:%d alt:%d top:%d %spel part:%d resync:%d w:%d a:%d rnd:%d\n", + printf("qp:%d fc:%d,%d %s size:%d pro:%d alt:%d top:%d %spel part:%d resync:%d w:%d a:%d rnd:%d vot:%d%s\n", s->qscale, s->f_code, s->b_code, s->pict_type == I_TYPE ? "I" : (s->pict_type == P_TYPE ? "P" : (s->pict_type == B_TYPE ? "B" : "S")), gb->size_in_bits,s->progressive_sequence, s->alternate_scan, s->top_field_first, s->quarter_sample ? "q" : "h", s->data_partitioning, s->resync_marker, s->num_sprite_warping_points, - s->sprite_warping_accuracy, 1-s->no_rounding); + s->sprite_warping_accuracy, 1-s->no_rounding, s->vo_type, s->vol_control_parameters ? " VOLC" : " "); } if(!s->scalability){ diff -r 670fca257a69 -r 460e5ead6722 h263dec.c --- a/h263dec.c Wed Sep 10 08:20:14 2003 +0000 +++ b/h263dec.c Wed Sep 10 11:28:18 2003 +0000 @@ -484,6 +484,10 @@ if(s->xvid_build==0 && s->divx_version==0 && s->lavc_build==0){ if(s->avctx->codec_tag == ff_get_fourcc("XVID") || s->avctx->codec_tag == ff_get_fourcc("XVIX")) s->xvid_build= -1; + + if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==1 + && s->padding_bug_score > 0 && s->low_delay) // XVID with modified fourcc + s->xvid_build= -1; if(s->avctx->codec_tag == ff_get_fourcc("DIVX") && s->vo_type==0 && s->vol_control_parameters==0) s->divx_version= 400; //divx 4 @@ -577,6 +581,11 @@ SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_old_c) } + if(avctx->debug & FF_DEBUG_BUGS) + printf("bugs: %X lavc_build:%d xvid_build:%d divx_version:%d divx_build:%d %s\n", + s->workaround_bugs, s->lavc_build, s->xvid_build, s->divx_version, s->divx_build, + s->divx_packed ? "p" : ""); + #if 0 // dump bits per frame / qp / complexity { static FILE *f=NULL;