aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-06-29 21:37:03 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-06-29 21:37:03 +0000
commitfe4a5b185fdb5a96c1c66018e113b5144b01f6f3 (patch)
treeea31510a01795968de41f2264eb5818fd28acc76
parentb83ff6c700a7aefaa54f5389f37f37bccc2d4ee1 (diff)
downloadffmpeg-fe4a5b185fdb5a96c1c66018e113b5144b01f6f3.tar.gz
Make ff_acelp_lp_synthesis_filter() receives a pointer to the actual filter coefficients and not the pointer minus one
Originally committed as revision 14031 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/acelp_filters.c4
-rw-r--r--libavcodec/acelp_filters.h2
-rw-r--r--libavcodec/ra144.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/acelp_filters.c b/libavcodec/acelp_filters.c
index fb52d0f8c9..6e5b1f46d7 100644
--- a/libavcodec/acelp_filters.c
+++ b/libavcodec/acelp_filters.c
@@ -121,6 +121,10 @@ int ff_acelp_lp_synthesis_filter(
{
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++)
{
int sum = rounder;
diff --git a/libavcodec/acelp_filters.h b/libavcodec/acelp_filters.h
index a21fc88a49..0f7ce2977f 100644
--- a/libavcodec/acelp_filters.h
+++ b/libavcodec/acelp_filters.h
@@ -125,7 +125,7 @@ void ff_acelp_convolve_circ(
* \param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000)
* \param in input signal
* \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
* 0 - ignore overflows
* \param rounder the amount to add for rounding (usually 0x800 or 0xfff)
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index a7164fdd28..0398b13ced 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -209,9 +209,9 @@ static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs,
BLOCKSIZE*sizeof(*ractx->curr_sblock));
if (ff_acelp_lp_synthesis_filter(
- ractx->curr_sblock + 10, lpc_coefs -1,
+ ractx->curr_sblock + 10, lpc_coefs,
ractx->curr_sblock + 10, BLOCKSIZE,
- 11, 1, 0xfff)
+ 10, 1, 0xfff)
)
memset(ractx->curr_sblock, 0, 50*sizeof(*ractx->curr_sblock));
}