libilbc  0.0.1
gainquant.h
00001 /*
00002  * iLBC - a library for the iLBC codec
00003  *
00004  * gainquant.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: gainquant.h,v 1.2 2008/03/06 12:27:38 steveu Exp $
00018  */
00019 
00020 #ifndef __iLBC_GAINQUANT_H
00021 #define __iLBC_GAINQUANT_H
00022 
00023 float gainquant(                /* (o) quantized gain value */
00024                 float in,       /* (i) gain value */
00025                 float maxIn,    /* (i) maximum of gain value */
00026                 int cblen,      /* (i) number of quantization indices */
00027                 int *index);    /* (o) quantization index */
00028 
00029 float gaindequant(              /* (o) quantized gain value */
00030                   int index,    /* (i) quantization index */
00031                   float maxIn,  /* (i) maximum of unquantized gain */
00032                   int cblen);   /* (i) number of quantization indices */
00033 
00034 #endif