mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
Simplify stereo rematrixing by only using one temporary variable. It is also
about 1.8% faster on my system. Originally committed as revision 20090 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
16c91d2b23
commit
2ed4439658
@ -604,7 +604,6 @@ static void do_rematrixing(AC3DecodeContext *s)
|
|||||||
{
|
{
|
||||||
int bnd, i;
|
int bnd, i;
|
||||||
int end, bndend;
|
int end, bndend;
|
||||||
int tmp0, tmp1;
|
|
||||||
|
|
||||||
end = FFMIN(s->end_freq[1], s->end_freq[2]);
|
end = FFMIN(s->end_freq[1], s->end_freq[2]);
|
||||||
|
|
||||||
@ -613,10 +612,9 @@ static void do_rematrixing(AC3DecodeContext *s)
|
|||||||
if(s->rematrixing_flags[bnd]) {
|
if(s->rematrixing_flags[bnd]) {
|
||||||
bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]);
|
bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]);
|
||||||
for(; i<bndend; i++) {
|
for(; i<bndend; i++) {
|
||||||
tmp0 = s->fixed_coeffs[1][i];
|
int tmp0 = s->fixed_coeffs[1][i];
|
||||||
tmp1 = s->fixed_coeffs[2][i];
|
s->fixed_coeffs[1][i] -= s->fixed_coeffs[2][i];
|
||||||
s->fixed_coeffs[1][i] = tmp0 + tmp1;
|
s->fixed_coeffs[2][i] = tmp0 - s->fixed_coeffs[2][i];
|
||||||
s->fixed_coeffs[2][i] = tmp0 - tmp1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user