diff options
author | Gregory Maxwell <greg@xiph.org> | 2011-09-28 17:09:23 -0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2011-09-28 17:14:42 -0400 |
commit | fc8b605c1712a9b64b587835dde75920e0df71c6 (patch) | |
tree | c962983e510df73239a8b8339d2f91002e6a8898 /silk/ana_filt_bank_1.c | |
parent | 59647fdb655bf6dc363c155b23bc817d195dc17d (diff) | |
download | opus-fc8b605c1712a9b64b587835dde75920e0df71c6.tar.gz |
Eliminate signed overflow in constant, minor makefile.draft updates.
Diffstat (limited to 'silk/ana_filt_bank_1.c')
-rw-r--r-- | silk/ana_filt_bank_1.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/silk/ana_filt_bank_1.c b/silk/ana_filt_bank_1.c index 3cca817a..a3f93fbf 100644 --- a/silk/ana_filt_bank_1.c +++ b/silk/ana_filt_bank_1.c @@ -32,9 +32,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" /* Coefficients for 2-band filter bank based on first-order allpass filters */ -/* old*/ -static opus_int16 A_fb1_20[ 1 ] = { 5394 << 1 }; -static opus_int16 A_fb1_21[ 1 ] = { 20623 << 1 }; /* wrap-around to negative number is intentional */ +static opus_int16 A_fb1_20 = 5394 << 1; +static opus_int16 A_fb1_21 = -24290; /* (opus_int16)(20623 << 1) */ /* Split signal into two decimated bands using first-order allpass filters */ void silk_ana_filt_bank_1( @@ -55,7 +54,7 @@ void silk_ana_filt_bank_1( /* All-pass section for even input sample */ Y = silk_SUB32( in32, S[ 0 ] ); - X = silk_SMLAWB( Y, Y, A_fb1_21[ 0 ] ); + X = silk_SMLAWB( Y, Y, A_fb1_21 ); out_1 = silk_ADD32( S[ 0 ], X ); S[ 0 ] = silk_ADD32( in32, X ); @@ -64,7 +63,7 @@ void silk_ana_filt_bank_1( /* All-pass section for odd input sample, and add to output of previous section */ Y = silk_SUB32( in32, S[ 1 ] ); - X = silk_SMULWB( Y, A_fb1_20[ 0 ] ); + X = silk_SMULWB( Y, A_fb1_20 ); out_2 = silk_ADD32( S[ 1 ], X ); S[ 1 ] = silk_ADD32( in32, X ); |