tabledesign.h 1.29 KB
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <audiofile.h>
#include <stdlib.h>

#define TINY            1e-10

#define DEFAULT_FSIZE   16      /* Larger frame makes things quicker */
#define DEFAULT_ORDER   2
#define DEFAULT_THRESH  10.0
#define DEFAULT_SIZE    2
#define DEFAULT_REFINE  2

#define VECTORSIZE      8
#define VSCALE          2048
#define MINCOEF         -32768
#define MAXCOEF         32767

/* In estimate.c */
void acf(short *sig, int len, double *ac, int nlags);
int durbin(double *ac, int order, double *ref, double *taps, double *e2);
void afromk(double *ref, double *taps, int order);
int kfroma(double *taps, double *ref, int order);
void rfroma(double *a, int n, double *r);
double model_dist(double *ta, double *sa, int order);
int lud(double **a, int n, int *indx, int *d);
void lubksb(double **a, int n, int *indx, double b[]);
void acmat(short *in_buffer, int order, int length, double **a);
void acvect(short *in_buffer, int order, int length, double *a);


/* In codebook.c */
void split(double **codebook, double *dir, int order, int n_entries, double delta);
void refine(double **codebook, int order, int n_entries, double **training, int nframes,
            int iterations, double converge);

/* In print.c */
int print_entry(FILE *op, double *entry, int order);