Commit 5d7b0366 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Prevents more than 10 LSBs from being decoded

parent 59a93ab1
......@@ -67,7 +67,9 @@ void silk_decode_pulses(
/* LSB indication */
while( sum_pulses[ i ] == MAX_PULSES + 1 ) {
nLshifts[ i ]++;
sum_pulses[ i ] = ec_dec_icdf( psRangeDec, silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 );
/* When we've already got 10 LSBs, we shift the table to not allow (MAX_PULSES + 1) */
sum_pulses[ i ] = ec_dec_icdf( psRangeDec,
silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1] + (nLshifts[ i ]==10), 8 );
}
}
......
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