aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-09-30 01:25:04 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-09-30 01:25:04 +0000
commit2ed4439658971fd238c02102bd24906aad4caf6b (patch)
treee10a4a1041c3ffc1e2490a27bee0d8cf6997d04d /libavcodec
parent16c91d2b233fe04697ba8f7ab6d1bad12a4ad69f (diff)
downloadffmpeg-2ed4439658971fd238c02102bd24906aad4caf6b.tar.gz
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
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3dec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index dd97d116cd..91b82cfa7d 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -604,7 +604,6 @@ static void do_rematrixing(AC3DecodeContext *s)
{
int bnd, i;
int end, bndend;
- int tmp0, tmp1;
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]) {
bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]);
for(; i<bndend; i++) {
- tmp0 = s->fixed_coeffs[1][i];
- tmp1 = s->fixed_coeffs[2][i];
- s->fixed_coeffs[1][i] = tmp0 + tmp1;
- s->fixed_coeffs[2][i] = tmp0 - tmp1;
+ int tmp0 = s->fixed_coeffs[1][i];
+ s->fixed_coeffs[1][i] -= s->fixed_coeffs[2][i];
+ s->fixed_coeffs[2][i] = tmp0 - s->fixed_coeffs[2][i];
}
}
}