# HG changeset patch # User vitor # Date 1214251542 0 # Node ID 6ee204e8d9aea9c7e3bdb80eecd178a5097f0b2c # Parent a17b3a67a71987c5dc61cf3b847d074fc95cc071 Move code unrelated to lpc filtering out of lpc_filter() diff -r a17b3a67a719 -r 6ee204e8d9ae ra144.c --- a/ra144.c Mon Jun 23 19:59:42 2008 +0000 +++ b/ra144.c Mon Jun 23 20:05:42 2008 +0000 @@ -136,15 +136,11 @@ dest[i] = ((*(s1++))*v[0] + (*(s2++))*v[1] + (*(s3++))*v[2]) >> 12; } -static void lpc_filter(const int16_t *lpc_coefs, const int16_t *adapt_coef, - uint16_t *statbuf, int len) +static void lpc_filter(const int16_t *lpc_coefs, uint16_t *statbuf, int len) { int x, i; int16_t *ptr = statbuf; - memcpy(statbuf, statbuf + 40, 20); - memcpy(statbuf + 10, adapt_coef, len * 2); - for (i=0; icurr_sblock, BLOCKSIZE); + memcpy(ractx->curr_sblock, ractx->curr_sblock + 40, + 10*sizeof(*ractx->curr_sblock)); + memcpy(ractx->curr_sblock + 10, block, + BLOCKSIZE*sizeof(*ractx->curr_sblock)); + + lpc_filter(lpc_coefs, ractx->curr_sblock, BLOCKSIZE); } static void int_to_int16(int16_t *out, const int *inp)