Use const to better allow the compiler to optimize AAC independent coupling.

Originally committed as revision 17598 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Alex Converse 16 years ago
parent 5fe2a515f8
commit 039821a838
  1. 7
      libavcodec/aac.c

@ -1456,8 +1456,13 @@ static void apply_dependent_coupling(AACContext * ac, SingleChannelElement * tar
*/ */
static void apply_independent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) { static void apply_independent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) {
int i; int i;
const float gain = cce->coup.gain[index][0];
const float bias = ac->add_bias;
const float* src = cce->ch[0].ret;
float* dest = target->ret;
for (i = 0; i < 1024; i++) for (i = 0; i < 1024; i++)
target->ret[i] += cce->coup.gain[index][0] * (cce->ch[0].ret[i] - ac->add_bias); dest[i] += gain * (src[i] - bias);
} }
/** /**

Loading…
Cancel
Save