ref: 49979211180d4ceef59146405f5685d550323677
parent: 32d5c2d6d4f7ea22a2e59649e6f26c376d9dfbe0
author: Gregory Maxwell <[email protected]>
date: Tue Oct 4 14:26:33 EDT 2011
Move useInterpolatedNLSFs assert from encode_indices.c to silk/process_NLSFs.c. There were assert failures for test cases with mode switching and LBRR enabled. (some similar problems remain) Tim identified that the assert was falsely firing while encoding LBRR frames but the flag doesn't matter while encoding the bitstream it only actually matters in silk/process_NLSFs.c.
--- a/silk/encode_indices.c
+++ b/silk/encode_indices.c
@@ -127,7 +127,6 @@
/* Encode NLSF interpolation factor */
if( psEncC->nb_subfr == MAX_NB_SUBFR ) {
- silk_assert( psEncC->useInterpolatedNLSFs == 1 || psIndices->NLSFInterpCoef_Q2 == ( 1 << 2 ) );
silk_assert( psIndices->NLSFInterpCoef_Q2 >= 0 && psIndices->NLSFInterpCoef_Q2 < 5 );
ec_enc_icdf( psRangeEnc, psIndices->NLSFInterpCoef_Q2, silk_NLSF_interpolation_factor_iCDF, 8 );
}
--- a/silk/process_NLSFs.c
+++ b/silk/process_NLSFs.c
@@ -48,6 +48,7 @@
silk_assert( psEncC->speech_activity_Q8 >= 0 );
silk_assert( psEncC->speech_activity_Q8 <= SILK_FIX_CONST( 1.0, 8 ) );
+ silk_assert( psEncC->useInterpolatedNLSFs == 1 || psEncC->indices.NLSFInterpCoef_Q2 == ( 1 << 2 ) );
/***********************/
/* Calculate mu values */