libilbc  0.0.1
createCB.h
00001 /*
00002  * iLBC - a library for the iLBC codec
00003  *
00004  * createCB.h - The iLBC low bit rate speech codec.
00005  *
00006  * Adapted by Steve Underwood <steveu@coppice.org> from the reference
00007  * iLBC code supplied in RFC3951.
00008  *
00009  * Original code Copyright (C) The Internet Society (2004).
00010  * All changes to produce this version Copyright (C) 2008 by Steve Underwood
00011  * All Rights Reserved.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  *
00017  * $Id: createCB.h,v 1.2 2008/03/06 12:27:38 steveu Exp $
00018  */
00019 
00020 #ifndef __iLBC_CREATECB_H
00021 #define __iLBC_CREATECB_H
00022 
00023 void filteredCBvecs(float *cbvectors,       /* (o) Codebook vector for the
00024                                                    higher section */
00025                     float *mem,             /* (i) Buffer to create codebook
00026                                                    vectors from */
00027                     int lMem);              /* (i) Length of buffer */
00028 
00029 void searchAugmentedCB(int low,             /* (i) Start index for the search */
00030                        int high,            /* (i) End index for the search */
00031                        int stage,           /* (i) Current stage */
00032                        int startIndex,      /* (i) CB index for the first
00033                                                    augmented vector */
00034                        float *target,       /* (i) Target vector for encoding */
00035                        float *buffer,       /* (i) Pointer to the end of the
00036                                                    buffer for augmented codebook
00037                                                    construction */
00038                        float *max_measure,  /* (i/o) Currently maximum measure */
00039                        int *best_index,     /* (o) Currently the best index */
00040                        float *gain,         /* (o) Currently the best gain */
00041                        float *energy,       /* (o) Energy of augmented
00042                                                    codebook vectors */
00043                        float *invenergy);   /* (o) Inv energy of aug codebook vectors */
00044 
00045 void createAugmentedVec(int index,          /* (i) Index for the aug vector to be created */
00046                         float *buffer,      /* (i) Pointer to the end of the
00047                                                    buffer for augmented codebook
00048                                                    construction */
00049                         float *cbVec);      /* (o) The construced codebook vector */
00050 
00051 #endif