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

Fixes valgrind failure caused by silk_find_pred_coefs_*()

The function copies NLSFs from the stack to the state which for
order 10 means we were copying uninitialized values. That in turn
breaks check-asm when comparing the state under valgrind.

Reviewed by Timothy B. Terriberry.
parent d7d4b348
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ void silk_find_pred_coefs_FIX(
{
opus_int i;
opus_int32 invGains_Q16[ MAX_NB_SUBFR ], local_gains[ MAX_NB_SUBFR ];
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ];
/* Set to NLSF_Q15 to zero so we don't copy junk to the state. */
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ]={0};
const opus_int16 *x_ptr;
opus_int16 *x_pre_ptr;
VARDECL( opus_int16, LPC_in_pre );
......
......@@ -44,7 +44,8 @@ void silk_find_pred_coefs_FLP(
silk_float XXLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ];
silk_float xXLTP[ MAX_NB_SUBFR * LTP_ORDER ];
silk_float invGains[ MAX_NB_SUBFR ];
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ];
/* Set to NLSF_Q15 to zero so we don't copy junk to the state. */
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ]={0};
const silk_float *x_ptr;
silk_float *x_pre_ptr, LPC_in_pre[ MAX_NB_SUBFR * MAX_LPC_ORDER + MAX_FRAME_LENGTH ];
silk_float minInvGain;
......
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