ref: 6384196f763633ae028376517eba3347163f925c
parent: 4c27552b090ad686d078a1006186865d7eb27947
author: Jean-Marc Valin <[email protected]>
date: Fri May 21 06:44:11 EDT 2010
Moving code to quant_band()
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -696,6 +696,12 @@
for (j=0;j<N;j++)
Y[j] = MULT16_16_Q15(Y[j], side);
+ if (stereo)
+ {
+ stereo_band_mix(m, X, Y, bandE, 0, i, -1, N);
+ renormalise_vector(X, Q15ONE, N, 1);
+ renormalise_vector(Y, Q15ONE, N, 1);
+ }
}
}
@@ -753,13 +759,6 @@
quant_band(encode, m, i, X, Y, N, b, spread, norm+M*eBands[start], resynth, ec, &remaining_bits, LM, norm+M*eBands[i], bandE);
balance += pulses[i] + tell;
-
- if (resynth && _Y != NULL)
- {
- stereo_band_mix(m, X, Y, bandE, 0, i, -1, N);
- renormalise_vector(X, Q15ONE, N, 1);
- renormalise_vector(Y, Q15ONE, N, 1);
- }
}
RESTORE_STACK;
}