43       iLBCdec_inst->
mode = mode;
 
   75       memset(iLBCdec_inst->
syntMem, 0,
 
   88       iLBCdec_inst->
per = 0.0;
 
   92       memset(iLBCdec_inst->
prevLpc+1,0,
 
   95       iLBCdec_inst->
seed=777;
 
  102       memset(iLBCdec_inst->
hpomem, 0, 4*
sizeof(
float));
 
  111       return (iLBCdec_inst->
blockl);
 
 
  138       int *extra_gain_index,          
 
  146       int k, meml_gotten, Nfor, Nback, i;
 
  148       int subcount, subframe;
 
  157       if (state_first == 1) {
 
  158           start_pos = (start-1)*
SUBL;
 
  160           start_pos = (start-1)*
SUBL + diff;
 
  177               decresidual+start_pos,
 
  192           for (k=0; k<diff; k++) {
 
  193               reverseDecresidual[k] =
 
  194                   decresidual[(start+1)*
SUBL-1-
 
  201           for (k=0; k<meml_gotten; k++){
 
  202               mem[
CB_MEML-1-k] = decresidual[start_pos + k];
 
  209           memset(mem, 0, (
CB_MEML-k)*
sizeof(
float));
 
  219           for (k=0; k<diff; k++) {
 
  220               decresidual[start_pos-1-k] = reverseDecresidual[k];
 
  230       Nfor = iLBCdec_inst->
nsub-start-1;
 
  242           for (subframe=0; subframe<Nfor; subframe++) {
 
  261                   &decresidual[(start+1+subframe)*
SUBL],
 
  278           meml_gotten = 
SUBL*(iLBCdec_inst->
nsub+1-start);
 
  283           for (k=0; k<meml_gotten; k++) {
 
  284               mem[
CB_MEML-1-k] = decresidual[(start-1)*
SUBL + k];
 
  286           memset(mem, 0, (
CB_MEML-k)*
sizeof(
float));
 
  290           for (subframe=0; subframe<Nback; subframe++) {
 
  304                   &reverseDecresidual[subframe*
SUBL],
 
  316           for (i=0; i<
SUBL*Nback; i++)
 
  317               decresidual[
SUBL*Nback - i - 1] =
 
  318               reverseDecresidual[i];
 
 
  328       unsigned char *bytes,           
 
  338       int k, i, start, idxForMax, pos, lastpart, ulp;
 
  348       unsigned char *pbytes;
 
  381               extra_gain_index[k]=0;
 
  383           for (i=0; i<iLBCdec_inst->
nasub; i++) {
 
  388           for (i=0; i<iLBCdec_inst->
nasub; i++) {
 
  396           for (ulp=0; ulp<3; ulp++) {
 
  400                   unpack( &pbytes, &lastpart,
 
  408               unpack( &pbytes, &lastpart,
 
  413               unpack( &pbytes, &lastpart,
 
  423               unpack( &pbytes, &lastpart,
 
  429                   unpack( &pbytes, &lastpart,
 
  438                   unpack( &pbytes, &lastpart,
 
  445                   unpack( &pbytes, &lastpart,
 
  454               for (i=0; i<iLBCdec_inst->
nasub; i++) {
 
  456                       unpack( &pbytes, &lastpart,
 
  464               for (i=0; i<iLBCdec_inst->
nasub; i++) {
 
  466                       unpack( &pbytes, &lastpart,
 
  481           unpack( &pbytes, &last_bit, 1, &pos);
 
  486           if (iLBCdec_inst->
mode==20 && start>3)
 
  488           if (iLBCdec_inst->
mode==30 && start>5)
 
  503                   iLBCdec_inst->
lpc_n);
 
  507               Decode(iLBCdec_inst, decresidual, start, idxForMax,
 
  508                   idxVec, syntdenum, cb_index, gain_index,
 
  509                   extra_cb_index, extra_gain_index,
 
  514               doThePLC(PLCresidual, PLClpc, 0, decresidual,
 
  517                   (*iLBCdec_inst).last_lag, iLBCdec_inst);
 
  525               memcpy(decresidual, PLCresidual,
 
  526                   iLBCdec_inst->
blockl*
sizeof(
float));
 
  545           doThePLC(PLCresidual, PLClpc, 1, zeros, one,
 
  546               (*iLBCdec_inst).last_lag, iLBCdec_inst);
 
  547           memcpy(decresidual, PLCresidual,
 
  548               iLBCdec_inst->
blockl*
sizeof(
float));
 
  551           for (i = 0; i < iLBCdec_inst->
nsub; i++) {
 
  552               memcpy(syntdenum+(i*order_plus_one), PLClpc,
 
  553                   order_plus_one*
sizeof(
float));
 
  566           if (iLBCdec_inst->
mode==20) {
 
  578               for (i=1; i < iLBCdec_inst->
nsub; i++) {
 
  583           } 
else if (iLBCdec_inst->
mode==30) {
 
  585               for (i=0; i < 2; i++) {
 
  591               for (i=2; i < iLBCdec_inst->
nsub; i++) {
 
  605           for (ilag=21; ilag<120; ilag++) {
 
  619           memcpy(data, decresidual,
 
  620               iLBCdec_inst->
blockl*
sizeof(
float));
 
  621           for (i=0; i < iLBCdec_inst->
nsub; i++) {
 
  637                   decblock,iLBCdec_inst->
hpomem);
 
 
void DecoderInterpolateLSF(float *syntdenum, float *weightdenum, float *lsfdeq, int length, iLBC_Dec_Inst_t *iLBCdec_inst)
void SimplelsfDEQ(float *lsfdeq, int *index, int lpc_n)
void StateConstructW(int idxForMax, int *idxVec, float *syntDenum, float *out, int len)
const iLBC_ULP_Inst_t ULP_30msTbl
float lsfmeanTbl[LPC_FILTERORDER]
const iLBC_ULP_Inst_t ULP_20msTbl
void doThePLC(float *PLCresidual, float *PLClpc, int PLI, float *decresidual, float *lpc, int inlag, iLBC_Dec_Inst_t *iLBCdec_inst)
float xCorrCoef(float *target, float *regressor, int subl)
int enhancerInterface(float *out, float *in, iLBC_Dec_Inst_t *iLBCdec_inst)
int LSF_check(float *lsf, int dim, int NoAn)
void hpOutput(float *In, int len, float *Out, float *mem)
void iCBConstruct(float *decvector, int *index, int *gain_index, float *mem, int lMem, int veclen, int nStages)
void index_conv_dec(int *index)
short initDecode(iLBC_Dec_Inst_t *iLBCdec_inst, int mode, int use_enhancer)
void iLBC_decode(float *decblock, unsigned char *bytes, iLBC_Dec_Inst_t *iLBCdec_inst, int mode)
void Decode(iLBC_Dec_Inst_t *iLBCdec_inst, float *decresidual, int start, int idxForMax, int *idxVec, float *syntdenum, int *cb_index, int *gain_index, int *extra_cb_index, int *extra_gain_index, int state_first)
#define STATE_SHORT_LEN_20MS
#define STATE_SHORT_LEN_30MS
void packcombine(int *index, int rest, int bitno_rest)
void unpack(unsigned char **bitstream, int *index, int bitno, int *pos)
float old_syntdenum[(LPC_FILTERORDER+1) *NSUB_MAX]
const iLBC_ULP_Inst_t * ULP_inst
float syntMem[LPC_FILTERORDER]
float enh_period[ENH_NBLOCKS_TOT]
float prevResidual[NSUB_MAX *SUBL]
float prevLpc[LPC_FILTERORDER+1]
int scale_bits[ULP_CLASSES+2]
int extra_cb_index[CB_NSTAGES][ULP_CLASSES+2]
int lsf_bits[6][ULP_CLASSES+2]
int startfirst_bits[ULP_CLASSES+2]
int cb_index[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2]
int cb_gain[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2]
int extra_cb_gain[CB_NSTAGES][ULP_CLASSES+2]
int start_bits[ULP_CLASSES+2]
int state_bits[ULP_CLASSES+2]
void syntFilter(float *Out, float *a, int len, float *mem)