libilbc 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
18#ifndef __iLBC_CREATECB_H
19#define __iLBC_CREATECB_H
20
21void filteredCBvecs(float *cbvectors, /* (o) Codebook vector for the
22 higher section */
23 float *mem, /* (i) Buffer to create codebook
24 vectors from */
25 int lMem); /* (i) Length of buffer */
26
27void searchAugmentedCB(int low, /* (i) Start index for the search */
28 int high, /* (i) End index for the search */
29 int stage, /* (i) Current stage */
30 int startIndex, /* (i) CB index for the first
31 augmented vector */
32 float *target, /* (i) Target vector for encoding */
33 float *buffer, /* (i) Pointer to the end of the
34 buffer for augmented codebook
35 construction */
36 float *max_measure, /* (i/o) Currently maximum measure */
37 int *best_index, /* (o) Currently the best index */
38 float *gain, /* (o) Currently the best gain */
39 float *energy, /* (o) Energy of augmented
40 codebook vectors */
41 float *invenergy); /* (o) Inv energy of aug codebook vectors */
42
43void createAugmentedVec(int index, /* (i) Index for the aug vector to be created */
44 float *buffer, /* (i) Pointer to the end of the
45 buffer for augmented codebook
46 construction */
47 float *cbVec); /* (o) The construced codebook vector */
48
49#endif