comparison ppc/mpegvideo_altivec.c @ 5963:80103098c797 libavcodec

spelling
author vitor
date Sat, 01 Dec 2007 22:21:04 +0000
parents 72b59f7613af
children 80c7e9c015c6
comparison
equal deleted inserted replaced
5962:a6c9aa23d379 5963:80103098c797
78 { 78 {
79 int lastNonZero; 79 int lastNonZero;
80 vector float row0, row1, row2, row3, row4, row5, row6, row7; 80 vector float row0, row1, row2, row3, row4, row5, row6, row7;
81 vector float alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7; 81 vector float alt0, alt1, alt2, alt3, alt4, alt5, alt6, alt7;
82 const vector float zero = (const vector float)FOUROF(0.); 82 const vector float zero = (const vector float)FOUROF(0.);
83 // used after quantise step 83 // used after quantize step
84 int oldBaseValue = 0; 84 int oldBaseValue = 0;
85 85
86 // Load the data into the row/alt vectors 86 // Load the data into the row/alt vectors
87 { 87 {
88 vector signed short data0, data1, data2, data3, data4, data5, data6, data7; 88 vector signed short data0, data1, data2, data3, data4, data5, data6, data7;
256 TRANSPOSE4(alt4, alt5, alt6, alt7); 256 TRANSPOSE4(alt4, alt5, alt6, alt7);
257 } 257 }
258 } 258 }
259 } 259 }
260 260
261 // perform the quantise step, using the floating point data 261 // perform the quantize step, using the floating point data
262 // still in the row/alt registers 262 // still in the row/alt registers
263 { 263 {
264 const int* biasAddr; 264 const int* biasAddr;
265 const vector signed int* qmat; 265 const vector signed int* qmat;
266 vector float bias, negBias; 266 vector float bias, negBias;
472 472
473 // Divide by 8, rounding the result 473 // Divide by 8, rounding the result
474 data[0] = (oldBaseValue + 4) >> 3; 474 data[0] = (oldBaseValue + 4) >> 3;
475 } 475 }
476 476
477 // We handled the tranpose permutation above and we don't 477 // We handled the transpose permutation above and we don't
478 // need to permute the "no" permutation case. 478 // need to permute the "no" permutation case.
479 if ((lastNonZero > 0) && 479 if ((lastNonZero > 0) &&
480 (s->dsp.idct_permutation_type != FF_TRANSPOSE_IDCT_PERM) && 480 (s->dsp.idct_permutation_type != FF_TRANSPOSE_IDCT_PERM) &&
481 (s->dsp.idct_permutation_type != FF_NO_IDCT_PERM)) 481 (s->dsp.idct_permutation_type != FF_NO_IDCT_PERM))
482 { 482 {