comparison 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
comparison
equal deleted inserted replaced
634:be1cb0e1f276 635:3e0f62e5eed6
44 fdct_mmx (block); //cant be anything else ... 44 fdct_mmx (block); //cant be anything else ...
45 45
46 if (s->mb_intra) { 46 if (s->mb_intra) {
47 int dummy; 47 int dummy;
48 if (n < 4) 48 if (n < 4)
49 q = s->y_dc_scale; 49 q = s->y_dc_scale<<3;
50 else 50 else
51 q = s->c_dc_scale; 51 q = s->c_dc_scale<<3;
52 /* note: block[0] is assumed to be positive */ 52 /* note: block[0] is assumed to be positive */
53 if (!s->h263_aic) { 53 if (!s->h263_aic) {
54 #if 1 54 #if 1
55 asm volatile ( 55 asm volatile (
56 "xorl %%edx, %%edx \n\t" 56 "xorl %%edx, %%edx \n\t"
68 : "%edx" 68 : "%edx"
69 ); 69 );
70 #endif 70 #endif
71 } else 71 } else
72 /* For AIC we skip quant/dequant of INTRADC */ 72 /* For AIC we skip quant/dequant of INTRADC */
73 level = block[0]; 73 level = block[0]>>3;
74 74
75 block[0]=0; //avoid fake overflow 75 block[0]=0; //avoid fake overflow
76 // temp_block[0] = (block[0] + (q >> 1)) / q; 76 // temp_block[0] = (block[0] + (q >> 1)) / q;
77 last_non_zero_p1 = 1; 77 last_non_zero_p1 = 1;
78 bias = s->q_intra_matrix16_bias[qscale]; 78 bias = s->q_intra_matrix16_bias[qscale];