diff options
author | SzuWei Lin <szuweilin@google.com> | 2019-12-23 18:43:15 +0800 |
---|---|---|
committer | SzuWei Lin <szuweilin@google.com> | 2019-12-23 18:43:15 +0800 |
commit | 07719d9fcbff51738527be625de9a76a487d94a3 (patch) | |
tree | 86b5889aa7313f85d3477fb94ac88ca3d707f528 | |
parent | f52454f858828fddd6b45b478ed4081dadcc8ac4 (diff) | |
parent | 9c311310c6b1c7ef18fad78572670c7486fc65dc (diff) | |
download | libopus-android10-gsi.tar.gz |
Merge branch android10-qpr1-releaseandroid10-gsi
Change-Id: I878671322c0532c8e6082bac19b96e02dcf270a9
-rw-r--r-- | silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c b/silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c index ee06f986..99d5754c 100644 --- a/silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c +++ b/silk/fixed/arm/warped_autocorrelation_FIX_neon_intr.c @@ -84,7 +84,9 @@ void silk_warped_autocorrelation_FIX_neon( silk_assert( ( order & 1 ) == 0 ); silk_assert( 2 * QS - QC >= 0 ); - ALLOC( input_QST, length + 2 * MAX_SHAPE_LPC_ORDER, opus_int32 ); + /* The additional +4 is to ensure a later vld1q_s32 call does not overflow. */ + /* Strictly, only +3 is needed but +4 simplifies initialization using the 4x32 neon load. */ + ALLOC( input_QST, length + 2 * MAX_SHAPE_LPC_ORDER + 4, opus_int32 ); input_QS = input_QST; /* input_QS has zero paddings in the beginning and end. */ @@ -121,6 +123,8 @@ void silk_warped_autocorrelation_FIX_neon( vst1q_s32( input_QS, vdupq_n_s32( 0 ) ); input_QS += 4; vst1q_s32( input_QS, vdupq_n_s32( 0 ) ); + input_QS += 4; + vst1q_s32( input_QS, vdupq_n_s32( 0 ) ); input_QS = input_QST + MAX_SHAPE_LPC_ORDER - orderT; /* The following loop runs ( length + order ) times, with ( order ) extra epilogues. */ @@ -153,7 +157,8 @@ void silk_warped_autocorrelation_FIX_neon( opus_int o = orderT; int32x4_t state_QS_s32x4[ 3 ][ 2 ]; - ALLOC( state, length + orderT, opus_int32 ); + /* The additional +4 is to ensure a later vld1q_s32 call does not overflow. */ + ALLOC( state, length + order + 4, opus_int32 ); state_QS_s32x4[ 2 ][ 1 ] = vdupq_n_s32( 0 ); /* Calculate 8 taps of all inputs in each loop. */ |