mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 10:29:39 +00:00
Rearrange loop structure for approx. 35-50% faster calc_transform_coeffs_cpl()
depending on content. Originally committed as revision 20055 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e96f885aa0
commit
8b11b44ea7
@ -416,17 +416,22 @@ static void calc_transform_coeffs_cpl(AC3DecodeContext *s)
|
|||||||
|
|
||||||
bin = s->start_freq[CPL_CH];
|
bin = s->start_freq[CPL_CH];
|
||||||
for (band = 0; band < s->num_cpl_bands; band++) {
|
for (band = 0; band < s->num_cpl_bands; band++) {
|
||||||
|
int band_start = bin;
|
||||||
int band_end = bin + s->cpl_band_sizes[band];
|
int band_end = bin + s->cpl_band_sizes[band];
|
||||||
for (; bin < band_end; bin++) {
|
for (ch = 1; ch <= s->fbw_channels; ch++) {
|
||||||
for (ch = 1; ch <= s->fbw_channels; ch++) {
|
if (s->channel_in_cpl[ch]) {
|
||||||
if (s->channel_in_cpl[ch]) {
|
int64_t cpl_coord = s->cpl_coords[ch][band];
|
||||||
|
for (bin = band_start; bin < band_end; bin++) {
|
||||||
s->fixed_coeffs[ch][bin] = ((int64_t)s->fixed_coeffs[CPL_CH][bin] *
|
s->fixed_coeffs[ch][bin] = ((int64_t)s->fixed_coeffs[CPL_CH][bin] *
|
||||||
(int64_t)s->cpl_coords[ch][band]) >> 23;
|
cpl_coord) >> 23;
|
||||||
if (ch == 2 && s->phase_flags[band])
|
}
|
||||||
s->fixed_coeffs[ch][bin] = -s->fixed_coeffs[ch][bin];
|
if (ch == 2 && s->phase_flags[band]) {
|
||||||
|
for (bin = band_start; bin < band_end; bin++)
|
||||||
|
s->fixed_coeffs[2][bin] = -s->fixed_coeffs[2][bin];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bin = band_end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user