From: Alex Converse 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-Tag: v0.5~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=039821a8388316e0c82a83f23e7d38327f514442;p=platform%2Fupstream%2Flibav.git Use const to better allow the compiler to optimize AAC independent coupling. Originally committed as revision 17598 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/aac.c b/libavcodec/aac.c index 311dd69..ca21e02 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); } /**