Commit b4ce40cb authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fixing the manual stack handling code

parent abf5c8ed
......@@ -670,6 +670,7 @@ int celt_encode_float(CELTEncoder * restrict st, float * restrict pcm, unsigned
int j, ret;
const int C = CHANNELS(st->mode);
const int N = st->block_size;
VARDECL(celt_int16_t, in);
ALLOC(in, C*N, celt_int16_t);
for (j=0;j<C*N;j++)
......@@ -1027,6 +1028,7 @@ int celt_decode_float(CELTDecoder * restrict st, unsigned char *data, int len, f
int j, ret;
const int C = CHANNELS(st->mode);
const int N = st->block_size;
VARDECL(celt_int16_t, out);
ALLOC(out, C*N, celt_int16_t);
ret=celt_decode(st, data, len, out);
......
......@@ -259,8 +259,8 @@ void quant_coarse_energy(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *
for (i=0;i<m->nbEBands;i++)
E[i] = eBands[C*i+c];
quant_coarse_energy_mono(m, E, oldEBands+c*m->nbEBands, budget/C, prob, error+c*m->nbEBands, enc);
RESTORE_STACK;
}
RESTORE_STACK;
}
}
......@@ -284,8 +284,8 @@ void quant_fine_energy(const CELTMode *m, celt_ener_t *eBands, celt_word16_t *ol
quant_fine_energy_mono(m, E, oldEBands+c*m->nbEBands, error+c*m->nbEBands, fine_quant, enc);
for (i=0;i<m->nbEBands;i++)
eBands[C*i+c] = E[i];
RESTORE_STACK;
}
RESTORE_STACK;
}
}
......
......@@ -24,7 +24,6 @@ int main(int _argc,char **_argv){
celt_uint32_t u[NMAX>MMAX+2?NMAX:MMAX+2];
int y[NMAX];
celt_uint32_t v;
int k;
memcpy(u,uu,n*sizeof(*u));
cwrsi32(n,m,i,nc,y,u);
/*printf("%6u of %u:",i,nc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment