comparison mpeg12.c @ 1990:11991f81afd6 libavcodec

cola test
author iive
date Thu, 29 Apr 2004 23:20:46 +0000
parents b5753525f9a8
children 938e47c809b0
comparison
equal deleted inserted replaced
1989:be2386b2f201 1990:11991f81afd6
356 } 356 }
357 #endif //CONFIG_ENCODERS 357 #endif //CONFIG_ENCODERS
358 358
359 static void common_init(MpegEncContext *s) 359 static void common_init(MpegEncContext *s)
360 { 360 {
361 int i;
362 361
363 s->y_dc_scale_table= 362 s->y_dc_scale_table=
364 s->c_dc_scale_table= ff_mpeg1_dc_scale_table; 363 s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
365 364
366 if(!s->encoding)
367 for(i=0;i<64;i++)
368 s->dsp.idct_permutation[i]=i;
369 } 365 }
370 366
371 void ff_mpeg1_clean_buffers(MpegEncContext *s){ 367 void ff_mpeg1_clean_buffers(MpegEncContext *s){
372 s->last_dc[0] = 1 << (7 + s->intra_dc_precision); 368 s->last_dc[0] = 1 << (7 + s->intra_dc_precision);
373 s->last_dc[1] = s->last_dc[0]; 369 s->last_dc[1] = s->last_dc[0];
1761 1757
1762 static int mpeg_decode_init(AVCodecContext *avctx) 1758 static int mpeg_decode_init(AVCodecContext *avctx)
1763 { 1759 {
1764 Mpeg1Context *s = avctx->priv_data; 1760 Mpeg1Context *s = avctx->priv_data;
1765 MpegEncContext *s2 = &s->mpeg_enc_ctx; 1761 MpegEncContext *s2 = &s->mpeg_enc_ctx;
1766 1762 int i;
1763
1764 //we need some parmutation to store
1765 //matrixes, until MPV_common_init()
1766 //set the real permutatuon
1767 for(i=0;i<64;i++)
1768 s2->dsp.idct_permutation[i]=i;
1769
1767 MPV_decode_defaults(s2); 1770 MPV_decode_defaults(s2);
1768 1771
1769 s->mpeg_enc_ctx.avctx= avctx; 1772 s->mpeg_enc_ctx.avctx= avctx;
1770 s->mpeg_enc_ctx.flags= avctx->flags; 1773 s->mpeg_enc_ctx.flags= avctx->flags;
1771 s->mpeg_enc_ctx.flags2= avctx->flags2; 1774 s->mpeg_enc_ctx.flags2= avctx->flags2;