libvoipcodecs  0.0.1
createCB.h
1 /*
2  * iLBC - a library for the iLBC codec
3  *
4  * createCB.h - The iLBC low bit rate speech codec.
5  *
6  * Adapted by Steve Underwood <steveu@coppice.org> from the reference
7  * iLBC code supplied in RFC3951.
8  *
9  * Original code Copyright (C) The Internet Society (2004).
10  * All changes to produce this version Copyright (C) 2008 by Steve Underwood
11  * All Rights Reserved.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * $Id: createCB.h,v 1.2 2008/03/06 12:27:38 steveu Exp $
18  */
19 
20 #ifndef __iLBC_CREATECB_H
21 #define __iLBC_CREATECB_H
22 
23 void filteredCBvecs(float *cbvectors, /* (o) Codebook vector for the
24  higher section */
25  float *mem, /* (i) Buffer to create codebook
26  vectors from */
27  int lMem); /* (i) Length of buffer */
28 
29 void searchAugmentedCB(int low, /* (i) Start index for the search */
30  int high, /* (i) End index for the search */
31  int stage, /* (i) Current stage */
32  int startIndex, /* (i) CB index for the first
33  augmented vector */
34  float *target, /* (i) Target vector for encoding */
35  float *buffer, /* (i) Pointer to the end of the
36  buffer for augmented codebook
37  construction */
38  float *max_measure, /* (i/o) Currently maximum measure */
39  int *best_index, /* (o) Currently the best index */
40  float *gain, /* (o) Currently the best gain */
41  float *energy, /* (o) Energy of augmented
42  codebook vectors */
43  float *invenergy); /* (o) Inv energy of aug codebook vectors */
44 
45 void createAugmentedVec(int index, /* (i) Index for the aug vector to be created */
46  float *buffer, /* (i) Pointer to the end of the
47  buffer for augmented codebook
48  construction */
49  float *cbVec); /* (o) The construced codebook vector */
50 
51 #endif