comparison mdec.c @ 7623:0bd920dcb7a5 libavcodec

Untangle mpeg12.c and mdec.c so that mdec.c can be compiled separately.
author diego
date Tue, 19 Aug 2008 20:52:26 +0000
parents a702d2a5892f
children 1d04f38681bd
comparison
equal deleted inserted replaced
7622:5a3907818652 7623:0bd920dcb7a5
28 */ 28 */
29 29
30 #include "avcodec.h" 30 #include "avcodec.h"
31 #include "dsputil.h" 31 #include "dsputil.h"
32 #include "mpegvideo.h" 32 #include "mpegvideo.h"
33 #include "mpeg12.h"
33 34
34 typedef struct MDECContext{ 35 typedef struct MDECContext{
35 AVCodecContext *avctx; 36 AVCodecContext *avctx;
36 DSPContext dsp; 37 DSPContext dsp;
37 AVFrame picture; 38 AVFrame picture;
221 static av_cold int decode_init(AVCodecContext *avctx){ 222 static av_cold int decode_init(AVCodecContext *avctx){
222 MDECContext * const a = avctx->priv_data; 223 MDECContext * const a = avctx->priv_data;
223 AVFrame *p= &a->picture; 224 AVFrame *p= &a->picture;
224 225
225 mdec_common_init(avctx); 226 mdec_common_init(avctx);
226 init_vlcs(); 227 ff_init_vlcs();
227 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct); 228 ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct);
228 229
229 p->qstride= a->mb_width; 230 p->qstride= a->mb_width;
230 p->qscale_table= av_mallocz( p->qstride * a->mb_height); 231 p->qscale_table= av_mallocz( p->qstride * a->mb_height);
231 avctx->pix_fmt= PIX_FMT_YUV420P; 232 avctx->pix_fmt= PIX_FMT_YUV420P;