18 #include "iLBC_define.h"
19 #include "constants.h"
25 void LSFinterpolate2a_dec(
32 float lsftmp[LPC_FILTERORDER];
34 interpolate(lsftmp, lsf1, lsf2, coef, length);
47 int i, j, pos, cb_pos;
57 for (i = 0; i < LSF_NSPLIT; i++) {
58 for (j = 0; j < dim_lsfCbTbl[i]; j++) {
59 lsfdeq[pos + j] = lsfCbTbl[cb_pos +
60 (long)(index[i])*dim_lsfCbTbl[i] + j];
62 pos += dim_lsfCbTbl[i];
63 cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
72 for (i = 0; i < LSF_NSPLIT; i++) {
73 for (j = 0; j < dim_lsfCbTbl[i]; j++) {
74 lsfdeq[LPC_FILTERORDER + pos + j] =
76 (long)(index[LSF_NSPLIT + i])*
79 pos += dim_lsfCbTbl[i];
80 cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
89 void DecoderInterpolateLSF(
98 int i, pos, lp_length;
99 float lp[LPC_FILTERORDER + 1], *lsfdeq2;
106 lsfdeq2 = lsfdeq + length;
107 lp_length = length + 1;
109 if (iLBCdec_inst->mode==30) {
112 LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold, lsfdeq,
113 lsf_weightTbl_30ms[0], length);
114 memcpy(syntdenum,lp,lp_length*
sizeof(
float));
115 bwexpand(weightdenum, lp, LPC_CHIRP_WEIGHTDENUM,
122 for (i = 1; i < 6; i++) {
123 LSFinterpolate2a_dec(lp, lsfdeq, lsfdeq2,
124 lsf_weightTbl_30ms[i], length);
125 memcpy(syntdenum + pos,lp,lp_length*
sizeof(
float));
126 bwexpand(weightdenum + pos, lp,
127 LPC_CHIRP_WEIGHTDENUM, lp_length);
133 for (i = 0; i < iLBCdec_inst->nsub; i++) {
134 LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold,
135 lsfdeq, lsf_weightTbl_20ms[i], length);
136 memcpy(syntdenum+pos,lp,lp_length*
sizeof(
float));
137 bwexpand(weightdenum+pos, lp, LPC_CHIRP_WEIGHTDENUM,
145 if (iLBCdec_inst->mode==30)
146 memcpy(iLBCdec_inst->lsfdeqold, lsfdeq2,
147 length*
sizeof(
float));
149 memcpy(iLBCdec_inst->lsfdeqold, lsfdeq,
150 length*
sizeof(
float));