From: alexc Date: Thu, 26 Feb 2009 01:50:00 +0000 (+0000) Subject: Use const to better allow the compiler to optimize AAC independent coupling. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/commitdiff_plain/fb4ea1d04f251514748ebd1837313136872f0f81 Use const to better allow the compiler to optimize AAC independent coupling. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17598 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- diff --git a/libavcodec/aac.c b/libavcodec/aac.c index 311dd69cc..ca21e0209 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); } /**