Commit bebeac61 authored by vitor's avatar vitor

Make ff_acelp_lp_synthesis_filter() receives a pointer to the actual filter...

Make ff_acelp_lp_synthesis_filter() receives a pointer to the actual filter coefficients and not the pointer minus one

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14031 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f15eb440
...@@ -121,6 +121,10 @@ int ff_acelp_lp_synthesis_filter( ...@@ -121,6 +121,10 @@ int ff_acelp_lp_synthesis_filter(
{ {
int i,n; int i,n;
// These two lines are two avoid a -1 subtraction in the main loop
filter_length++;
filter_coeffs--;
for(n=0; n<buffer_length; n++) for(n=0; n<buffer_length; n++)
{ {
int sum = rounder; int sum = rounder;
......
...@@ -125,7 +125,7 @@ void ff_acelp_convolve_circ( ...@@ -125,7 +125,7 @@ void ff_acelp_convolve_circ(
* \param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000) * \param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000)
* \param in input signal * \param in input signal
* \param buffer_length amount of data to process * \param buffer_length amount of data to process
* \param filter_length filter length (11 for 10th order LP filter) * \param filter_length filter length (10 for 10th order LP filter)
* \param stop_on_overflow 1 - return immediately if overflow occurs * \param stop_on_overflow 1 - return immediately if overflow occurs
* 0 - ignore overflows * 0 - ignore overflows
* \param rounder the amount to add for rounding (usually 0x800 or 0xfff) * \param rounder the amount to add for rounding (usually 0x800 or 0xfff)
......
...@@ -209,9 +209,9 @@ static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs, ...@@ -209,9 +209,9 @@ static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs,
BLOCKSIZE*sizeof(*ractx->curr_sblock)); BLOCKSIZE*sizeof(*ractx->curr_sblock));
if (ff_acelp_lp_synthesis_filter( if (ff_acelp_lp_synthesis_filter(
ractx->curr_sblock + 10, lpc_coefs -1, ractx->curr_sblock + 10, lpc_coefs,
ractx->curr_sblock + 10, BLOCKSIZE, ractx->curr_sblock + 10, BLOCKSIZE,
11, 1, 0xfff) 10, 1, 0xfff)
) )
memset(ractx->curr_sblock, 0, 50*sizeof(*ractx->curr_sblock)); memset(ractx->curr_sblock, 0, 50*sizeof(*ractx->curr_sblock));
} }
......
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