Mercurial > libavcodec.hg
diff i386/mpegvideo_mmx_template.c @ 635:3e0f62e5eed6 libavcodec
dct cleanup
more accurate mmx dct (dont discard bits for fun)
fixing mmx quantizer bug for qscale%2==1 (bias was slightly wrong)
author | michaelni |
---|---|
date | Sun, 01 Sep 2002 16:52:33 +0000 |
parents | bb6a69f9d409 |
children | eaa9ef2e2557 |
line wrap: on
line diff
--- a/i386/mpegvideo_mmx_template.c Sun Sep 01 14:30:55 2002 +0000 +++ b/i386/mpegvideo_mmx_template.c Sun Sep 01 16:52:33 2002 +0000 @@ -46,9 +46,9 @@ 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 @@ #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;