summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-09-10 11:28:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-09-10 11:28:18 +0000
commit8fc6c2b5372066d39c32423959e7c523ed47bf7d (patch)
tree8d671c8eb7bd21a364476ea5370efc9052b5aa6d /libavcodec
parent2187d9482edb98c7060266a9dc9fda314ae7e7be (diff)
downloadffmpeg-streaming-8fc6c2b5372066d39c32423959e7c523ed47bf7d.zip
ffmpeg-streaming-8fc6c2b5372066d39c32423959e7c523ed47bf7d.tar.gz
detect old xvid with fourcc=DIVX
remove "this file was encoded with ..." stuff (use debug=4096 if u want to know that) Originally committed as revision 2253 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h1
-rw-r--r--libavcodec/h263.c15
-rw-r--r--libavcodec/h263dec.c9
3 files changed, 12 insertions, 13 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 9bdbeee..8d5b30c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -979,6 +979,7 @@ typedef struct AVCodecContext {
#define FF_DEBUG_PTS 0x00000200
#define FF_DEBUG_ER 0x00000400
#define FF_DEBUG_MMCO 0x00000800
+#define FF_DEBUG_BUGS 0x00001000
/**
* error.
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index c2659d6..fb9eeb2 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -4781,13 +4781,6 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
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 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
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 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
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 --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index aa1db85..3701aa5 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -484,6 +484,10 @@ retry:
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 @@ retry:
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;
OpenPOWER on IntegriCloud