CN1305024C - 预测编码/解码设备及其方法 - Google Patents
预测编码/解码设备及其方法 Download PDFInfo
- Publication number
- CN1305024C CN1305024C CNB028271866A CN02827186A CN1305024C CN 1305024 C CN1305024 C CN 1305024C CN B028271866 A CNB028271866 A CN B028271866A CN 02827186 A CN02827186 A CN 02827186A CN 1305024 C CN1305024 C CN 1305024C
- Authority
- CN
- China
- Prior art keywords
- coding
- piece
- signal
- initial state
- decoding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000000034 method Methods 0.000 claims abstract description 77
- 238000001914 filtration Methods 0.000 claims description 27
- 238000005070 sampling Methods 0.000 claims description 25
- 238000010606 normalization Methods 0.000 claims description 16
- 238000004458 analytical method Methods 0.000 claims description 10
- 230000008929 regeneration Effects 0.000 claims description 8
- 238000011069 regeneration method Methods 0.000 claims description 8
- 230000005284 excitation Effects 0.000 claims description 7
- 238000011002 quantification Methods 0.000 claims description 7
- 230000001172 regenerating effect Effects 0.000 claims description 7
- 238000007493 shaping process Methods 0.000 claims description 6
- 230000005236 sound signal Effects 0.000 claims 2
- 239000012141 concentrate Substances 0.000 claims 1
- 230000005540 biological transmission Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 12
- 238000003786 synthesis reaction Methods 0.000 description 11
- 238000013139 quantization Methods 0.000 description 9
- 230000007704 transition Effects 0.000 description 7
- 238000011084 recovery Methods 0.000 description 5
- 239000011800 void material Substances 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000002349 favourable effect Effects 0.000 description 3
- 230000035807 sensation Effects 0.000 description 3
- 206010019133 Hangover Diseases 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 2
- 125000003192 dTMP group Chemical group 0.000 description 2
- 238000006731 degradation reaction Methods 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000003595 spectral effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 230000036962 time dependent Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/04—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
- G10L19/0212—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders using orthogonal transformation
Abstract
Description
void StateSearchW(/*状态的编码*/ float*residual,/*(i)目标剩余向量,即图5中的信号515*/ float*syntDenum,/*(i)图5中的信号516、546和565的lpc系数*/ float*weightNum,/*(i)图5中的信号546和565的加权滤波器的分子*/ float*weightDenum,/*(i)图5中的信号546和565的加权滤波器的分母*/ int*idxForMax,/*(o)最大振幅的量化器指数,即图5中的信号536*/ int*idxVec,/*(o)量化指数的向量,即图5中的信号555*/ int len/*(i)全部向量的长度,例如58*/); void AbsQuantW(float*in,float*syntDenum,float*weightNum,float *weightDenum,int*out,int len){ float*target,targetBuf[FILTERORDER+STATE_LEN], *SyntOut,syntOutBuf[FILTERORDER+STATE LEN], *WeightOut,weightOutBuf[FILTERORDER+STATE_LEN], toQ,xq; int n; int index; memset(targetBuf,0,FILTERORDER*sizeof(float)); <!-- SIPO <DP n="9"> --> <dp n="d9"/> memset(syntOutBuf,0,FILTERORDER*sizeof(float)); memset(weightOutBuf,0,FILTERORDER*sizeof(float)); target=&targetBuf[FILTERORDER]; syntOut=&syntOutBuf[FILTERORDER]; weightOut=&weightOutBuf[FILTERORDER]; for(n=0;n<1en;n++){ if(N=STATE_LEN/2{ syntDenum+=(FILTERORDER+1); weightNum+=(FILTERORDER+1); weightDenum+=(FILTERORDER+1); } AllPoleFilter(&in[n],weightDenum,1,FILTERORDER); /*这个函数进行向量in的全极性滤波,结果返回到同一向量中*/ /*这是图5中的滤波540*/ syntOut[n]=0.0; AllPoleFilter(&syntOut[n],weightDenum,1,FLILTERORDER); /*这是图5中的滤波560*/ /*量化器*/ toQ=in[n]-syntOut[n];/*这是从信号545中减去信号566以得到图5中 的信号547*/ sort_sq(&xq,&index,toQ,states3,8); /*这个函数进行标量量化*/ /*这是图5中的函数550*/ out[n]=index; syntOut[n]=state_sq3[out[n]]; AllPoleFilter(&syntOut[N],weightDenum,1,FILTERORDER); <!-- SIPO <DP n="10"> --> <dp n="d10"/> /*这更新了图5中的加权滤波器560,用于下一取样*/ } } void StateSearchW(float*residual,float*syntDenum,float*weightNum, float*weightDenum,int*idxForMax,int*idxVec,int len){ float dtmp,maxVal,tmpbuf[FILTERORDER+2*STATE_LEN],*tmp, numerator[1+FILTERORDER],foutbuf[FILTERORDER+2*STATELEN],*fout; int k,utmp; int index; memset(tmpbuf,0,FILTERORDER*sizeof(float); memset(foutbuf,0,FILTERORDER*sizeof(float)); for(K=0;K<t;FILTERORDER;k++){ numerator[k]=syntDenum[FILTERORDER-k]; } numerator[FILTERORDER]=synthDenum[0]; tmp=&tmpbuf[FILTERORDER]; fout=&foutbuf[FILTERORDER]; /*从这里*/ memcpy(tmp,residual,len*sizeof(float)); memset(tmp+len,0,len*sizeof(float)); ZeroPoleFilter(tmp,numerator,syntDenum,2*len,FILTERORDER,fout); /*这个函数进行tmp的零极性滤波并将滤波的向量返回到fout中*/ for(k=0;k<len;k++){ fout[k]+=fout[k+len]; } <!-- SIPO <DP n="11"> --> <dp n="d11"/> /*到这里是图5中的全通滤波520*/ maxVal=fout[0]; for(K=L;K<LT;LEN;k++){ if(fout[k]*fout[k]>maxVal*maxVal){ maxVal=fout[k]; } } maxVal=(float)fabs(maxVal); if(maxVal<T;10.0)( maxval=10.0; ) maxVal=(float)log10(maxVal); sort_sq(&dtmp,&index,maxVal,state_frgq,64); /*这个函数进行平方值的排序*/ maxVal=state_frgq[index]; utmp=index; *idxForMax=utmp; maxVal=(float)pow(10,maxVal); maxval=(float)(4.5)/maxVal; for(k=0;K<len;k++){ fout[K]=maxVal;/*这是图5中的归一化530*/ } AbsQuantW(fout,syntDenum,weightNum,weightDenum,idxVec,len); }
void StateConstructW(/*对语音剩余的一种状态进行解码*/ int idxForMax,/*(i)最大振幅的量化的7比特指数,即图6中的信号626*/ int*idxVec,/*(i)量化指数的向量,即图6中的信号615*/ float*SyntDenum,/*(i)综合滤波器分母,即图6中的信号636*/ float*out,/*(o)解码的状态向量,即图6中的信号645*/ int len/*(i)状态向量的长度,例如58*/ ) { float maxVal,tmpbuf[FILTERORDER+2*STATE_LEN],*tmp,numerator [FILTERORDER+1]; float foutbuf[FILTERORDER+2STATE_LEN],*fout; int k,tmpi; maxVal=state_frgq[idxForMax]; maxVal=(float)pow(10,maxVal)/(float)4.5; memset(tmpbuf,0,FILTERORDER*sizeof(float)); memset(foutbuf,0,FILTERORDER*sizeof(float)); for(k=0;K<LT;FILTERORDER;k++){ numerator[k]=syntDenum[FILTERORDER-k]; } numerator[FILTERORDER]=syntDenum[0]; tmp=&tmpbuf[FILTERORDER]; fout=&foutbuf[FILTERORDER]; for(k=0;K<LT;len;k++){ tmpi=len-l-k; <!-- SIPO <DP n="13"> --> <dp n="d13"/> tmp[K]=maxVal*state_sq3[idxVec[tmpi]]; /*这是图6中的操作620和630*/ ) /*从这里*/ memset(tmp+len,0,len*sizeof(float)); ZeroPoleFilter(tmp,numerator,syntDenum,2*len,FILTERORDER,fout); for(k=0;k<len;k++)( Out[k]=fout[len-L-K]+fout[2*len-1-K];} /*到这里是图6中的操作640*/}
void iLBC_encode(/*主编码器函数*/ float*speech,/*(i)语音数据向量*/ unsigned char*bytes,/*(o)编码的数据位*/ float*block,/*(o)解码的语音向量*/ int mode,/*(i)1用于标准编码、2用于冗余编码*/ float*decresidual,/*(o)增益适配前的解码剩余(对冗余编码单位有用) */ float*syntdenum,/*(o)解码的综合滤波器(对冗余编码单位有用)*/ float*weightnum,/*(o)加权分子(对冗余编码单位有用)*/ float*weightdenum/*(o)加权分母(对冗余编码单位有用)*/ ) { float data[BLOCKL]; float residual[BLOCKL],reverseResidual[BLOCKL]; <!-- SIPO <DP n="15"> --> <dp n="d15"/> float weightnum[NSUB*(FILTERORDER+1)],weightdenum[NSUB* (FILTERORDER+1)]; int start,idxForMax,idxVec[STATE_LEN]; float reverseDecresidual[BLOCKL],mem[MEML]; int n,k,kk,mem1_gotten,Nfor,Nback,i; int dummy=0; int gain_index[NSTAGES*NASUB],extra_gain_index[NSTAGES]; int cb_index[NSTAGES*NASUB],extra_cb_index[NSTAGES]; int lsf_i[LSF_NSPLIT*LPC_N]; unsigned char*pbytes; int diff,start_pos,state-first; float en1,en2; int index,gc_index; int subcount,subframe; float weightState[FILTERORDER]; memcpy(data,block,BLOCKL*sizeof(float)); /*输入数据的LPC*/ LPCencode(syntdenum,weightnum,weightdenum,lsf-i,data); /*这个函数进行LPC分析和量化,并平滑LPC系数的内插*/ /*得到剩余的逆滤波器*/ for(n=0;n<NSUB;n++){ anaFilter(&data[N*SUBL],&syntdenum[n*(FILTERORDER+L)],SUBL, &residual[n*SUBL]) } /*这个函数使用量化和内插的LPC系数来进行LPC分析滤波*/ /*此刻的剩余是例如图3中的信号315的信号*/ <!-- SIPO <DP n="16"> --> <dp n="d16"/> /*找出状态位置*/ start=FrameClassify(residual); /*这个函数以整数子帧的解析度来定位起始状态*/ /*变量start表示整数个子块中信号317,318(图4)的开始*/ /*检查状态是否在2个子帧的第1或最末部分*/ diff=STATE_LEN-STATE_SHORT_LEN; en1=0; index=(START-1)*SUBL; for(i=0;i<STATE_SHORT_LEN;i++)en1+=residual[INDEX+i] *residual[INDEX+i]; en2=0; index=(start-1)*SUBL+diff; for(i=0;i<STATE_SHORT_LEN;i++)en2+=residual[index+i] *residual[INDEX+i]; if(en1>en2){ state-first=1; start_pos=(start-1)*SUBL; }else( state-first=0; start_pos=(start-1)*SUBL+diff; } /*变量start_pos现表示在整数数量的取样中的信号325(图4)的开始*/ /*状态的标量量化*/ StateSearchW(&residual[start_pos], &syntdenum[(start-1)*(FILTERORDER+1)], &weightnum[(start-1)*(FILTERORDER+1)], &weightdenum[(start-1)*(FILTERORDER+1)], &idxForMax,idxVec,STATE_SHORT_LEN); /*这个函数对起始状态进行编码(详见本说明书的上文)*/ <!-- SIPO <DP n="17"> --> <dp n="d17"/> StateConstructW(idxForMax,idxVec, &syntdenum[(start-1)*(FILTERORDER+1)), &decresidual[start_pos],STATE_SHORT_LEN); /*这个函数对起始状态进行解码*/ /*此刻的解码剩余含有例如图7中的信号715那样的信号*/ /*状态中的预测量化*/ if(state-first){/*将自适应部分放在最末*/ /*设置存储器*/ memset(mem,0,(MEML-STATE_SHORT_LEN)*sizeof(float)); memcpy(mem+MEML-STATE_SHORT_LEN, decresidual+start_pos,STATE_SHORT_LEN*sizeof(float)); memset(weightState,0,FILTERORDER*sizeof(float)); /*对子帧进行编码*/ iCBSearch{extra_cb_index,extra_gain_index, &residual[start_pos+STATE_SHORT_LEN], mem+MEML-stMemL,stMemL,diff,NSTAGES, &syntdenum[(start-1)*(FILTERORDER+1)], &weightnum[(start-1)*(FILTERORDER+1)], &weightdenum[(start-1)*(FILTERODER+1)],weightState}; /*这个函数进行整形和增益指数的加权的多级搜索*/ /*构建解码的向量*/ iCBConstruct{&decresidual[start_pos+STATE_SHORT_LEN], extra_cb_index,extra_gain_index,mem+MEML-stMemL,stMemL,diff, NSTAGES); /*这个函数对多级编码进行解码*/ } <!-- SIPO <DP n="18"> --> <dp n="d18"/> else(/*将自适应部分放在开始*/ /*创建用于预测的逆向量*/ for(k=o;k<diff;k++){ reverseResidual[k]=residual[(start+1)*SUBL-1- (k+STATE_SHORT_LEN)]; reverseDecresidual[k]=decresidua1[(start+1)*SUBL-1- (k+STATE_SHORT_LEN)]; } /*设置存储器*/ mem1_gotten=STATE_SHORT_LEN; for(k=0;k<mem1_gotten;k++){mem[MEML-L-K]=decresidual [start_pos+k];} memset(mem,0,(MEML-k)*sizeof(float)); memset(weightState,0,FILTERORDER*sizeof(float)); /*对子帧进行编码*/ iCBSearch(extra_cb_index,extra_gain_index,reverseResidual, mem+MEML-stMemL,stMemL,diff,NSTAGES, &syntdenum[(start-1)*(FILTERORDER+1)], &weightnum[(stat-1)*(FILTERORDER+1)], &weightdenum[(start-1)*(FILTERORDER+1)],weightState); /*构建解码的向量*/ iCBConstruct(reverseDecresidual,extra_cb_index,extra_gain_index, MEM+MEML-STMEML,stMemL,diff,NSTAGES); /*从逆向量中得到解码剩余*/ for(k=0;k<diff;k++){ decresidual[start_pos-1-k]=reverseDecresidua1[k]; <!-- SIPO <DP n="19"> --> <dp n="d19"/> } } /*此刻的解码剩余含有例如图7中的信号725那样的信号*/ /*预测子帧的计数器*/ subcount=0; /*正向子帧的预测*/ Nfor=NSUB-start-1; if(Nfor>0){ /*设置存储器*/ memset(mem,0,(MEML-STATELEN)*sizeof(float)); memcpy(mem+MEML-STATE_LEN,decresidual+(start-1)*SUBL, STATE_LEN*sizeof(float)); memset(weightState,0,FILTERORDER*sizeof(float)); /*在子帧上循环而编码*/ for(subframe=0;subframe<Nfor;SUBFRAME++){ /*编码子帧*/ iCBSearch(cb_index+subcount*NSTAGES, gain_index+subcount*NSTAGES, &residual[(start+1+subframe)*SUBL], mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES, &syntdenum[(start+1+subframe)*(FILTERORDER+1)], &weightnum[(start+1+subframe)*(FILTERORDER+1)], &weightdenum[(start+1+subframe)*(FILTERORDER+1)],weightState); /*构建解码的向量*/ iCBConstruct(&decresidual[(start+1+subframe)*SUBL], cb_index+subcount*NSTAGES,gain_index+subcount*NSTAGES, mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES); <!-- SIPO <DP n="20"> --> <dp n="d20"/> /*更新存储器*/ memcpy(mem,mem+SUBL,(MEML-SUBL)*sizeof(float)); memcpy(mem+MEML-SUBL,&decresidual[(start+1+subframe)*SUBL], SUBL*sizeof(float)); memset(weightState,0,FILTERORDER*sizeof(float));subcount++; } } /*此刻的解码剩余含有例如图7中的信号735那样的信号*/ /*子帧的反向预测*/ Nback=start-1; if(Nback>0){ /*创建逆次序向量*/ for(n=0;n<Nback;n++){ for(k=0;K<LT;SUBL;k++){ reverseResidual[N*SUBL+k]=residual[(start-1)*SUBL-1-n*SUBL-k]; reverseDecresidual[N*SUBL+k]=decresidual [(start-1)*SUBL-1-n*SUB-k];} /*设置存储器*/ mem1_gotten=SUBL*(NSUB+1-start); if(mem1-gotten>MEML){mem1_gotten=MEML;} for(k=0;k<mem1_gotten;k++){mem[MEML-1-k]=decresidual[(start-1) *SUBL+k];} memset(mem,0,(MEML-k)*sizeof(float); memset(weightState,0,FILTERORDER*sizeof(float); /*在子帧上循环而编码*/ for(subframe=0;subframe<Nback;subframe++){ <!-- SIPO <DP n="21"> --> <dp n="d21"/> /*对子帧进行编码*/ iCBSearch(cb_index+subcount*NSTAGES, gain_index+subcount*NSTAGES, &reverseResidual[subframe*SUBL], mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES, &syntdenum[(start-1-subframe)*(FILTERORDER+1)], &weightnum[(start-1-subframe)*(FILTERORDER+1)], &weightdenum[(start-1-subframe)*(FILTERORDER+1)],weightState); /*构建解码的向量*/ iCBConstruct(&reverseDecresidual[subframe*SUBL], cb_index+subcount*NSTAGES,gain_index1+subcount*NSTAGES, mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES); /*更新存储器*/ memcpy(mem,mem+SUBL,(MEML-SUBL)*sizeof(float); memcpy(mem+MEML-SUBL,&reverseDecresidual[subframe*SUBL], SUBL*sizeof(float)); memset(weightState,0,FILTERORDER*sizeof(float);subcount++; } /*从逆向量中得到解码剩余*/ for(i=0;i<SUBL*Nback;i++) decresidual[SUBL*Nback-i-1]=reverseDecresidual[i]; } /*此刻的解码剩余含有例如图7中的信号745那样的信号*/ ..将信息打包成字节加权的自适应密码本搜索 }
void iCBSearch(/*自适应密码本搜索*/ int*index,/*(o)向量1指数。这是图8中的信号865*/ int*gain_index,/*(o)向量增益指数。这是图8中的信号866*/ float*target,/*(i)量化目标。这是图8中的信号816*/ float*mem,/*(i)自适应密码本的存储器。这是图8中的信号815*/ int 1Mem,/*(i)存储器的长度*/ int 1Target,/*(i)目标向量的长度*/ int nStages,/*(i)量化级数*/ float*weightDenum,/*(i)加权滤波器分母系数。这是图8中的信号836*/ float*weightState/*(i)用于目标滤波的加权滤波器的状态。这是图8中的 <!-- SIPO <DP n="23"> --> <dp n="d23"/> 滤波830的状态*/ ) ( int i,j,icount,stage,best_index; float max_measure,gain,measure,crossDot,invDot; float gains[NSTAGES]; float cb[(MEML+SUBL+1)*CBEXPAND*SUBL]; int base_index,sInd,eInd,base_size; /*用于加权*/ float buf[MEML+SUBL+2*FILTERORDER]; base_size=1Mem-1Target+1; if(1Target==SUBL) base_size=1Mem-1Target+1+1Target/2; memcpy(buf,weightState,sizeof(float)*FILTERORDER); memcpy(&buf[FILTERORDER],mem,1Mem*sizeof(float)); memcpy(&buf[FILTERORDER+1Mem],target,1Target*sizeof(float)); /*此刻的buf是图8中的信号825*/ AllPoleFilter(&buf[FILTERORDER],weightDenum,1Mem+1Target, FILTERORDER); /*这个函数对buf做全极性滤波。所得结果返回到buf中。这是图8中的 函数830*/ /*此刻的buf是图8中的信号835*/ /*构建所需的CB和目标*/ createCB(&buf[FILTERORDER],cb,1Mem,1Target); memcpy(target,&buf[FILTERORDER+LMEM],1Target*sizeof(float)); /*此刻的目标是图8中的信号846而cb是图8中的信号855*/ /*级上的主循环*/ <!-- SIPO <DP n="24"> --> <dp n="d24"/> /*此循环执行图8中的函数860*/ for(stage=0;stage<nStages;stage++){ max_measure=(float)-10000000.0; best_index=0; for(icount=0;icount<base_size;icount++){ crossDot=0.0; invDot=0.0; for(j=0;j<1Target;j++){ crossDot+=target[j]*cb[icount*1Target+j]; invDot+=cb[icount*1Target+j]*cb[icount*1Target+j]; } invDot=(float)1.0/(invDot+EPS); if(stage==0){ measure=(float)-10000000.0; if(crossDot>0.0) measure=crossDot*crossDot*invDot; } else{ measure=crossDot*crossDot*invDot; } if(measure>max_measure){ best_index=icount; max_measure=measure; gain=crossDot*invDot; } } base_index=best_index; if(RESRANGE==-1){/*无限制搜索*/ sInd=0; eInd=base_size-1; <!-- SIPO <DP n="25"> --> <dp n="d25"/> } else{ sInd=base_index-RESRANGE/2; if(sInd<0)sInd=0; eInd=sInd+RESRANGE; if(eInd>=base_size){ eInd=base_size-1; sInd=eInd-RESRANGE; } } for(i=1;I<CBEXPAND;I++){ sInd+=base_size; eInd+=base_size; for(icount=sInd;icount<=eInd;icount++){ crossDot=0.0; invDot=0.0; for(j=0;j<1Target;j++){ crossDot+=target[j]*CB[icount*1Target+j]; invDot+= cb[icount*1Target+j]*CB[icount*1Target+j]; } invDot=(float)1.0/(invDot+EPS); if(stage==0){ measure=(float)-10000000.0; if(crossDot>0.0) measure=crossDot*crossDot*invDot; ) else{ measure=crossDot*crossDot*invDot; }if(measure>max_measure){ best_index=icount; <!-- SIPO <DP n="26"> --> <dp n="d26"/> max_measure=measure; gain=crossDot*invDot; } } } index[stage]=best_index; /*index是图8中的信号865*/ /*增益量化*/ if(stage=0){ if(gain<0.0)gain=0.0; if(gai>1.0)gain=1.0; gain=gainquant(gain,1.0,16,&gain_index[stage]); /*这个函数搜索增益量化的最佳指数*/ /*gain_index是图8中的信号866*/ } else{ if(fabs(gain)>fabs(gains[stage-1])){ gain=gain*(float)fabs(gains[stage-1])/(float)fabs(gain); } gain=gainquant(gain,(float)fabs(gains[stage-1]),8,&gain_index[stage]); /*这个函数搜索增益量化的最佳指数*/ /*gain_index是图8中的信号866*/ } /*更新目标*/ for(j=0;j<1Target;j++)target[j]-=gain*cb[index[stage]*1Target+j]; gains[stage]=gain; }/*结束主循环:for(stage=0;...*/ }
void ILBC_decode(/*主解码器函数*/ float*decblock,/*(o)解码的信号块*/ unsigned char*bytes,/*(i)编码的信号位*/ int bytes_are_good/*(i)若字节是正确的数据则为1否则为0*/ ){ float reverseDecresidual[BLOCKL],mem[MEML]; int n,k,mem1_gotten,Nfor Nback,i; int diff,start_pos; int subcount,subframe; float factor; float std_decresidual,one_minus_factor_scaled; int gaussstart; diff=STATE_LEN-STATE_SHORT_LEN; if(state_first==1)start_pos=(start-1)*SUBL; else start_pos=(start-1)*SUBL+diff; StateConstructW(idxForMax,idxVec, &syntdenum[(start-1)*(FILTERORDER+1)], &decresidual[start_pos],STATE_SHORT_LEN); /*这个函数对起始状态进行解码*/ if(state_first){/*将自适应部分放在最末*/ <!-- SIPO <DP n="28"> --> <dp n="d28"/> /*设置存储器*/ memset(mem,0,(MEML-STATE_SHORT_LEN)*sizeof(float); memcpy(mem+MEML-STATE_SHORT_LEN,decresidual+start_pos, STATE_SHORT_LEN*sizeof(float)); /*构建解码向量*/ iCBConstruct(&decresidual[startpos+STATE_SHORT_LEN], extra_cb_index,extra_gain_index, mem+MEML-stMemL,stMemL,diff,NSTAGES); /*这个函数对剩余的帧进行解码*/ } else{/*将自适应部分放在开始*/ /*创建用于预测的逆向量*/ for(k=0;k<diff;k++){ reverseDecresidual[K]=decresidual[(start+1)*SUBL-1- (K+STATE_SHORT_LEN)]; } /*设置存储器*/ mem1_gotten=STATE_SHORT_LEN; for(k=0;k<mem1_gotten;k++){MEM[MEML-1-k]=decresidual start_pos+k}; memset(mem,0,(MEML-k)*sizeof(float)); /*构建解码的向量*/ iCBConstruct(reverseDecresidual,extra_cb_index,extra_gain_index, mem+MEML-stMemL,stMemL,diff,NSTAGES); /*从逆向量中得到解码的剩余*/ for(k=0;k<diff;k++){ <!-- SIPO <DP n="29"> --> <dp n="d29"/> decresidual[start_pos-1-k]=reverseDecresidual[k]; } } /*用于预测子帧的计数器*/ subcount=0; /*递交子帧的预测*/ Nfor=NSUB-start-1; if(Nfor>0){ /*设置存储器*/ memset(mem,0,(MEML-STATE_LEN)*sizeof(float)); memcpy(MEM+MEML-STATE_LEN,decresidual+(start-1)*SUBL, STATE_LEN*sizeof(float)); /*在要编码的子帧上的循环*/ for(subframe=0;subframe<Nfor;subframe++){ /*构建解码的向量*/ iCBConstruct(&decresidual[(start+1+subframe)*SUBL], cb_index+subcount*NSTAGES,gain_index+subcount*NSTAGES, mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES); /*更新存储器*/ memcpy(mem,mem+SUBL,(MEML-SUBL)*sizeof(float)); memcpy(mem+MEML-SUBL,&decresdiaul[(start+1+subframe)*SUBL], SUBL*sizeof(float)); subcount++; } } <!-- SIPO <DP n="30"> --> <dp n="d30"/> /*子帧的反向预测*/ Nback=start-1; if(Nback>0){ /*创建逆次序向量*/ for(n=0;n<Nback;n++){ for(k=0;K<SUBL;K++){ reverseDecresidual[n*SUBL+k]=decresidual[(start-1)*SUBL-1-n*SUBL-k]; } } /*设置存储器*/ mem1_gotten=SUBL*(NSUB+L-START); if(mem1_gotten>MEML){mem1_gotten=MEML;} for(k=0;K<mem1_gotten;k++){mem[MEML-1-k]= decresidual[(start-1)*SUBL+k];} memset(mem,0,(MEML-k)*sizeof(float)); /*在要解码的帧上的循环*/ for(subframe=0;subframe<Nback;subframe++){ /*构建解码的向量*/ iCBConstruct(&reverseDecresidual[subframe*SUBL], cb_index+subcount*NSTAGES,gain_index+subcount*NSTAGES, mem+MEML-memLf[subcount],memLf[subcount],SUBL,NSTAGES); /*更新存储器*/ memcpy(mem,mem+SUBL,(MEML-SUBL)*sizeof(float)); memcpy(mem+MEML-SUBL,&reverseDecresidual[subframe*SUBL], SUBL*sizeof(float)); <!-- SIPO <DP n="31"> --> <dp n="d31"/> subcount++; } /*从逆向量中得到解码的剩余*/ for(i=0;i<SUBL*Nback;i++) decresidual[SUBL*Nback-i-1]=reverseDecresidual[i]; } factor=(float)(gc_index+1)/(float)16.0; for(i=0;i<STATE_SHORT_LEN;i++)decresidual[startpos+i]*=factor; factor*=1.5; if(factor<1.0){ std_decresidual=0.0; for(i=0;i<BLOCKL;i++)std_decresidual+=decresidual[i]*decresidual[i]; std_decresidual/=BLOCKL; std_decresidual=(float)sqrt(std_decresidual); one_minus_factor_scaled=(float)sqrt(1-factor*factor)*std_decresidual; gaussstart=(int)ceil(decresidual[0])%(GAUSS_NOISE_L-BLOCKL); for(i=0;i<BLOCKL;i++)decresidual[i]+= one_minus_factor_scaled*gaussnoise[gaussstart+i]; } } void iLBC_decode(float*decblock,unsigned char*bytes,int bytes_are_good) { static float old_syntdenum[(FILTERORDER+1)*NSUB]={ <!-- SIPO <DP n="32"> --> <dp n="d32"/> 1,0,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,0,0,0); static int last_lag=20; float data[BLOCKL]; float lsfunq[FILTERORDER*LPC_N]; float PLCresidual[BLOCKL],PLClpc[FILTERORDER+1]; float zeros[BLOCKL],one[FILTERORDER+1]; int k,kk,i,start,idxForMax; int idxVec[STATE_LEN]; int dummy=0,check; int gain_index[NASUB*NSTAGES],extra_gain_index[NSTAGES]; int cb_index[NSTAGES*NASUB],extra_cb_index[NSTAGES]; int lsf_i[LSF_NSPLIT*LPC_N]; int state_first,gc_index; unsigned char*pbytes; float weightnum[(FILTERORDER+1)*NSUB],weightdenum [(FILTERORDER+1)*NSUB]; int order plus one; if(bytes_are_good){ ..从字节中提取参数 SimplelsfUNQ(lsfunq,lsf-i); /*这个函数对LSF域中的LPC系数进行解码*/ check=LSF_check(lsfunq,FILTERORDER,LPCN); /*这个函数检查LPC滤波器的稳定性*/ DecoderInterpolateLSF(syntdenum,lsfunq,FILTERORDER); /*这个函数在块上内插LPC滤波器*/ <!-- SIPO <DP n="33"> --> <dp n="d33"/> Decode(decresidual,start,idxForMax,idxVec,syntdenum,cb_index, gain_index,extra_cb_index,extra_gain_index,state_first,gc_index); /*这个函数包含于上*/ /*准备plc用于未来的损失*/ doThePLC(PLCresidual,PLClpc,0,decresidual,syntdenum+ (FILTERORDER+1)*(NSUB-1),NSUB,SUBL,last_lag,start); /*这个函数处理分组损失弥补*/ memcpy(decresidual,PLCresidual,BLOCKL*sizeof(float));}else{ /*分组损失弥补*/ memset(zeros,0,BLOCKL*sizeof(float)); one[0]=1; memset(one+1,0,FILTERORDER*sizeof(float); start=0; doThePLC(PLCresidual,PLClpc,1,zeros,one,NSUB,SUBL,last_lag, start); memcpy(decresidual,PLCresidual,BLOCKL*sizeof(float)); order_plus_one=FILTERORDER+1; for(i=0;i<NSUB;i++) memcpy(syntdenum+(i*order_plus_one)+1,PLClpc+1, FILTERORDER*sizeof(float)); ) ..解码的剩余的后滤波 for(i=0;I<NSUB;i++) syntFilter(decresidual+I*SUBL,syntdenum+i*(FILTERORDER+1), SUBL); /*这个函数进行解码的剩余的综合滤波*/ memcpy(decblock,decresidual,BLOCKL*sizeof(float); memcpy(old_syntdenum,syntdenum, NSUB*(FILTERORDER+1)*sizeof(float)); }
Claims (32)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SE0104059A SE521600C2 (sv) | 2001-12-04 | 2001-12-04 | Lågbittaktskodek |
SE01040591 | 2001-12-04 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1615509A CN1615509A (zh) | 2005-05-11 |
CN1305024C true CN1305024C (zh) | 2007-03-14 |
Family
ID=20286184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB028271866A Expired - Lifetime CN1305024C (zh) | 2001-12-04 | 2002-12-03 | 预测编码/解码设备及其方法 |
Country Status (8)
Country | Link |
---|---|
US (2) | US7895046B2 (zh) |
EP (1) | EP1451811B1 (zh) |
CN (1) | CN1305024C (zh) |
AT (1) | ATE437431T1 (zh) |
AU (1) | AU2002358365A1 (zh) |
DE (1) | DE60233068D1 (zh) |
SE (1) | SE521600C2 (zh) |
WO (1) | WO2003049081A1 (zh) |
Families Citing this family (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SE521600C2 (sv) | 2001-12-04 | 2003-11-18 | Global Ip Sound Ab | Lågbittaktskodek |
WO2004084181A2 (en) * | 2003-03-15 | 2004-09-30 | Mindspeed Technologies, Inc. | Simple noise suppression model |
FR2861491B1 (fr) * | 2003-10-24 | 2006-01-06 | Thales Sa | Procede de selection d'unites de synthese |
US7602867B2 (en) * | 2004-08-17 | 2009-10-13 | Broadcom Corporation | System and method for linear distortion estimation by way of equalizer coefficients |
KR101203348B1 (ko) * | 2005-01-31 | 2012-11-20 | 스카이프 | 가중 오버랩 애드 방법 |
TWI285568B (en) * | 2005-02-02 | 2007-08-21 | Dowa Mining Co | Powder of silver particles and process |
US8180631B2 (en) | 2005-07-11 | 2012-05-15 | Lg Electronics Inc. | Apparatus and method of processing an audio signal, utilizing a unique offset associated with each coded-coefficient |
WO2007124485A2 (en) * | 2006-04-21 | 2007-11-01 | Dilithium Networks Pty Ltd. | Method and apparatus for audio transcoding |
AU2008222241B2 (en) * | 2007-03-02 | 2012-11-29 | Panasonic Intellectual Property Corporation Of America | Encoding device and encoding method |
US8280539B2 (en) * | 2007-04-06 | 2012-10-02 | The Echo Nest Corporation | Method and apparatus for automatically segueing between audio tracks |
WO2009090875A1 (ja) * | 2008-01-16 | 2009-07-23 | Panasonic Corporation | ベクトル量子化装置、ベクトル逆量子化装置、およびこれらの方法 |
WO2009110751A2 (ko) * | 2008-03-04 | 2009-09-11 | Lg Electronics Inc. | 오디오 신호 처리 방법 및 장치 |
US8712764B2 (en) * | 2008-07-10 | 2014-04-29 | Voiceage Corporation | Device and method for quantizing and inverse quantizing LPC filters in a super-frame |
FR2938688A1 (fr) * | 2008-11-18 | 2010-05-21 | France Telecom | Codage avec mise en forme du bruit dans un codeur hierarchique |
CN101615394B (zh) * | 2008-12-31 | 2011-02-16 | 华为技术有限公司 | 分配子帧的方法和装置 |
US9245529B2 (en) * | 2009-06-18 | 2016-01-26 | Texas Instruments Incorporated | Adaptive encoding of a digital signal with one or more missing values |
US8554746B2 (en) | 2010-08-18 | 2013-10-08 | Hewlett-Packard Development Company, L.P. | Multiple-source data compression |
ES2747353T3 (es) | 2012-11-15 | 2020-03-10 | Ntt Docomo Inc | Dispositivo de codificación de audio, método de codificación de audio, programa de codificación de audio, dispositivo de decodificación de audio, método de decodificación de audio y programa de decodificación de audio |
US10523490B2 (en) * | 2013-08-06 | 2019-12-31 | Agilepq, Inc. | Authentication of a subscribed code table user utilizing optimized code table signaling |
EP3164942A1 (en) | 2014-07-02 | 2017-05-10 | Agilepq, Inc. | Data recovery utilizing optimized code table signaling |
JP2019518397A (ja) | 2016-06-06 | 2019-06-27 | アジャイルピーキュー, インコーポレイテッド | データ変換システムおよび方法 |
US9934785B1 (en) | 2016-11-30 | 2018-04-03 | Spotify Ab | Identification of taste attributes from an audio signal |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5579435A (en) * | 1993-11-02 | 1996-11-26 | Telefonaktiebolaget Lm Ericsson | Discriminating between stationary and non-stationary signals |
CN1229501A (zh) * | 1997-04-16 | 1999-09-22 | 法国电信局 | 用前向和反向线性预测编码分析编码音频信号的方法和装置 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5621852A (en) * | 1993-12-14 | 1997-04-15 | Interdigital Technology Corporation | Efficient codebook structure for code excited linear prediction coding |
US6101276A (en) * | 1996-06-21 | 2000-08-08 | Compaq Computer Corporation | Method and apparatus for performing two pass quality video compression through pipelining and buffer management |
US7061936B2 (en) * | 2000-03-03 | 2006-06-13 | Ntt Docomo, Inc. | Method and apparatus for packet transmission with header compression |
SE522261C2 (sv) * | 2000-05-10 | 2004-01-27 | Global Ip Sound Ab | Kodning och avkodning av en digital signal |
JP2002101417A (ja) * | 2000-09-22 | 2002-04-05 | Oki Electric Ind Co Ltd | 動画像符号化方法および装置 |
US7020284B2 (en) * | 2000-10-06 | 2006-03-28 | Patrick Oscar Boykin | Perceptual encryption and decryption of movies |
US7171355B1 (en) * | 2000-10-25 | 2007-01-30 | Broadcom Corporation | Method and apparatus for one-stage and two-stage noise feedback coding of speech and audio signals |
JP3957460B2 (ja) * | 2001-01-15 | 2007-08-15 | 沖電気工業株式会社 | 伝送ヘッダ圧縮装置、動画像符号化装置及び動画像伝送システム |
SE521600C2 (sv) | 2001-12-04 | 2003-11-18 | Global Ip Sound Ab | Lågbittaktskodek |
-
2001
- 2001-12-04 SE SE0104059A patent/SE521600C2/sv not_active IP Right Cessation
-
2002
- 2002-12-03 AT AT02792126T patent/ATE437431T1/de not_active IP Right Cessation
- 2002-12-03 DE DE60233068T patent/DE60233068D1/de not_active Expired - Lifetime
- 2002-12-03 AU AU2002358365A patent/AU2002358365A1/en not_active Abandoned
- 2002-12-03 WO PCT/SE2002/002226 patent/WO2003049081A1/en not_active Application Discontinuation
- 2002-12-03 US US10/497,530 patent/US7895046B2/en active Active
- 2002-12-03 EP EP02792126A patent/EP1451811B1/en not_active Expired - Lifetime
- 2002-12-03 CN CNB028271866A patent/CN1305024C/zh not_active Expired - Lifetime
-
2011
- 2011-02-18 US US13/030,929 patent/US8880414B2/en not_active Expired - Lifetime
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5579435A (en) * | 1993-11-02 | 1996-11-26 | Telefonaktiebolaget Lm Ericsson | Discriminating between stationary and non-stationary signals |
CN1229501A (zh) * | 1997-04-16 | 1999-09-22 | 法国电信局 | 用前向和反向线性预测编码分析编码音频信号的方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
ATE437431T1 (de) | 2009-08-15 |
EP1451811A1 (en) | 2004-09-01 |
CN1615509A (zh) | 2005-05-11 |
SE521600C2 (sv) | 2003-11-18 |
DE60233068D1 (de) | 2009-09-03 |
EP1451811B1 (en) | 2009-07-22 |
SE0104059L (sv) | 2003-07-03 |
WO2003049081A1 (en) | 2003-06-12 |
US7895046B2 (en) | 2011-02-22 |
US20110142126A1 (en) | 2011-06-16 |
US20060153286A1 (en) | 2006-07-13 |
SE0104059D0 (sv) | 2001-12-04 |
AU2002358365A1 (en) | 2003-06-17 |
US8880414B2 (en) | 2014-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1305024C (zh) | 预测编码/解码设备及其方法 | |
JP5722040B2 (ja) | スケーラブルなスピーチおよびオーディオコーデックにおける、量子化mdctスペクトルに対するコードブックインデックスのエンコーディング/デコーディングのための技術 | |
KR101246991B1 (ko) | 오디오 신호 처리 방법 | |
US8010348B2 (en) | Adaptive encoding and decoding with forward linear prediction | |
EP1886306B1 (en) | Redundant audio bit stream and audio bit stream processing methods | |
AU2008316860B2 (en) | Scalable speech and audio encoding using combinatorial encoding of MDCT spectrum | |
JP4489960B2 (ja) | 音声の無声セグメントの低ビットレート符号化 | |
CN1735927A (zh) | 用于高质量语音编码转换的方法和装置 | |
KR20070029754A (ko) | 음성 부호화 장치 및 그 방법과, 음성 복호화 장치 및 그방법 | |
CN1669075A (zh) | 音频编码 | |
JP2010020346A (ja) | 音声信号および音楽信号を符号化する方法 | |
RU2004133032A (ru) | Кодирование стереофонических сигналов | |
CN1658282A (zh) | 声音编码方法和声音译码方法以及声音编码装置和声音译码装置 | |
WO2009126759A1 (en) | Method and apparatus for selective signal coding based on core encoder performance | |
CN1470051A (zh) | 非话音语音的高性能低比特率编码方法和设备 | |
CN1188832C (zh) | 过滤语言帧的多脉冲内插编码 | |
US6611797B1 (en) | Speech coding/decoding method and apparatus | |
CN1784716A (zh) | 代码转换方法和设备 | |
JP2004348120A (ja) | 音声符号化装置、音声復号化装置及びこれらの方法 | |
CN1244905C (zh) | 评估编解码参数的方法 | |
JP2002073097A (ja) | Celp型音声符号化装置とcelp型音声復号化装置及び音声符号化方法と音声復号化方法 | |
CN1774742A (zh) | 码变换方法及装置和程序以及记录介质 | |
JP2002169595A (ja) | 固定音源符号帳及び音声符号化/復号化装置 | |
JPH0612097A (ja) | 音声の予測符号化方法および装置 | |
Pondeau | Robust Decoding of Speech Line Spectral Frequencies over |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: GOOGLE INC. Free format text: FORMER OWNER: GLOBAL IP SOLUTIONS INC. Effective date: 20111121 Free format text: FORMER OWNER: GLOBAL IP SOLUTIONS INC. (US) |
|
C41 | Transfer of patent application or patent right or utility model | ||
C56 | Change in the name or address of the patentee |
Owner name: GLOBAL IP SOLUTIONS INC. Free format text: FORMER NAME: GLOBAL IP SOUND AB |
|
CP01 | Change in the name or title of a patent holder |
Address after: Stockholm Co-patentee after: GLOBAL IP SOLUTIONS Inc. Patentee after: Global IP Solutions Gips AB Address before: Stockholm Co-patentee before: Global IP Sound AB Patentee before: Global IP Sound AB |
|
TR01 | Transfer of patent right |
Effective date of registration: 20111121 Address after: California, USA Patentee after: GOOGLE Inc. Address before: Stockholm Co-patentee before: Global IP Solutions Inc. Patentee before: Global IP Solutions Gips AB |
|
C56 | Change in the name or address of the patentee | ||
CP01 | Change in the name or title of a patent holder |
Address after: California, USA Patentee after: GOOGLE Inc. Address before: California, USA Patentee before: Google Inc. |
|
CP01 | Change in the name or title of a patent holder |
Address after: California, USA Patentee after: Google Inc. Address before: California, USA Patentee before: Google Inc. |
|
CP01 | Change in the name or title of a patent holder | ||
CX01 | Expiry of patent term |
Granted publication date: 20070314 |
|
CX01 | Expiry of patent term |