diff options
author | Jean-Marc Valin <jean-marc.valin@octasic.com> | 2008-09-19 19:50:50 +0400 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@octasic.com> | 2008-09-19 19:50:50 +0400 |
commit | b4ce40cb5542d4a6d643458411ccba86e13c3b61 (patch) | |
tree | 5968227845bae0bdfaf9a15cfe5d1fc147564dec | |
parent | abf5c8ed64b7e59a434ed0f35babe61579242d20 (diff) |
Fixing the manual stack handling code
-rw-r--r-- | libcelt/celt.c | 2 | ||||
-rw-r--r-- | libcelt/quant_bands.c | 4 | ||||
-rw-r--r-- | tests/cwrs32-test.c | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/libcelt/celt.c b/libcelt/celt.c index 0354b2c..02399e7 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -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); diff --git a/libcelt/quant_bands.c b/libcelt/quant_bands.c index 4a7e493..8aa912f 100644 --- a/libcelt/quant_bands.c +++ b/libcelt/quant_bands.c @@ -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; } } diff --git a/tests/cwrs32-test.c b/tests/cwrs32-test.c index 6b193e3..9b6aa97 100644 --- a/tests/cwrs32-test.c +++ b/tests/cwrs32-test.c @@ -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); |