diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-04-27 12:30:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-04-27 12:30:26 +0000 |
commit | d7e9533aa06f4073a27812349b35ba5fede11ca1 (patch) | |
tree | 58b28f82ec84f27458d4065c140ba5e828d27b90 /libavcodec/h263dec.c | |
parent | 1ac9248bb7c0c64bfebbd0ced1806a8899c396a9 (diff) | |
download | ffmpeg-d7e9533aa06f4073a27812349b35ba5fede11ca1.tar.gz |
fixed msmpeg4 infinite loop if buggy stream
rewrote quantizer
fixed bias (+10% compression/quality for h263 like codecs)
qscale=1 support
mpeg1 intra frames looks far less blocky
added codec_id field
Originally committed as revision 423 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 7c450f9edd..796e5ea615 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -73,17 +73,13 @@ static int h263_decode_init(AVCodecContext *avctx) default: return -1; } - + s->codec_id= avctx->codec->id; + /* for h263, we allocate the images after having read the header */ if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) if (MPV_common_init(s) < 0) return -1; - /* XXX: suppress this matrix init, only needed because using mpeg1 - dequantize in mmx case */ - for(i=0;i<64;i++) - s->non_intra_matrix[i] = default_non_intra_matrix[i]; - if (s->h263_msmpeg4) msmpeg4_decode_init_vlc(s); else @@ -251,7 +247,7 @@ static int h263_decode_frame(AVCodecContext *avctx, if(msmpeg4_decode_ext_header(s, buf_size) < 0) return -1; /* divx 5.01+ bistream reorder stuff */ - if(s->h263_pred && s->bitstream_buffer_size==0){ + if(s->codec_id==CODEC_ID_MPEG4 && s->bitstream_buffer_size==0){ int current_pos= get_bits_count(&s->gb)/8; if( buf_size - current_pos > 5 && buf_size - current_pos < BITSTREAM_BUFFER_SIZE){ |