From: drowe67 Date: Thu, 24 May 2012 22:34:26 +0000 (+0000) Subject: removed dynamic array allocation for MSVSC compat X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=e85df29e1ccf84001aadd420a584f3f8dcc9bc75;p=freetel-svn-tracking.git removed dynamic array allocation for MSVSC compat git-svn-id: https://svn.code.sf.net/p/freetel/code@489 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/quantise.c b/codec2-dev/src/quantise.c index 3032cbd5..81973a6d 100644 --- a/codec2-dev/src/quantise.c +++ b/codec2-dev/src/quantise.c @@ -461,8 +461,8 @@ int find_nearest_weighted(const float *codebook, int nb_entries, float *x, const void lspjvm_quantise(float *x, float *xq, int ndim) { int i, n1, n2, n3; - float err[ndim], err2[ndim], err3[ndim]; - float w[ndim], w2[ndim], w3[ndim]; + float err[LPC_ORD], err2[LPC_ORD], err3[LPC_ORD]; + float w[LPC_ORD], w2[LPC_ORD], w3[LPC_ORD]; const float *codebook1 = lsp_cbjvm[0].cb; const float *codebook2 = lsp_cbjvm[1].cb; const float *codebook3 = lsp_cbjvm[2].cb; @@ -498,18 +498,22 @@ void lspjvm_quantise(float *x, float *xq, int ndim) } } -void check_lsp_order(float lsp[], int lpc_order) +int check_lsp_order(float lsp[], int lpc_order) { int i; float tmp; + int swaps = 0; for(i=1; i