From d4ff9abc610add56b6c9e0ec193519f48689c0bd Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Thu, 14 Oct 2004 05:15:48 +0000 Subject: Update to new iLBC codec git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3997 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- codecs/ilbc/StateConstructW.c | 148 +++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 73 deletions(-) (limited to 'codecs/ilbc/StateConstructW.c') diff --git a/codecs/ilbc/StateConstructW.c b/codecs/ilbc/StateConstructW.c index 2b2114f3c..75f521328 100755 --- a/codecs/ilbc/StateConstructW.c +++ b/codecs/ilbc/StateConstructW.c @@ -1,73 +1,75 @@ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - StateConstructW.c - - Copyright (c) 2001, - Global IP Sound AB. - All rights reserved. - -******************************************************************/ - -#include -#include - -#include "iLBC_define.h" -#include "constants.h" -#include "filter.h" -#include "StateConstructW.h" - -/*----------------------------------------------------------------* - * decoding of the start state - *---------------------------------------------------------------*/ - -void StateConstructW( - int idxForMax, /* (i) 6-bit index for the quantization of - max amplitude */ - int *idxVec, /* (i) vector of quantization indexes */ - float *syntDenum, /* (i) synthesis filter denumerator */ - float *out, /* (o) the decoded state vector */ - int len /* (i) length of a state vector */ -){ - float maxVal, tmpbuf[LPC_FILTERORDER+2*STATE_LEN], *tmp, - numerator[LPC_FILTERORDER+1]; - float foutbuf[LPC_FILTERORDER+2*STATE_LEN], *fout; - int k,tmpi; - - /* decoding of the maximum value */ - - maxVal = state_frgqTbl[idxForMax]; - maxVal = (float)pow(10,maxVal)/(float)4.5; - - /* initialization of buffers and coefficients */ - - memset(tmpbuf, 0, LPC_FILTERORDER*sizeof(float)); - memset(foutbuf, 0, LPC_FILTERORDER*sizeof(float)); - for(k=0; k +#include + +#include "iLBC_define.h" +#include "constants.h" +#include "filter.h" + +/*----------------------------------------------------------------* + * decoding of the start state + *---------------------------------------------------------------*/ + +void StateConstructW( + int idxForMax, /* (i) 6-bit index for the quantization of + max amplitude */ + int *idxVec, /* (i) vector of quantization indexes */ + float *syntDenum, /* (i) synthesis filter denumerator */ + float *out, /* (o) the decoded state vector */ + int len /* (i) length of a state vector */ +){ + float maxVal, tmpbuf[LPC_FILTERORDER+2*STATE_LEN], *tmp, + numerator[LPC_FILTERORDER+1]; + float foutbuf[LPC_FILTERORDER+2*STATE_LEN], *fout; + int k,tmpi; + + /* decoding of the maximum value */ + + maxVal = state_frgqTbl[idxForMax]; + maxVal = (float)pow(10,maxVal)/(float)4.5; + + /* initialization of buffers and coefficients */ + + memset(tmpbuf, 0, LPC_FILTERORDER*sizeof(float)); + memset(foutbuf, 0, LPC_FILTERORDER*sizeof(float)); + for (k=0; k