diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-26 12:54:38 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-27 15:13:27 -0400 |
commit | 2b249dda9a184188dc713043bdc9a367e9d1c034 (patch) | |
tree | 43a8b7292e647c65d8088ec1d3ef8494358d7bba /silk | |
parent | 909f1ceb5dae0f6ba0ebb16958f0819124b95d90 (diff) | |
download | libopus-2b249dda9a184188dc713043bdc9a367e9d1c034.tar.gz |
Harden SILK x86 code
Diffstat (limited to 'silk')
-rw-r--r-- | silk/fixed/x86/burg_modified_FIX_sse4_1.c | 2 | ||||
-rw-r--r-- | silk/fixed/x86/prefilter_FIX_sse.c | 4 | ||||
-rw-r--r-- | silk/x86/NSQ_del_dec_sse4_1.c | 4 | ||||
-rw-r--r-- | silk/x86/NSQ_sse4_1.c | 2 | ||||
-rw-r--r-- | silk/x86/VAD_sse4_1.c | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/silk/fixed/x86/burg_modified_FIX_sse4_1.c b/silk/fixed/x86/burg_modified_FIX_sse4_1.c index 3c3583c5..bbb1ce0f 100644 --- a/silk/fixed/x86/burg_modified_FIX_sse4_1.c +++ b/silk/fixed/x86/burg_modified_FIX_sse4_1.c @@ -72,7 +72,7 @@ void silk_burg_modified_sse4_1( __m128i FIRST_3210, LAST_3210, ATMP_3210, TMP1_3210, TMP2_3210, T1_3210, T2_3210, PTR_3210, SUBFR_3210, X1_3210, X2_3210; __m128i CONST1 = _mm_set1_epi32(1); - silk_assert( subfr_length * nb_subfr <= MAX_FRAME_SIZE ); + celt_assert( subfr_length * nb_subfr <= MAX_FRAME_SIZE ); /* Compute autocorrelations, added over subframes */ silk_sum_sqr_shift( &C0, &rshifts, x, nb_subfr * subfr_length ); diff --git a/silk/fixed/x86/prefilter_FIX_sse.c b/silk/fixed/x86/prefilter_FIX_sse.c index d8c9c2f5..555432cd 100644 --- a/silk/fixed/x86/prefilter_FIX_sse.c +++ b/silk/fixed/x86/prefilter_FIX_sse.c @@ -49,7 +49,7 @@ void silk_warped_LPC_analysis_filter_FIX_sse4_1( opus_int32 acc_Q11, tmp1, tmp2; /* Order must be even */ - silk_assert( ( order & 1 ) == 0 ); + celt_assert( ( order & 1 ) == 0 ); if (order == 10) { @@ -65,7 +65,7 @@ void silk_warped_LPC_analysis_filter_FIX_sse4_1( register opus_int32 state_8, state_9, state_a; register opus_int64 coef_Q13_8, coef_Q13_9; - silk_assert( length > 0 ); + celt_assert( length > 0 ); coef_Q13_3210 = OP_CVTEPI16_EPI32_M64( &coef_Q13[ 0 ] ); coef_Q13_7654 = OP_CVTEPI16_EPI32_M64( &coef_Q13[ 4 ] ); diff --git a/silk/x86/NSQ_del_dec_sse4_1.c b/silk/x86/NSQ_del_dec_sse4_1.c index c5212bee..2c75ede2 100644 --- a/silk/x86/NSQ_del_dec_sse4_1.c +++ b/silk/x86/NSQ_del_dec_sse4_1.c @@ -247,7 +247,7 @@ void silk_NSQ_del_dec_sse4_1( /* Rewhiten with new A coefs */ start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2; - silk_assert( start_idx > 0 ); + celt_assert( start_idx > 0 ); silk_LPC_analysis_filter( &sLTP[ start_idx ], &NSQ->xq[ start_idx + k * psEncC->subfr_length ], A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder, psEncC->arch ); @@ -353,7 +353,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( __m128i b_Q12_0123, b_sr_Q12_0123; SAVE_STACK; - silk_assert( nStatesDelayedDecision > 0 ); + celt_assert( nStatesDelayedDecision > 0 ); ALLOC( psSampleState, nStatesDelayedDecision, NSQ_sample_pair ); shp_lag_ptr = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ]; diff --git a/silk/x86/NSQ_sse4_1.c b/silk/x86/NSQ_sse4_1.c index 6a9e6e96..b0315e35 100644 --- a/silk/x86/NSQ_sse4_1.c +++ b/silk/x86/NSQ_sse4_1.c @@ -199,7 +199,7 @@ void silk_NSQ_sse4_1( if( ( k & ( 3 - silk_LSHIFT( LSF_interpolation_flag, 1 ) ) ) == 0 ) { /* Rewhiten with new A coefs */ start_idx = psEncC->ltp_mem_length - lag - psEncC->predictLPCOrder - LTP_ORDER / 2; - silk_assert( start_idx > 0 ); + celt_assert( start_idx > 0 ); silk_LPC_analysis_filter( &sLTP[ start_idx ], &NSQ->xq[ start_idx + k * psEncC->subfr_length ], A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder, psEncC->arch ); diff --git a/silk/x86/VAD_sse4_1.c b/silk/x86/VAD_sse4_1.c index 4e90f441..d02ddf4a 100644 --- a/silk/x86/VAD_sse4_1.c +++ b/silk/x86/VAD_sse4_1.c @@ -65,9 +65,9 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s /* Safety checks */ silk_assert( VAD_N_BANDS == 4 ); - silk_assert( MAX_FRAME_LENGTH >= psEncC->frame_length ); - silk_assert( psEncC->frame_length <= 512 ); - silk_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) ); + celt_assert( MAX_FRAME_LENGTH >= psEncC->frame_length ); + celt_assert( psEncC->frame_length <= 512 ); + celt_assert( psEncC->frame_length == 8 * silk_RSHIFT( psEncC->frame_length, 3 ) ); /***********************/ /* Filter and Decimate */ |