ref: 636f5c86abfc06184dc7027daa76d5f288c63a42
parent: cab576ec9b4451954bc318e37412a14b74c1cee7
author: Jean-Marc Valin <[email protected]>
date: Tue Feb 12 12:40:27 EST 2008
bit of cleaning up
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -359,8 +359,8 @@
}
}
- if (ec_enc_tell(&st->enc, 0) < nbCompressedBytes*8 - 8)
- celt_warning_int ("too make unused bits", nbCompressedBytes*8-ec_enc_tell(&st->enc, 0));
+ if (ec_enc_tell(&st->enc, 0) < nbCompressedBytes*8 - 16)
+ celt_warning_int ("many unused bits: ", nbCompressedBytes*8-ec_enc_tell(&st->enc, 0));
//printf ("%d\n", ec_enc_tell(&st->enc, 0)-8*nbCompressedBytes);
/* Finishing the stream with a 0101... pattern so that the decoder can check is everything's right */
{
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -159,18 +159,16 @@
ny[id] = tmp_ny;
iny[id] = tmp_iny;
-
+
nxy[id] = tmp_xy;
nyy[id] = tmp_yy;
nyp[id] = tmp_yp;
gain[id] = g;
for (n=0;n<N;n++)
- ny[id][n] = y[m][n];
+ ny[id][n] = y[m][n] - alpha*s*p[j]*p[n];
ny[id][j] += s;
+
for (n=0;n<N;n++)
- ny[id][n] -= alpha*s*p[j]*p[n];
-
- for (n=0;n<N;n++)
iny[id][n] = iy[m][n];
if (s>0)
iny[id][j] += pulsesAtOnce;
@@ -178,9 +176,9 @@
iny[id][j] -= pulsesAtOnce;
best_scores[id] = score;
}
- }
+ }
}
-
+
}
int k;
for (k=0;k<Lupdate;k++)
@@ -226,7 +224,8 @@
ec_enc_uint64(enc,icwrs64(N, K, comb, signs),ncwrs64(N, K));
//printf ("%llu ", icwrs64(N, K, comb, signs));
/* Recompute the gain in one pass to reduce the encoder-decoder mismatch
- due to the recursive computation used in quantisation */
+ due to the recursive computation used in quantisation.
+ Not quite sure whether we need that or not */
if (1) {
float Ryp=0;
float Rpp=0;