# HG changeset patch # User jbr # Date 1254273904 0 # Node ID 1f5c4d2ce77f3dd6a4868ce02307379fac5d4dae # Parent 6bca3f74d77d521e59f36d190bdb78f06dc76d53 Simplify stereo rematrixing by only using one temporary variable. It is also about 1.8% faster on my system. diff -r 6bca3f74d77d -r 1f5c4d2ce77f ac3dec.c --- a/ac3dec.c Wed Sep 30 01:09:57 2009 +0000 +++ b/ac3dec.c Wed Sep 30 01:25:04 2009 +0000 @@ -604,7 +604,6 @@ { int bnd, i; int end, bndend; - int tmp0, tmp1; end = FFMIN(s->end_freq[1], s->end_freq[2]); @@ -613,10 +612,9 @@ if(s->rematrixing_flags[bnd]) { bndend = FFMIN(end, ff_ac3_rematrix_band_tab[bnd+1]); for(; ifixed_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]; } } }