comparison aac.c @ 9051:0cffed11ee33 libavcodec

Use const to better allow the compiler to optimize AAC independent coupling.
author alexc
date Thu, 26 Feb 2009 01:50:00 +0000
parents 70ea65c17597
children 54973ad4b7cf
comparison
equal deleted inserted replaced
9050:9653d4585183 9051:0cffed11ee33
1454 * 1454 *
1455 * @param index index into coupling gain array 1455 * @param index index into coupling gain array
1456 */ 1456 */
1457 static void apply_independent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) { 1457 static void apply_independent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) {
1458 int i; 1458 int i;
1459 const float gain = cce->coup.gain[index][0];
1460 const float bias = ac->add_bias;
1461 const float* src = cce->ch[0].ret;
1462 float* dest = target->ret;
1463
1459 for (i = 0; i < 1024; i++) 1464 for (i = 0; i < 1024; i++)
1460 target->ret[i] += cce->coup.gain[index][0] * (cce->ch[0].ret[i] - ac->add_bias); 1465 dest[i] += gain * (src[i] - bias);
1461 } 1466 }
1462 1467
1463 /** 1468 /**
1464 * channel coupling transformation interface 1469 * channel coupling transformation interface
1465 * 1470 *