aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-04-07 02:03:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-04-07 02:03:32 +0000
commit3bf43d42eda38abd5b75d004e1431d71aacfbe48 (patch)
tree125b6236234e228bfa5646155d59f9148e89ae9c /libavcodec/mpegvideo.c
parente1a9dbffed0b9d087d9f062ee61c493dd262caba (diff)
downloadffmpeg-3bf43d42eda38abd5b75d004e1431d71aacfbe48.tar.gz
mpeg4 mpeg quantizer support
Originally committed as revision 381 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f35483e3a1..417c63ea63 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -110,14 +110,18 @@ int MPV_common_init(MpegEncContext *s)
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;