diff options
author | jbuethe <jbuethe@amazon.de> | 2023-03-07 11:06:44 +0000 |
---|---|---|
committer | jbuethe <jbuethe@amazon.de> | 2023-03-07 11:06:44 +0000 |
commit | ac521d6d542f2a37ae494bb74bb8a456a9652125 (patch) | |
tree | e73dc2619fd0bef8f1ac40f26d6fe67588089848 | |
parent | 67ed5ef051a92dc2be6d1e5300203f62575f15bb (diff) | |
download | opus-ac521d6d542f2a37ae494bb74bb8a456a9652125.tar.gz |
padding lpc coefficients when order is < 16
-rw-r--r-- | silk/decode_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/silk/decode_core.c b/silk/decode_core.c index d0499c62..93810122 100644 --- a/silk/decode_core.c +++ b/silk/decode_core.c @@ -130,6 +130,7 @@ void silk_decode_core( { float tmp; int16_t itmp; + float lpc_buffer[16] = {0}; /* gain */ tmp = (float) psDecCtrl->Gains_Q16[k] / (1UL << 16); @@ -138,9 +139,9 @@ void silk_decode_core( /* LPC */ for (i = 0; i < psDec->LPC_order; i++) { - tmp = (float) A_Q12[i] / (1U << 12); - fwrite(&tmp, sizeof(tmp), 1, flpc); + lpc_buffer[i] = (float) A_Q12[i] / (1U << 12); } + fwrite(lpc_buffer, sizeof(lpc_buffer[0]), 16, flpc); /* LTP */ for (i = 0; i < 5; i++) |