mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Add a rounding parameter to ff_acelp_lp_synthesis_filter()
Originally committed as revision 14028 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a6ce3d3d2d
commit
8a1c868ee6
@ -116,13 +116,14 @@ int ff_acelp_lp_synthesis_filter(
|
|||||||
const int16_t* in,
|
const int16_t* in,
|
||||||
int buffer_length,
|
int buffer_length,
|
||||||
int filter_length,
|
int filter_length,
|
||||||
int stop_on_overflow)
|
int stop_on_overflow,
|
||||||
|
int rounder)
|
||||||
{
|
{
|
||||||
int i,n;
|
int i,n;
|
||||||
|
|
||||||
for(n=0; n<buffer_length; n++)
|
for(n=0; n<buffer_length; n++)
|
||||||
{
|
{
|
||||||
int sum = 0x800;
|
int sum = rounder;
|
||||||
for(i=1; i<filter_length; i++)
|
for(i=1; i<filter_length; i++)
|
||||||
sum -= filter_coeffs[i] * out[n-i];
|
sum -= filter_coeffs[i] * out[n-i];
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ void ff_acelp_convolve_circ(
|
|||||||
* \param filter_length filter length (11 for 10th order LP filter)
|
* \param filter_length filter length (11 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)
|
||||||
*
|
*
|
||||||
* \return 1 if overflow occurred, 0 - otherwise
|
* \return 1 if overflow occurred, 0 - otherwise
|
||||||
*
|
*
|
||||||
@ -142,7 +143,8 @@ int ff_acelp_lp_synthesis_filter(
|
|||||||
const int16_t* in,
|
const int16_t* in,
|
||||||
int buffer_length,
|
int buffer_length,
|
||||||
int filter_length,
|
int filter_length,
|
||||||
int stop_on_overflow);
|
int stop_on_overflow,
|
||||||
|
int rounder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Calculates coefficients of weighted A(z/weight) filter.
|
* \brief Calculates coefficients of weighted A(z/weight) filter.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user