This should be less confusing for static analyzers
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 5 Nov 2013 02:16:00 +0000 (21:16 -0500)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 5 Nov 2013 02:16:00 +0000 (21:16 -0500)
Code behaviour is unchanged

silk/NLSF_del_dec_quant.c

index 4139e8f..504dbbd 100644 (file)
@@ -121,7 +121,7 @@ opus_int32 silk_NLSF_del_dec_quant(                             /* O    Returns
             RD_Q25[ j + nStates ] = silk_SMLABB( silk_MLA( RD_tmp_Q25, silk_SMULBB( diff_Q10, diff_Q10 ), w_Q5[ i ] ), mu_Q20, rate1_Q5 );
         }
 
-        if( nStates < NLSF_QUANT_DEL_DEC_STATES ) {
+        if( nStates <= ( NLSF_QUANT_DEL_DEC_STATES >> 1 ) ) {
             /* double number of states and copy */
             for( j = 0; j < nStates; j++ ) {
                 ind[ j + nStates ][ i ] = ind[ j ][ i ] + 1;