diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-09-01 16:52:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-09-01 16:52:33 +0000 |
commit | ad324c93515ca4acb43f5973ba67861213ff584d (patch) | |
tree | a542e7b37f7a8a4283a28959258b68196b38c783 /libavcodec/i386/mpegvideo_mmx_template.c | |
parent | 6b791538b90b95624e4d7b30743b409f3ee64997 (diff) | |
download | ffmpeg-ad324c93515ca4acb43f5973ba67861213ff584d.tar.gz |
dct cleanup
more accurate mmx dct (dont discard bits for fun)
fixing mmx quantizer bug for qscale%2==1 (bias was slightly wrong)
Originally committed as revision 895 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/mpegvideo_mmx_template.c')
-rw-r--r-- | libavcodec/i386/mpegvideo_mmx_template.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/i386/mpegvideo_mmx_template.c b/libavcodec/i386/mpegvideo_mmx_template.c index 6c3e52ea5f..185baaa420 100644 --- a/libavcodec/i386/mpegvideo_mmx_template.c +++ b/libavcodec/i386/mpegvideo_mmx_template.c @@ -46,9 +46,9 @@ static int RENAME(dct_quantize)(MpegEncContext *s, if (s->mb_intra) { int dummy; if (n < 4) - q = s->y_dc_scale; + q = s->y_dc_scale<<3; else - q = s->c_dc_scale; + q = s->c_dc_scale<<3; /* note: block[0] is assumed to be positive */ if (!s->h263_aic) { #if 1 @@ -70,7 +70,7 @@ static int RENAME(dct_quantize)(MpegEncContext *s, #endif } else /* For AIC we skip quant/dequant of INTRADC */ - level = block[0]; + level = block[0]>>3; block[0]=0; //avoid fake overflow // temp_block[0] = (block[0] + (q >> 1)) / q; |