ref: cc4d3dda74eea53f1e48a3e7e74aa981fb98216a
parent: ac1e03d78ed89eb0bbe03d1f4f35911c8ed2a3dc
author: Jean-Marc Valin <[email protected]>
date: Tue Feb 12 19:08:29 EST 2008
Fixed stereo regression introduced in 05686a5d6e366d3a067c39f1b8567def7baa450d also another stereo bug fixed for static-array ncwrs64().
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -285,6 +285,11 @@
quant_energy(st->mode, bandE, st->oldBandE, &st->enc);
+ if (C==2)
+ {
+ stereo_mix(st->mode, X, bandE, 1);
+ }
+
/* Check if we can safely use the pitch (i.e. effective gain isn't too high) */
if (curr_power + 1e5f < 10.f*pitch_power)
{
@@ -294,10 +299,7 @@
normalise_bands(st->mode, P, bandEp);
if (C==2)
- {
- stereo_mix(st->mode, X, bandE, 1);
stereo_mix(st->mode, P, bandE, 1);
- }
/* Simulates intensity stereo */
//for (i=30;i<N*B;i++)
// X[i*C+1] = P[i*C+1] = 0;
--- a/libcelt/cwrs.c
+++ b/libcelt/cwrs.c
@@ -65,7 +65,7 @@
#if 0
celt_uint64_t ncwrs64(int _n,int _m){
- static celt_uint64_t c[100][100];
+ static celt_uint64_t c[101][101];
if(_n<0||_m<0)return 0;
if(!c[_n][_m]){
if(_m<=0)c[_n][_m]=1;