diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-10-02 22:56:58 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-10-02 22:56:58 +0000 |
commit | 3a3d3a42c29424b2ec5a8b3c2b0a2017fbddb9ad (patch) | |
tree | e2c5fbe4c069800806b5d67945cdeac3a271a861 /libavcodec/h263dec.c | |
parent | 3994623df2efd2749631c3492184dd8d4ffa9d1b (diff) | |
download | ffmpeg-3a3d3a42c29424b2ec5a8b3c2b0a2017fbddb9ad.tar.gz |
fixing custom quantizer matrix decoding
minor optimizations
Originally committed as revision 993 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index fc3dca3d00..16efffeb36 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -164,6 +164,11 @@ uint64_t time= rdtsc(); init_get_bits(&s->gb, buf, buf_size); s->bitstream_buffer_size=0; + if (!s->context_initialized) { + if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix + return -1; + } + /* let's go :-) */ if (s->h263_msmpeg4) { ret = msmpeg4_decode_picture_header(s); @@ -188,7 +193,10 @@ uint64_t time= rdtsc(); /* and other parameters. So then we could init the picture */ /* FIXME: By the way H263 decoder is evolving it should have */ /* an H263EncContext */ - if (s->width != avctx->width || s->height != avctx->height) { + if ( s->width != avctx->width || s->height != avctx->height + || avctx->aspect_ratio_info != s->aspect_ratio_info + || avctx->aspected_width != s->aspected_width + || avctx->aspected_height != s->aspected_height) { /* H.263 could change picture size any time */ MPV_common_end(s); s->context_initialized=0; |