Fixed stereo regression introduced in 05686a5d6e
also another stereo bug fixed for static-array ncwrs64().
This commit is contained in:
parent
ac1e03d78e
commit
cc4d3dda74
2 changed files with 6 additions and 4 deletions
|
@ -285,6 +285,11 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
|
||||||
|
|
||||||
quant_energy(st->mode, bandE, st->oldBandE, &st->enc);
|
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) */
|
/* Check if we can safely use the pitch (i.e. effective gain isn't too high) */
|
||||||
if (curr_power + 1e5f < 10.f*pitch_power)
|
if (curr_power + 1e5f < 10.f*pitch_power)
|
||||||
{
|
{
|
||||||
|
@ -294,10 +299,7 @@ int celt_encode(CELTEncoder *st, celt_int16_t *pcm, unsigned char *compressed, i
|
||||||
normalise_bands(st->mode, P, bandEp);
|
normalise_bands(st->mode, P, bandEp);
|
||||||
|
|
||||||
if (C==2)
|
if (C==2)
|
||||||
{
|
|
||||||
stereo_mix(st->mode, X, bandE, 1);
|
|
||||||
stereo_mix(st->mode, P, bandE, 1);
|
stereo_mix(st->mode, P, bandE, 1);
|
||||||
}
|
|
||||||
/* Simulates intensity stereo */
|
/* Simulates intensity stereo */
|
||||||
//for (i=30;i<N*B;i++)
|
//for (i=30;i<N*B;i++)
|
||||||
// X[i*C+1] = P[i*C+1] = 0;
|
// X[i*C+1] = P[i*C+1] = 0;
|
||||||
|
|
|
@ -65,7 +65,7 @@ celt_uint32_t ncwrs(int _n,int _m){
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
celt_uint64_t ncwrs64(int _n,int _m){
|
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(_n<0||_m<0)return 0;
|
||||||
if(!c[_n][_m]){
|
if(!c[_n][_m]){
|
||||||
if(_m<=0)c[_n][_m]=1;
|
if(_m<=0)c[_n][_m]=1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue