move dct_quantize and denoise_dct function pointers initialization to C
authorBenoit Fouet <benoit.fouet@free.fr>
Wed, 20 Jun 2007 11:01:50 +0000 (11:01 +0000)
committerBenoit Fouet <benoit.fouet@free.fr>
Wed, 20 Jun 2007 11:01:50 +0000 (11:01 +0000)
functions after arch dependant initializations

Originally committed as revision 9375 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpegvideo.c

index 70ef18fba9a8187b79323529c5a60e926ec0c8bd..9233ff3258307d623a035c47fd720097f832d2cd 100644 (file)
@@ -271,11 +271,6 @@ int DCT_common_init(MpegEncContext *s)
         s->dct_unquantize_mpeg2_intra = dct_unquantize_mpeg2_intra_bitexact;
     s->dct_unquantize_mpeg2_inter = dct_unquantize_mpeg2_inter_c;
 
-#ifdef CONFIG_ENCODERS
-    s->dct_quantize= dct_quantize_c;
-    s->denoise_dct= denoise_dct_c;
-#endif //CONFIG_ENCODERS
-
 #if defined(HAVE_MMX)
     MPV_common_init_mmx(s);
 #elif defined(ARCH_ALPHA)
@@ -293,6 +288,10 @@ int DCT_common_init(MpegEncContext *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){