comparison h263dec.c @ 718:16dab8296293 libavcodec

fixing custom quantizer matrix decoding minor optimizations
author michaelni
date Wed, 02 Oct 2002 22:56:58 +0000
parents 6cba3b6196f0
children 25d7fb7c89be
comparison
equal deleted inserted replaced
717:6cba3b6196f0 718:16dab8296293
162 init_get_bits(&s->gb, s->bitstream_buffer, s->bitstream_buffer_size); 162 init_get_bits(&s->gb, s->bitstream_buffer, s->bitstream_buffer_size);
163 }else 163 }else
164 init_get_bits(&s->gb, buf, buf_size); 164 init_get_bits(&s->gb, buf, buf_size);
165 s->bitstream_buffer_size=0; 165 s->bitstream_buffer_size=0;
166 166
167 if (!s->context_initialized) {
168 if (MPV_common_init(s) < 0) //we need the idct permutaton for reading a custom matrix
169 return -1;
170 }
171
167 /* let's go :-) */ 172 /* let's go :-) */
168 if (s->h263_msmpeg4) { 173 if (s->h263_msmpeg4) {
169 ret = msmpeg4_decode_picture_header(s); 174 ret = msmpeg4_decode_picture_header(s);
170 } else if (s->h263_pred) { 175 } else if (s->h263_pred) {
171 ret = mpeg4_decode_picture_header(s); 176 ret = mpeg4_decode_picture_header(s);
186 191
187 /* After H263 & mpeg4 header decode we have the height, width,*/ 192 /* After H263 & mpeg4 header decode we have the height, width,*/
188 /* and other parameters. So then we could init the picture */ 193 /* and other parameters. So then we could init the picture */
189 /* FIXME: By the way H263 decoder is evolving it should have */ 194 /* FIXME: By the way H263 decoder is evolving it should have */
190 /* an H263EncContext */ 195 /* an H263EncContext */
191 if (s->width != avctx->width || s->height != avctx->height) { 196 if ( s->width != avctx->width || s->height != avctx->height
197 || avctx->aspect_ratio_info != s->aspect_ratio_info
198 || avctx->aspected_width != s->aspected_width
199 || avctx->aspected_height != s->aspected_height) {
192 /* H.263 could change picture size any time */ 200 /* H.263 could change picture size any time */
193 MPV_common_end(s); 201 MPV_common_end(s);
194 s->context_initialized=0; 202 s->context_initialized=0;
195 } 203 }
196 if (!s->context_initialized) { 204 if (!s->context_initialized) {