Another bunch of C99 array conversions (few more to go)

This commit is contained in:
Jean-Marc Valin 2008-02-20 13:43:40 +11:00
parent d3b86e5347
commit 0bb05bc5ea
8 changed files with 80 additions and 48 deletions

View file

@ -36,6 +36,7 @@
#include "quant_pitch.h"
#include <math.h>
#include "pgain_table.h"
#include "arch.h"
/* Taken from Speex.
Finds the index of the entry in a codebook that best matches the input*/
@ -64,7 +65,8 @@ int vq_index(float *in, const float *codebook, int len, int entries)
int quant_pitch(float *gains, int len, ec_enc *enc)
{
int i, id;
float g2[len];
VARDECL(float *g2);
ALLOC(g2, len, float);
/*for (i=0;i<len;i++) printf ("%f ", gains[i]);printf ("\n");*/
for (i=0;i<len;i++)
g2[i] = 1-sqrt(1-gains[i]*gains[i]);