changeset 1990:11991f81afd6 libavcodec

cola test
author iive
date Thu, 29 Apr 2004 23:20:46 +0000
parents be2386b2f201
children fa09319b80af
files mpeg12.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Thu Apr 29 22:12:29 2004 +0000
+++ b/mpeg12.c	Thu Apr 29 23:20:46 2004 +0000
@@ -358,14 +358,10 @@
 
 static void common_init(MpegEncContext *s)
 {
-int i;
 
     s->y_dc_scale_table=
     s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
 
-    if(!s->encoding)    
-    for(i=0;i<64;i++)
-       s->dsp.idct_permutation[i]=i;
 }
 
 void ff_mpeg1_clean_buffers(MpegEncContext *s){
@@ -1763,7 +1759,14 @@
 {
     Mpeg1Context *s = avctx->priv_data;
     MpegEncContext *s2 = &s->mpeg_enc_ctx;
+    int i;
     
+    //we need some parmutation to store
+    //matrixes, until MPV_common_init()
+    //set the real permutatuon 
+    for(i=0;i<64;i++)
+       s2->dsp.idct_permutation[i]=i;
+
     MPV_decode_defaults(s2);
     
     s->mpeg_enc_ctx.avctx= avctx;