Skip to content
Snippets Groups Projects
Commit 594c4d8e authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Increase headroom to avoid overflow in silk_pitch_analysis_core()

parent 646fcc33
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0
/* Downscale input if necessary */
silk_sum_sqr_shift( &energy, &shift, frame_unscaled, frame_length );
shift += 2 - silk_CLZ32( energy ); /* at least one bit headroom */
shift += 3 - silk_CLZ32( energy ); /* at least two bits headroom */
ALLOC( frame_scaled, frame_length, opus_int16 );
if( shift > 0 ) {
shift = silk_RSHIFT( shift + 1, 1 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment