aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aac.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-02-26 01:50:00 +0000
committerAlex Converse <alex.converse@gmail.com>2009-02-26 01:50:00 +0000
commit039821a8388316e0c82a83f23e7d38327f514442 (patch)
tree021c027b407ce982955b247e9eb5e56936842747 /libavcodec/aac.c
parent5fe2a515f81d5e5ddb21e966aaf97e8010cb78e2 (diff)
downloadffmpeg-039821a8388316e0c82a83f23e7d38327f514442.tar.gz
Use const to better allow the compiler to optimize AAC independent coupling.
Originally committed as revision 17598 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac.c')
-rw-r--r--libavcodec/aac.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/aac.c b/libavcodec/aac.c
index 311dd69cc5..ca21e0209d 100644
--- a/libavcodec/aac.c
+++ b/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) {
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++)
- target->ret[i] += cce->coup.gain[index][0] * (cce->ch[0].ret[i] - ac->add_bias);
+ dest[i] += gain * (src[i] - bias);
}
/**