ref: 15588ad667556d6e100dbb6e381215a4bf50e10c
parent: 5a7d9b2c62323c4d77790493d2de580e0a659bad
author: Jean-Marc Valin <[email protected]>
date: Thu Apr 10 05:00:12 EDT 2008
Fixed a stereo regression introduced in e28f25f0d14959d521fda0cdb8f1220995bc50e8
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+- Fix channel order in intra prediction and folding
- Dynamic adjustment of energy quantisation
- Psychacoustics
* Error shaping within each band
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -311,9 +311,9 @@
/*printf ("%d %d ", sign, best);*/
ec_enc_bits(enc,sign,1);
if (max_pos == MAX_INTRA)
- ec_enc_bits(enc,best,LOG_MAX_INTRA);
+ ec_enc_bits(enc,best/B,LOG_MAX_INTRA);
else
- ec_enc_uint(enc,best,max_pos);
+ ec_enc_uint(enc,best/B,max_pos);
/*printf ("%d %f\n", best, best_score);*/
@@ -363,9 +363,9 @@
s = -1;
if (max_pos == MAX_INTRA)
- best = ec_dec_bits(dec, LOG_MAX_INTRA);
+ best = B*ec_dec_bits(dec, LOG_MAX_INTRA);
else
- best = ec_dec_uint(dec, max_pos);
+ best = B*ec_dec_uint(dec, max_pos);
/*printf ("%d %d ", sign, best);*/
if (K>10)