diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-24 02:16:15 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-03-27 15:13:27 -0400 |
commit | 7e3352ef517379c9ab42a2416b444882ff86aec6 (patch) | |
tree | 0d53c0120e5225689563dc4cf7cd1632df6cabbb /silk/NSQ.c | |
parent | 69bcb28d3ddb20231580bd09e44d87a769dabcb7 (diff) | |
download | opus-7e3352ef517379c9ab42a2416b444882ff86aec6.tar.gz |
Converting some silk_assert()s into hardening celt_assert()s
Only converted the ones that are really sure (not signal-dependent)
and that shouldn't add much run-time complexity
Diffstat (limited to 'silk/NSQ.c')
-rw-r--r-- | silk/NSQ.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -143,7 +143,7 @@ void silk_NSQ_c 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 ); @@ -247,7 +247,7 @@ void silk_noise_shape_quantizer( } /* Noise shape feedback */ - silk_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ + celt_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ n_AR_Q12 = silk_NSQ_noise_shape_feedback_loop(&NSQ->sDiff_shp_Q14, NSQ->sAR2_Q14, AR_shp_Q13, shapingLPCOrder, arch); n_AR_Q12 = silk_SMLAWB( n_AR_Q12, NSQ->sLF_AR_shp_Q14, Tilt_Q14 ); @@ -255,7 +255,7 @@ void silk_noise_shape_quantizer( n_LF_Q12 = silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 ); n_LF_Q12 = silk_SMLAWT( n_LF_Q12, NSQ->sLF_AR_shp_Q14, LF_shp_Q14 ); - silk_assert( lag > 0 || signalType != TYPE_VOICED ); + celt_assert( lag > 0 || signalType != TYPE_VOICED ); /* Combine prediction and noise shaping signals */ tmp1 = silk_SUB32( silk_LSHIFT32( LPC_pred_Q10, 2 ), n_AR_Q12 ); /* Q12 */ |