| Index: silk/resampler_down2_3.c
|
| diff --git a/silk/resampler_down2_3.c b/silk/resampler_down2_3.c
|
| index fe5b671d2bd611ac7cdd513ff056478646a51b96..4342614dcccc11348bf9e45c4e20691e19f69982 100644
|
| --- a/silk/resampler_down2_3.c
|
| +++ b/silk/resampler_down2_3.c
|
| @@ -8,11 +8,11 @@ this list of conditions and the following disclaimer.
|
| - Redistributions in binary form must reproduce the above copyright
|
| notice, this list of conditions and the following disclaimer in the
|
| documentation and/or other materials provided with the distribution.
|
| -- Neither the name of Internet Society, IETF or IETF Trust, nor the
|
| +- Neither the name of Internet Society, IETF or IETF Trust, nor the
|
| names of specific contributors, may be used to endorse or promote
|
| products derived from this software without specific prior written
|
| permission.
|
| -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
|
| +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
| @@ -31,6 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
| #include "SigProc_FIX.h"
|
| #include "resampler_private.h"
|
| +#include "stack_alloc.h"
|
|
|
| #define ORDER_FIR 4
|
|
|
| @@ -43,8 +44,11 @@ void silk_resampler_down2_3(
|
| )
|
| {
|
| opus_int32 nSamplesIn, counter, res_Q6;
|
| - opus_int32 buf[ RESAMPLER_MAX_BATCH_SIZE_IN + ORDER_FIR ];
|
| + VARDECL( opus_int32, buf );
|
| opus_int32 *buf_ptr;
|
| + SAVE_STACK;
|
| +
|
| + ALLOC( buf, RESAMPLER_MAX_BATCH_SIZE_IN + ORDER_FIR, opus_int32 );
|
|
|
| /* Copy buffered samples to start of buffer */
|
| silk_memcpy( buf, S, ORDER_FIR * sizeof( opus_int32 ) );
|
| @@ -95,4 +99,5 @@ void silk_resampler_down2_3(
|
|
|
| /* Copy last part of filtered signal to the state for the next call */
|
| silk_memcpy( S, &buf[ nSamplesIn ], ORDER_FIR * sizeof( opus_int32 ) );
|
| + RESTORE_STACK;
|
| }
|
|
|