Stereo decoding working again (fixed a few issues in the encoder at the same
time)
diff --git a/libcelt/vq.c b/libcelt/vq.c
index 9dbb108..e380900 100644
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -188,8 +188,9 @@
pulse2comb(N, K, comb, signs, iy[0]);
ec_enc_uint64(enc,icwrs64(N, K, comb, signs),ncwrs64(N, K));
- /* Recompute the gain in one pass (to reduce errors) */
- if (0) {
+ /* Recompute the gain in one pass to reduce the encoder-decoder mismatch
+ due to the recursive computation used in quantisation */
+ if (1) {
float Ryp=0;
float Rpp=0;
float Ryy=0;
@@ -203,7 +204,6 @@
for (i=0;i<N;i++)
y[0][i] = iy[0][i] - alpha*Ryp*p[i];
- /* Recompute after the projection (I think it's right) */
Ryp = 0;
for (i=0;i<N;i++)
Ryp += y[0][i]*p[i];