diff mpegvideo.c @ 312:8cf5507e6ca5 libavcodec

mpeg4 mpeg quantizer support
author michaelni
date Sun, 07 Apr 2002 02:03:32 +0000
parents ac677a84d5df
children 40d8092e2ff0
line wrap: on
line diff
--- a/mpegvideo.c	Sat Apr 06 22:29:37 2002 +0000
+++ b/mpegvideo.c	Sun Apr 07 02:03:32 2002 +0000
@@ -110,14 +110,18 @@
     int c_size, i;
     UINT8 *pict;
 
-    if (s->out_format == FMT_H263) 
-        s->dct_unquantize = dct_unquantize_h263_c;
-    else
-        s->dct_unquantize = dct_unquantize_mpeg1_c;
+    s->dct_unquantize_h263 = dct_unquantize_h263_c;
+    s->dct_unquantize_mpeg = dct_unquantize_mpeg1_c;
         
 #ifdef HAVE_MMX
     MPV_common_init_mmx(s);
 #endif
+    //setup default unquantizers (mpeg4 might change it later)
+    if(s->out_format == FMT_H263)
+        s->dct_unquantize = s->dct_unquantize_h263;
+    else
+        s->dct_unquantize = s->dct_unquantize_mpeg;
+    
     s->mb_width = (s->width + 15) / 16;
     s->mb_height = (s->height + 15) / 16;
     s->mb_num = s->mb_width * s->mb_height;