|
libg722_1
0.0.1
|
00001 /* 00002 * broadvoice - a library for the BroadVoice 16 and 32 codecs 00003 * 00004 * bv32externs.h - 00005 * 00006 * Adapted by Steve Underwood <steveu@coppice.org> from code which is 00007 * Copyright 2000-2009 Broadcom Corporation 00008 * 00009 * All rights reserved. 00010 * 00011 * This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU Lesser General Public License version 2.1, 00013 * as published by the Free Software Foundation. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00023 * 00024 * $Id: bv32externs.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $ 00025 */ 00026 00027 #include "typedef.h" 00028 #include "bv32cnst.h" 00029 #include "bvcommon.h" 00030 00031 /* Pointers */ 00032 extern const Float bv32_winl[]; 00033 extern const Float bv32_sstwin[]; 00034 extern const int bv32_idxord[]; 00035 extern const Float bv32_hpfa[]; 00036 extern const Float bv32_hpfb[]; 00037 extern const Float bv32_adf[]; 00038 extern const Float bv32_bdf[]; 00039 extern const Float bv32_x[]; 00040 extern const Float bv32_x2[]; 00041 extern Float bv32_invk[]; 00042 extern const Float bv32_MPTH[]; 00043 00044 00045 /* LSP Quantization */ 00046 extern const Float bv32_lspecb1[LSPECBSZ1*LPCO]; 00047 extern const Float bv32_lspecb21[LSPECBSZ21*SVD1]; 00048 extern const Float bv32_lspecb22[LSPECBSZ22*SVD2]; 00049 extern const Float bv32_lspmean[LPCO]; 00050 extern const Float bv32_lspp[LSPPORDER*LPCO]; 00051 00052 /* Pitch Predictor Codebook */ 00053 extern const Float bv32_pp9cb[]; 00054 00055 /* Log-Gain Quantization */ 00056 extern const Float bv32_lgpecb[LGPECBSZ]; 00057 extern const Float bv32_lgp[LGPORDER]; 00058 extern const Float bv32_lgmean; 00059 00060 /* Log-Gain Limitation */ 00061 extern const Float bv32_lgclimit[]; 00062 00063 /* Excitation Codebook */ 00064 extern const Float bv32_cccb[CBSZ*VDIM]; 00065 00066 extern const Float bv32_lgpecb_nh[]; 00067 extern const Float bv32_a_pre[]; 00068 extern const Float bv32_b_pre[]; 00069 00070 /* Function Prototypes */ 00071 00072 extern Float bv32_estlevel(Float lg, 00073 Float *level, 00074 Float *lmax, 00075 Float *lmin, 00076 Float *lmean, 00077 Float *x1); 00078 00079 extern void bv32_excdec_w_LT_synth(Float *ltsymd, /* long-term synthesis filter memory at decoder*/ 00080 int16_t *idx, /* excitation codebook index array for current subframe */ 00081 Float *gainq, /* quantized linear gains for sub-subframes */ 00082 Float *b, /* coefficient of 3-tap pitch predictor */ 00083 int16_t pp, /* pitch period (# of 8 kHz samples) */ 00084 Float *EE); 00085 00086 extern Float bv32_gaindec(Float *lgq, 00087 int16_t gidx, 00088 Float *lgpm, 00089 Float *prevlg, 00090 Float level, 00091 int16_t *nclglim, 00092 int16_t lctimer); 00093 00094 extern void bv32_gainplc(Float E, 00095 Float *lgeqm, 00096 Float *lgqm); 00097 00098 extern void bv32_lspdec(Float *lspq, 00099 int16_t *lspidx, 00100 Float *lsppm, 00101 Float *lspq_last); 00102 00103 extern void bv32_lspplc(Float *lspq, 00104 Float *lsppm); 00105 00106 extern int bv32_coarsepitch(Float *xw, 00107 Float *xwd, 00108 Float *dfm, 00109 int cpplast); 00110 00111 00112 extern int bv32_refinepitch(Float *x, 00113 int cpp, 00114 Float *ppt); 00115 00116 extern int bv32_pitchtapquan(Float *x, 00117 int pp, 00118 Float *b); 00119 00120 extern void bv32_excquan( 00121 Float *qv, /* output quantized excitation signal vector */ 00122 int16_t *idx, /* quantizer codebook index for uq[] vector */ 00123 Float *d, /* input prediction residual signal vector */ 00124 Float *h, /* noise feedback filter coefficient array */ 00125 Float *b, /* coefficient of 3-tap pitch predictor */ 00126 Float beta, /* coefficient of weighted 3-tap pitch predictor */ 00127 Float *ltsym, /* long-term synthesis filter memory */ 00128 Float *ltnfm, /* long-term noise feedback filter memory */ 00129 Float *stnfm, /* short-term noise feedback filter memory */ 00130 Float *cb, /* scalar quantizer codebook */ 00131 int pp); /* pitch period (# of 8 kHz samples) */ 00132 00133 extern int bv32_gainquan(Float *gainq, 00134 Float lg, 00135 Float *lgpm, 00136 Float *prevlg, 00137 Float level); 00138 00139 extern void bv32_lspquan(Float *lspq, 00140 int16_t *lspidx, 00141 Float *lsp, 00142 Float *lsppm); 00143 00144 extern void bv32_pp3dec(int16_t idx, Float *b);