Commit 49979211 authored by Gregory Maxwell's avatar Gregory Maxwell Committed by Jean-Marc Valin
Browse files

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.
parent 32d5c2d6
......@@ -127,7 +127,6 @@ void silk_encode_indices(
/* 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 );
}
......
......@@ -48,6 +48,7 @@ void silk_process_NLSFs(
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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment