summaryrefslogtreecommitdiff
path: root/rcaudio/bvcommon.h (plain)
blob: a5f809be38e5af9b3a23f72eb6557fc9b3ba4774
1/*****************************************************************************/
2/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */
3/* Revision Date: October 5, 2012 */
4/* Version 1.2 */
5/*****************************************************************************/
6
7
8/*****************************************************************************
9 bvcommon.h : Common #defines and prototypes
10
11 $Log$
12******************************************************************************/
13
14#ifndef BVCOMMON_H
15#define BVCOMMON_H
16
17/* Function Prototypes */
18
19
20void pp3dec(
21short idx,
22Float *b);
23
24void apfilter(
25 Float *a, /* (i) a[m+1] prediction coefficients (m=10) */
26 int m, /* (i) LPC order */
27 Float *x, /* (i) input signal */
28 Float *y, /* (o) output signal */
29 int lg, /* (i) size of filtering */
30 Float *mem, /* (i/o) input memory */
31 short update);/* (i) flag for memory update */
32
33void azfilter(
34 Float *a, /* (i) prediction coefficients */
35 int m, /* (i) LPC order */
36 Float *x, /* (i) input signal vector */
37 Float *y, /* (o) output signal vector */
38 int lg, /* (i) size of filtering */
39 Float *mem, /* (i/o) filter memory before filtering */
40 short update); /* (i) flag for memory update */
41
42void Autocor(
43Float *r, /* (o) : Autocorrelations */
44Float *x, /* (i) : Input signal */
45Float *window, /* (i) : LPC Analysis window */
46int l_window,/* (i) : window length */
47int m); /* (i) : LPC order */
48
49void Levinson(
50Float *r, /* (i): autocorrelation coefficients */
51Float *a, /* (o): LPC coefficients */
52Float *old_a, /* (i/o): LPC coefficients of previous frame */
53int m); /* (i): LPC order */
54
55void a2lsp(
56Float pc[], /* (i) input the np+1 predictor coeff. */
57Float lsp[], /* (o) line spectral pairs */
58Float old_lsp[]); /* (i/o) old lsp[] (in case not found 10 roots) */
59
60void lsp2a(
61Float *lsp, /* (i) LSP vector */
62Float *a); /* (o) LPC coefficients */
63
64void stblz_lsp(Float *lsp, int order);
65int stblchck(Float *x, int vdim);
66
67/* LPC to LSP Conversion */
68extern Float grid[];
69
70/* LPC bandwidth expansion */
71extern Float bwel[];
72
73/* LPC WEIGHTING FILTER */
74extern Float STWAL[];
75
76/* ----- Basic Codec Parameters ----- */
77#define LPCO 8 /* LPC Order */
78#define Ngrd 60 /* LPC to LSP Conversion */
79
80#define LSPMIN 0.00150f /* minimum lsp frequency, 6/12 Hz for BV16/BV32 */
81#define LSPMAX 0.99775f /* maximum lsp frequency, 3991/7982 Hz for BV16/BV32 */
82#define DLSPMIN 0.01250f /* minimum lsp spacing, 50/100 Hz for BV16/BV32 */
83#define STBLDIM 3 /* dimension of stability enforcement */
84
85extern Float pp9cb[];
86
87#endif /* BVCOMMON_H */
88
89