From 60decf5aa97c266c27944c28ab2030bf6961ee16 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Thu, 1 Mar 2012 20:21:50 +0000 Subject: [PATCH] at JVMs suggestion did BWE after energy calculation, that fixed problem git-svn-id: https://svn.code.sf.net/p/freetel/code@337 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/src/quantise.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codec2-dev/src/quantise.c b/codec2-dev/src/quantise.c index d18a3e3a..4c031100 100644 --- a/codec2-dev/src/quantise.c +++ b/codec2-dev/src/quantise.c @@ -863,6 +863,14 @@ float speech_to_uq_lsps(float lsp[], for(i=0; i<=order; i++) E += ak[i]*R[i]; + /* 15 Hz BW expansion as I can't hear the difference and it may help + help occasional fails in the LSP root finding. Important to do this + after energy caluclation to avoid -ve energy values. + */ + + for(i=0; i<=order; i++) + ak[i] *= pow(0.994,(float)i); + roots = lpc_to_lsp(ak, order, lsp, 5, LSP_DELTA1); if (roots != order) { /* use some benign LSP values we can use instead */ -- 2.25.1