comparison ppc/mpegvideo_altivec.c @ 2979:bfabfdf9ce55 libavcodec

COSMETICS: tabs --> spaces, some prettyprinting
author diego
date Thu, 22 Dec 2005 01:10:11 +0000
parents ef2149182f1c
children 0b546eab515d
comparison
equal deleted inserted replaced
2978:403183bbb505 2979:bfabfdf9ce55
150 row7 = vec_ctf(vec_unpackh(data7), 0); 150 row7 = vec_ctf(vec_unpackh(data7), 0);
151 alt7 = vec_ctf(vec_unpackl(data7), 0); 151 alt7 = vec_ctf(vec_unpackl(data7), 0);
152 } 152 }
153 153
154 // The following block could exist as a separate an altivec dct 154 // The following block could exist as a separate an altivec dct
155 // function. However, if we put it inline, the DCT data can remain 155 // function. However, if we put it inline, the DCT data can remain
156 // in the vector local variables, as floats, which we'll use during the 156 // in the vector local variables, as floats, which we'll use during the
157 // quantize step... 157 // quantize step...
158 { 158 {
159 const vector float vec_0_298631336 = (vector float)FOUROF(0.298631336f); 159 const vector float vec_0_298631336 = (vector float)FOUROF(0.298631336f);
160 const vector float vec_0_390180644 = (vector float)FOUROF(-0.390180644f); 160 const vector float vec_0_390180644 = (vector float)FOUROF(-0.390180644f);
161 const vector float vec_0_541196100 = (vector float)FOUROF(0.541196100f); 161 const vector float vec_0_541196100 = (vector float)FOUROF(0.541196100f);
162 const vector float vec_0_765366865 = (vector float)FOUROF(0.765366865f); 162 const vector float vec_0_765366865 = (vector float)FOUROF(0.765366865f);
204 204
205 // z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); 205 // z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
206 z1 = vec_madd(vec_add(tmp12, tmp13), vec_0_541196100, (vector float)zero); 206 z1 = vec_madd(vec_add(tmp12, tmp13), vec_0_541196100, (vector float)zero);
207 207
208 // dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), 208 // dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
209 // CONST_BITS-PASS1_BITS); 209 // CONST_BITS-PASS1_BITS);
210 row2 = vec_madd(tmp13, vec_0_765366865, z1); 210 row2 = vec_madd(tmp13, vec_0_765366865, z1);
211 211
212 // dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), 212 // dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
213 // CONST_BITS-PASS1_BITS); 213 // CONST_BITS-PASS1_BITS);
214 row6 = vec_madd(tmp12, vec_1_847759065, z1); 214 row6 = vec_madd(tmp12, vec_1_847759065, z1);
215 215
216 z1 = vec_add(tmp4, tmp7); // z1 = tmp4 + tmp7; 216 z1 = vec_add(tmp4, tmp7); // z1 = tmp4 + tmp7;
217 z2 = vec_add(tmp5, tmp6); // z2 = tmp5 + tmp6; 217 z2 = vec_add(tmp5, tmp6); // z2 = tmp5 + tmp6;
218 z3 = vec_add(tmp4, tmp6); // z3 = tmp4 + tmp6; 218 z3 = vec_add(tmp4, tmp6); // z3 = tmp4 + tmp6;
313 qmat = (vector signed int*)s->q_inter_matrix[qscale]; 313 qmat = (vector signed int*)s->q_inter_matrix[qscale];
314 biasAddr = &(s->inter_quant_bias); 314 biasAddr = &(s->inter_quant_bias);
315 } 315 }
316 316
317 // Load the bias vector (We add 0.5 to the bias so that we're 317 // Load the bias vector (We add 0.5 to the bias so that we're
318 // rounding when we convert to int, instead of flooring.) 318 // rounding when we convert to int, instead of flooring.)
319 { 319 {
320 vector signed int biasInt; 320 vector signed int biasInt;
321 const vector float negOneFloat = (vector float)FOUROF(-1.0f); 321 const vector float negOneFloat = (vector float)FOUROF(-1.0f);
322 LOAD4(biasInt, biasAddr); 322 LOAD4(biasInt, biasAddr);
323 bias = vec_ctf(biasInt, QUANT_BIAS_SHIFT); 323 bias = vec_ctf(biasInt, QUANT_BIAS_SHIFT);