I built the codec and ran under valgrind on a linux pc. I see occasional uninitialised memory errors in lpc_to_lsp()
If I zero the freq[i] data at the start of the loop this warning goes away, but I don't know if this also breaks the encoding. The uninitialised data could be copied from somewhere else : the error occurs at the "freq[i] = acosf(freq[i]);" stage.
diff --git a/src/lsp.c b/src/lsp.c
index aa7bac3..fcb33e5 100644
--- a/src/lsp.c
+++ b/src/lsp.c
@@ -184,6 +184,7 @@ int lpc_to_lsp(float *a, int order, float freq, int nb, float delta)
xl = 1.0; / start at point xl = 1 */
for (j = 0; j < order; j++) {
+// freq[j] = 0;
if (j % 2) /* determines whether P' or Q' is eval. */
pt = qx;
else
I built the codec and ran under valgrind on a linux pc. I see occasional uninitialised memory errors in lpc_to_lsp()
If I zero the freq[i] data at the start of the loop this warning goes away, but I don't know if this also breaks the encoding. The uninitialised data could be copied from somewhere else : the error occurs at the "freq[i] = acosf(freq[i]);" stage.
diff --git a/src/lsp.c b/src/lsp.c
index aa7bac3..fcb33e5 100644
--- a/src/lsp.c
+++ b/src/lsp.c
@@ -184,6 +184,7 @@ int lpc_to_lsp(float *a, int order, float freq, int nb, float delta)
xl = 1.0; / start at point xl = 1 */
for (j = 0; j < order; j++) {
+// freq[j] = 0;
if (j % 2) /* determines whether P' or Q' is eval. */
pt = qx;
else