[FFmpeg-cvslog] r20090 - trunk/libavcodec/ac3dec.c
jbr
subversion
Wed Sep 30 03:25:05 CEST 2009
Author: jbr
Date: Wed Sep 30 03:25:04 2009
New Revision: 20090
Log:
Simplify stereo rematrixing by only using one temporary variable. It is also
about 1.8% faster on my system.
Modified:
trunk/libavcodec/ac3dec.c
Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c Wed Sep 30 03:09:57 2009 (r20089)
+++ trunk/libavcodec/ac3dec.c Wed Sep 30 03:25:04 2009 (r20090)
@@ -604,7 +604,6 @@ static void do_rematrixing(AC3DecodeCont
{
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(AC3DecodeCont
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];
}
}
}
More information about the ffmpeg-cvslog
mailing list