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 | |
20 | void pp3dec( |
21 | short idx, |
22 | Float *b); |
23 | |
24 | void 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 | |
33 | void 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 | |
42 | void Autocor( |
43 | Float *r, /* (o) : Autocorrelations */ |
44 | Float *x, /* (i) : Input signal */ |
45 | Float *window, /* (i) : LPC Analysis window */ |
46 | int l_window,/* (i) : window length */ |
47 | int m); /* (i) : LPC order */ |
48 | |
49 | void Levinson( |
50 | Float *r, /* (i): autocorrelation coefficients */ |
51 | Float *a, /* (o): LPC coefficients */ |
52 | Float *old_a, /* (i/o): LPC coefficients of previous frame */ |
53 | int m); /* (i): LPC order */ |
54 | |
55 | void a2lsp( |
56 | Float pc[], /* (i) input the np+1 predictor coeff. */ |
57 | Float lsp[], /* (o) line spectral pairs */ |
58 | Float old_lsp[]); /* (i/o) old lsp[] (in case not found 10 roots) */ |
59 | |
60 | void lsp2a( |
61 | Float *lsp, /* (i) LSP vector */ |
62 | Float *a); /* (o) LPC coefficients */ |
63 | |
64 | void stblz_lsp(Float *lsp, int order); |
65 | int stblchck(Float *x, int vdim); |
66 | |
67 | /* LPC to LSP Conversion */ |
68 | extern Float grid[]; |
69 | |
70 | /* LPC bandwidth expansion */ |
71 | extern Float bwel[]; |
72 | |
73 | /* LPC WEIGHTING FILTER */ |
74 | extern 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 | |
85 | extern Float pp9cb[]; |
86 | |
87 | #endif /* BVCOMMON_H */ |
88 | |
89 |