[FFmpeg-soc] [soc]: r5021 - als/alsdec.c
thilo.borgmann
subversion at mplayerhq.hu
Mon Aug 10 02:41:27 CEST 2009
Author: thilo.borgmann
Date: Mon Aug 10 02:41:26 2009
New Revision: 5021
Log:
Added reconstruction of normal signal after joint-stereo prediction.
Modified:
als/alsdec.c
Modified: als/alsdec.c
==============================================================================
--- als/alsdec.c Mon Aug 10 02:12:50 2009 (r5020)
+++ als/alsdec.c Mon Aug 10 02:41:26 2009 (r5021)
@@ -631,6 +631,20 @@ static int read_block_data(ALSDecContext
raw_samples[smp] = res[smp] - (y >> 20);
}
+
+ // reconstruct normal signal (joint-stereo)
+ if (*js_blocks & 1 && raw_other) {
+ int i;
+ if (raw_other > raw_samples) { // L = R - D
+ for (i = -1; i >= -sconf->max_order; i--) {
+ raw_samples[i] = raw_other[i] - raw_samples[i];
+ }
+ } else { // R = D + L
+ for (i = -1; i >= -sconf->max_order; i--) {
+ raw_samples[i] = raw_samples[i] + raw_other[i];
+ }
+ }
+ }
}
}
More information about the FFmpeg-soc
mailing list