Mercurial > libavcodec.hg
comparison aac.c @ 9143:5001f33c30f3 libavcodec
AAC: hoist dependent gain lookup out of the loop
author | alexc |
---|---|
date | Thu, 05 Mar 2009 23:10:22 +0000 |
parents | 0e2f21d65473 |
children | 955835e2bc99 |
comparison
equal
deleted
inserted
replaced
9142:8b977d664424 | 9143:5001f33c30f3 |
---|---|
1432 return; | 1432 return; |
1433 } | 1433 } |
1434 for (g = 0; g < ics->num_window_groups; g++) { | 1434 for (g = 0; g < ics->num_window_groups; g++) { |
1435 for (i = 0; i < ics->max_sfb; i++, idx++) { | 1435 for (i = 0; i < ics->max_sfb; i++, idx++) { |
1436 if (cce->ch[0].band_type[idx] != ZERO_BT) { | 1436 if (cce->ch[0].band_type[idx] != ZERO_BT) { |
1437 const float gain = cce->coup.gain[index][idx]; | |
1437 for (group = 0; group < ics->group_len[g]; group++) { | 1438 for (group = 0; group < ics->group_len[g]; group++) { |
1438 for (k = offsets[i]; k < offsets[i+1]; k++) { | 1439 for (k = offsets[i]; k < offsets[i+1]; k++) { |
1439 // XXX dsputil-ize | 1440 // XXX dsputil-ize |
1440 dest[group*128+k] += cce->coup.gain[index][idx] * src[group*128+k]; | 1441 dest[group*128+k] += gain * src[group*128+k]; |
1441 } | 1442 } |
1442 } | 1443 } |
1443 } | 1444 } |
1444 } | 1445 } |
1445 dest += ics->group_len[g]*128; | 1446 dest += ics->group_len[g]*128; |