]> git.sesse.net Git - ffmpeg/commitdiff
move mpeg encoder specific initialization in the encoder specific file
authorAurelien Jacobs <aurel@gnuage.org>
Thu, 5 Jul 2007 09:48:29 +0000 (09:48 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Thu, 5 Jul 2007 09:48:29 +0000 (09:48 +0000)
Originally committed as revision 9480 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c

index c71a96a342a441bc893f0b10ed335ed925309a87..34fa8910aa599ec9c23fccc1d83a038731e4bb14 100644 (file)
@@ -162,19 +162,6 @@ int DCT_common_init(MpegEncContext *s)
     MPV_common_init_bfin(s);
 #endif
 
-#ifdef CONFIG_ENCODERS
-    if(!s->dct_quantize)
-        s->dct_quantize= dct_quantize_c;
-    if(!s->denoise_dct)
-        s->denoise_dct= denoise_dct_c;
-    s->fast_dct_quantize= s->dct_quantize;
-
-    if(s->flags&CODEC_FLAG_TRELLIS_QUANT){
-        s->dct_quantize= dct_quantize_trellis_c; //move before MPV_common_init_*
-    }
-
-#endif //CONFIG_ENCODERS
-
     /* load & permutate scantables
        note: only wmv uses different ones
     */
index 5cd2e91752ad4f7ebf1856603e0737afdf51b9b5..204a51cbbbfb1532b6181a94188d1d49198f84b0 100644 (file)
@@ -660,6 +660,14 @@ int MPV_encode_init(AVCodecContext *avctx)
     if (MPV_common_init(s) < 0)
         return -1;
 
+    if(!s->dct_quantize)
+        s->dct_quantize = dct_quantize_c;
+    if(!s->denoise_dct)
+        s->denoise_dct = denoise_dct_c;
+    s->fast_dct_quantize = s->dct_quantize;
+    if(s->flags & CODEC_FLAG_TRELLIS_QUANT)
+        s->dct_quantize = dct_quantize_trellis_c;
+
     if(s->modified_quant)
         s->chroma_qscale_table= ff_h263_chroma_qscale_table;
     s->progressive_frame=