亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lpc.c

?? ARM嵌入式應用開發典型實例配書光盤,希望對你有用!
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***** File:    lpc.c**** Description: Functions that implement linear predictive coding **      (LPC) operations.  **** Functions:****  Computing LPC coefficients:****      Comp_Lpc()**      Durbin()****  Perceptual noise weighting:****      Wght_Lpc()**      Error_Wght()****  Computing combined impulse response:****      Comp_Ir()****  Computing ringing response:****      Sub_Ring()**      Upd_Ring()****  Synthesizing speech:****      Synt()**      Spf()*//*    ITU-T G.723 Speech Coder   ANSI-C Source Code     Version 5.00    copyright (c) 1995, AudioCodes, DSP Group, France Telecom,    Universite de Sherbrooke.  All rights reserved.*/#include <stdio.h>#include "basop.h"#include "cst_lbc.h"#include "tab_lbc.h"#include "lbccodec.h"#include "decod.h"#include "util_lbc.h"#include "lpc.h"#include "coder_pc.h"#include "decod_pc.h"/***** Function:        Comp_Lpc()**** Description:     Computes the tenth-order LPC filters for an**          entire frame.  For each subframe, a**          Hamming-windowed block of 180 samples,**          centered around the subframe, is used to**          compute eleven autocorrelation coefficients.**          The Levinson-Durbin algorithm then generates**          the LPC coefficients.  This function requires**          a look-ahead of one subframe, and hence**          introduces a 7.5 ms encoding delay.**** Links to text:   Section 2.4**** Arguments:****  Word16 *UnqLpc      Empty Buffer**  Word16 PrevDat[]    Previous 2 subframes of samples (120 words)**  Word16 DataBuff[]   Current frame of samples (240 words)**** Outputs:****  Word16 UnqLpc[]     LPC coefficients for entire frame (40 words)**** Return value:    None***/void  Comp_Lpc( Word16 *UnqLpc, Word16 *PrevDat, Word16 *DataBuff ){    int   i,j,k ;    Word16   Dpnt[Frame+LpcFrame-SubFrLen] ;    Word16   Vect[LpcFrame] ;    Word16   Acf_sf[LpcOrderP1*SubFrames];    Word16   ShAcf_sf[SubFrames];    Word16   Exp   ;    Word16   *curAcf;    Word16   Pk2;    Word32   Acc0,Acc1   ;    /*     * Generate a buffer of 360 samples.  This consists of 120 samples     * from the previous frame and 240 samples from the current frame.     */    for ( i = 0 ; i < LpcFrame-SubFrLen ; i ++ )        Dpnt[i] = PrevDat[i] ;    for ( i = 0 ; i < Frame ; i ++ )        Dpnt[i+LpcFrame-SubFrLen] = DataBuff[i] ;    /*     * Repeat for all subframes     */    curAcf = Acf_sf;    for ( k = 0 ; k < SubFrames ; k ++ ) {        /*        * Do windowing        */        /* Get block of 180 samples centered around current subframe */        for ( i = 0 ; i < LpcFrame ; i ++ )            Vect[i] = Dpnt[k*SubFrLen+i] ;        /* Normalize */        ShAcf_sf[k] = Vec_Norm( Vect, (Word16) LpcFrame ) ;        /* Apply the Hamming window */        for ( i = 0 ; i < LpcFrame ; i ++ )            Vect[i] = mult_r(Vect[i], HammingWindowTable[i]) ;        /*        * Compute the autocorrelation coefficients        */        /* Compute the zeroth-order coefficient (energy) */        Acc1 = (Word32) 0 ;        for ( i = 0 ; i < LpcFrame ; i ++ ) {            Acc0 = L_mult( Vect[i], Vect[i] ) ;            Acc0 = L_shr( Acc0, (Word16) 1 ) ;            Acc1 = L_add( Acc1, Acc0 ) ;        }        /* Apply a white noise correction factor of (1025/1024) */        Acc0 = L_shr( Acc1, (Word16) RidgeFact ) ;        Acc1 = L_add( Acc1, Acc0 ) ;        /* Normalize the energy */        Exp = norm_l( Acc1 ) ;        Acc1 = L_shl( Acc1, Exp ) ;        curAcf[0] = round( Acc1 ) ;        if(curAcf[0] == 0) {            for ( i = 1 ; i <= LpcOrder ; i ++ )                curAcf[i] = 0;            ShAcf_sf[k] = 40;        }        else {            /* Compute the rest of the autocorrelation coefficients.               Multiply them by a binomial coefficients lag window. */            for ( i = 1 ; i <= LpcOrder ; i ++ ) {                Acc1 = (Word32) 0 ;                for ( j = i ; j < LpcFrame ; j ++ ) {                    Acc0 = L_mult( Vect[j], Vect[j-i] ) ;                    Acc0 = L_shr( Acc0, (Word16) 1 ) ;                    Acc1 = L_add( Acc1, Acc0 ) ;                }                Acc0 = L_shl( Acc1, Exp ) ;                Acc0 = L_mls( Acc0, BinomialWindowTable[i-1] ) ;                curAcf[i] = round(Acc0) ;            }            /* Save Acf scaling factor */            ShAcf_sf[k] = add(Exp, shl(ShAcf_sf[k], 1));        }        /*         * Apply the Levinson-Durbin algorithm to generate the LPC         * coefficients        */        Durbin( &UnqLpc[k*LpcOrder], &curAcf[1], curAcf[0], &Pk2 );        CodStat.SinDet <<= 1;        if ( Pk2 > 0x799a ) {            CodStat.SinDet ++ ;        }        curAcf += LpcOrderP1;    }    /* Update sine detector */    CodStat.SinDet &= 0x7fff ;    j = CodStat.SinDet ;    k = 0 ;    for ( i = 0 ; i < 15 ; i ++ ) {        k += j & 1 ;        j >>= 1 ;    }    if ( k >= 14 )        CodStat.SinDet |= 0x8000 ;    /* Update CNG Acf memories */    Update_Acf(Acf_sf, ShAcf_sf);}/***** Function:        Durbin()**** Description:     Implements the Levinson-Durbin algorithm for a**          subframe.  The Levinson-Durbin algorithm**          recursively computes the minimum mean-squared**          error (MMSE) linear prediction filter based on the**          estimated autocorrelation coefficients.**** Links to text:   Section 2.4**** Arguments:       ****  Word16 *Lpc Empty buffer**  Word16 Corr[]   First- through tenth-order autocorrelations (10 words)**  Word16 Err  Zeroth-order autocorrelation, or energy**** Outputs:     ****  Word16 Lpc[]    LPC coefficients (10 words)**** Return value:    The error***/Word16  Durbin( Word16 *Lpc, Word16 *Corr, Word16 Err, Word16 *Pk2 ){    int   i,j   ;    Word16   Temp[LpcOrder] ;    Word16   Pk ;    Word32   Acc0,Acc1,Acc2 ; /*  * Initialize the LPC vector  */    for ( i = 0 ; i < LpcOrder ; i ++ )        Lpc[i] = (Word16) 0 ; /*  * Do the recursion.  At the ith step, the algorithm computes the  * (i+1)th - order MMSE linear prediction filter.  */    for ( i = 0 ; i < LpcOrder ; i ++ ) {/* * Compute the partial correlation (parcor) coefficient */        /* Start parcor computation */        Acc0 = L_deposit_h( Corr[i] ) ;        Acc0 = L_shr( Acc0, (Word16) 2 ) ;        for ( j = 0 ; j < i ; j ++ )            Acc0 = L_msu( Acc0, Lpc[j], Corr[i-j-1] ) ;        Acc0 = L_shl( Acc0, (Word16) 2 ) ;        /* Save sign */        Acc1 = Acc0 ;        Acc0 = L_abs( Acc0 ) ;        /* Finish parcor computation */        Acc2 = L_deposit_h( Err ) ;        if ( Acc0 >= Acc2 ) {            *Pk2 = 32767;            break ;        }        Pk = div_l( Acc0, Err ) ;        if ( Acc1 >= 0 )            Pk = negate(Pk) ; /*  * Sine detector  */        if ( i == 1 ) *Pk2 = Pk; /*  * Compute the ith LPC coefficient  */        Acc0 = L_deposit_h( negate(Pk) ) ;        Acc0 = L_shr( Acc0, (Word16) 2 ) ;        Lpc[i] = round( Acc0 ) ; /*  * Update the prediction error  */        Acc1 = L_mls( Acc1, Pk ) ;        Acc1 = L_add( Acc1, Acc2 ) ;        Err = round( Acc1 ) ; /*  * Compute the remaining LPC coefficients  */        for ( j = 0 ; j < i ; j ++ )            Temp[j] = Lpc[j] ;        for ( j = 0 ; j < i ; j ++ ) {            Acc0 = L_deposit_h( Lpc[j] ) ;            Acc0 = L_mac( Acc0, Pk, Temp[i-j-1] ) ;            Lpc[j] = round( Acc0 ) ;        }    }    return Err ;}/***** Function:        Wght_Lpc()**** Description:     Computes the formant perceptual weighting**          filter coefficients for a frame.  These**          coefficients are geometrically scaled versions**          of the unquantized LPC coefficients.**** Links to text:   Section 2.8  **** Arguments:       ****  Word16 *PerLpc      Empty Buffer**  Word16 UnqLpc[]     Unquantized LPC coefficients (40 words)**** Outputs:     ****  Word16 PerLpc[]     Perceptual weighting filter coefficients**              (80 words)**** Return value:    None***/void  Wght_Lpc( Word16 *PerLpc, Word16 *UnqLpc ){    int   i,j   ; /*  * Do for all subframes  */    for ( i = 0 ; i < SubFrames ; i ++ ) { /*  * Compute the jth FIR coefficient by multiplying the jth LPC  * coefficient by (0.9)^j.  */        for ( j = 0 ; j < LpcOrder ; j ++ )            PerLpc[j] = mult_r( UnqLpc[j], PerFiltZeroTable[j] ) ;        PerLpc += LpcOrder ;/* * Compute the jth IIR coefficient by multiplying the jth LPC * coefficient by (0.5)^j. */        for ( j = 0 ; j < LpcOrder ; j ++ )            PerLpc[j] = mult_r( UnqLpc[j], PerFiltPoleTable[j] ) ;        PerLpc += LpcOrder ;        UnqLpc += LpcOrder ;    }}/***** Function:        Error_Wght()**** Description:     Implements the formant perceptual weighting**          filter for a frame. This filter effectively**          deemphasizes the formant frequencies in the**          error signal.**** Links to text:   Section 2.8**** Arguments:****  Word16 Dpnt[]       Highpass filtered speech x[n] (240 words)**  Word16 PerLpc[]     Filter coefficients (80 words)**** Inputs:****  CodStat.WghtFirDl[] FIR filter memory from previous frame (10 words)**  CodStat.WghtIirDl[] IIR filter memory from previous frame (10 words)**** Outputs:****  Word16 Dpnt[]       Weighted speech f[n] (240 words)**** Return value:    None***/void  Error_Wght( Word16 *Dpnt, Word16 *PerLpc ){    int   i,j,k ;    Word32   Acc0  ;/* * Do for all subframes */    for ( k = 0 ; k < SubFrames ; k ++ ) {        for ( i = 0 ; i < SubFrLen ; i ++ ) {/* * Do the FIR part */            /* Filter */            Acc0 = L_mult( *Dpnt, (Word16) 0x2000 ) ;          // val1*val2*2            for ( j = 0 ; j < LpcOrder ; j ++ )                Acc0 = L_msu( Acc0, PerLpc[j], CodStat.WghtFirDl[j] ) ;            /* Update memory */            for ( j = LpcOrder-1 ; j > 0 ; j -- )                CodStat.WghtFirDl[j] = CodStat.WghtFirDl[j-1] ;            CodStat.WghtFirDl[0] = *Dpnt ; /*  * Do the IIR part  */            /* Filter */            for ( j = 0 ; j < LpcOrder ; j ++ )                Acc0 = L_mac( Acc0, PerLpc[LpcOrder+j],                                                    CodStat.WghtIirDl[j] ) ;            for ( j = LpcOrder-1 ; j > 0 ; j -- )                CodStat.WghtIirDl[j] = CodStat.WghtIirDl[j-1] ;            Acc0 = L_shl( Acc0, (Word16) 2 ) ;            /* Update memory */            CodStat.WghtIirDl[0] = round( Acc0 ) ;            *Dpnt ++ = CodStat.WghtIirDl[0] ;        }        PerLpc += 2*LpcOrder ;    }}/***** Function:        Comp_Ir()**** Description:     Computes the combined impulse response of the**          formant perceptual weighting filter, harmonic**          noise shaping filter, and synthesis filter for**          a subframe.**** Links to text:   Section 2.12**** Arguments:****  Word16 *ImpResp     Empty Buffer**  Word16 QntLpc[]     Quantized LPC coefficients (10 words)**  Word16 PerLpc[]     Perceptual filter coefficients (20 words)**  PWDEF Pw        Harmonic noise shaping filter parameters**** Outputs:****  Word16 ImpResp[]    Combined impulse response (60 words)**** Return value:    None***/void  Comp_Ir( Word16 *ImpResp, Word16 *QntLpc, Word16 *PerLpc, PWDEF Pw ){    int   i,j   ;    Word16   FirDl[LpcOrder] ;    Word16   IirDl[LpcOrder] ;    Word16   Temp[PitchMax+SubFrLen] ;    Word32   Acc0,Acc1 ; /*  * Clear all memory.  Impulse response calculation requires  * an all-zero initial state.  */    /* Perceptual weighting filter */    for ( i = 0 ; i < LpcOrder ; i ++ )        FirDl[i] = IirDl[i] = (Word16) 0 ;    /* Harmonic noise shaping filter */    for ( i = 0 ; i < PitchMax+SubFrLen ; i ++ )        Temp[i] = (Word16) 0 ;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合国产精品| 91美女片黄在线观看| 亚洲综合无码一区二区| 国产精品初高中害羞小美女文| 2021国产精品久久精品| 久久免费看少妇高潮| 久久久美女毛片| 国产欧美日韩在线观看| 国产亚洲美州欧州综合国| 欧美高清在线一区二区| 亚洲国产电影在线观看| 国产精品国产馆在线真实露脸 | 亚洲成av人影院| 亚洲午夜在线电影| 日本美女视频一区二区| 免费xxxx性欧美18vr| 久草这里只有精品视频| 懂色av一区二区三区蜜臀| 不卡一区二区中文字幕| 一本大道综合伊人精品热热 | 亚洲成人综合在线| 免费成人深夜小野草| 国产精品一线二线三线精华| 成a人片亚洲日本久久| 在线视频综合导航| 欧美一级视频精品观看| 欧美国产精品久久| 五月天亚洲婷婷| 国产精品1区二区.| 欧美视频一二三区| 久久久久久电影| 一区二区三区日本| 精品一区二区三区在线观看国产 | 色综合色综合色综合色综合色综合 | 成人国产亚洲欧美成人综合网 | 成人激情黄色小说| 欧美日韩一区二区电影| 精品欧美久久久| 国产精品白丝在线| 久久福利资源站| 欧美性高清videossexo| 久久久99久久精品欧美| 亚洲午夜在线电影| 不卡高清视频专区| 欧美mv和日韩mv国产网站| 一区二区三区91| 成人激情电影免费在线观看| 欧美一区二区三区免费视频| 自拍偷拍亚洲综合| 国产精品18久久久久久久久久久久| 日本韩国精品一区二区在线观看| 久久综合成人精品亚洲另类欧美| 亚洲h动漫在线| 91免费视频网| 欧美经典三级视频一区二区三区| 天天av天天翘天天综合网色鬼国产| 成人在线视频首页| 久久婷婷一区二区三区| 婷婷国产v国产偷v亚洲高清| av激情综合网| 国产欧美一区二区精品久导航 | 欧美国产在线观看| 蜜臀av国产精品久久久久| 日本韩国精品一区二区在线观看| 日本一区二区高清| 国产精品18久久久久久久久| 欧美成人一区二区三区 | 欧美r级电影在线观看| 亚洲sss视频在线视频| 色综合久久88色综合天天免费| 久久久久久久国产精品影院| 毛片av一区二区三区| 欧美私模裸体表演在线观看| 亚洲精品老司机| 91丨九色丨蝌蚪丨老版| 国产精品久久久久影院老司 | 欧美在线看片a免费观看| 国产嫩草影院久久久久| 国产盗摄一区二区| 国产精品国产三级国产aⅴ中文| 国产精品996| 国产精品伦理一区二区| 成人小视频在线观看| 中文字幕免费一区| 波多野结衣中文字幕一区| 国产精品水嫩水嫩| av在线一区二区三区| 国产精品二三区| 色婷婷久久久亚洲一区二区三区| 亚洲人成亚洲人成在线观看图片| 99久久精品99国产精品| 亚洲一区国产视频| 欧美精品少妇一区二区三区 | 国产原创一区二区三区| 久久婷婷久久一区二区三区| 成人影视亚洲图片在线| 一级特黄大欧美久久久| 91精品免费在线| 国产成人综合视频| 亚洲精品免费播放| 91精品国产欧美日韩| 国产精品综合网| 一区二区三区日韩欧美| 91精品在线免费观看| 国产一区二区在线观看视频| 国产精品久久久久婷婷二区次| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲欧美日韩国产另类专区| 欧美在线免费观看亚洲| 久久99热这里只有精品| 成人免费视频在线观看| 日韩一区二区电影在线| 99精品偷自拍| 精品一区二区三区免费播放| 亚洲啪啪综合av一区二区三区| 欧美日韩成人综合| 成人性生交大片免费看中文网站| 亚洲国产精品久久久男人的天堂| 久久久久久99久久久精品网站| 在线观看www91| 国产在线播放一区| 日本伊人午夜精品| 亚洲欧洲日韩女同| 久久综合网色—综合色88| 日本久久电影网| 岛国av在线一区| 极品尤物av久久免费看| 亚洲福利视频一区二区| 日本一区二区视频在线| 日韩午夜中文字幕| 在线视频你懂得一区| 成人黄色免费短视频| 国产在线一区二区综合免费视频| 亚洲电影在线播放| 国产日韩精品一区二区三区在线| 欧美精品乱人伦久久久久久| www.亚洲色图.com| 国产成人精品www牛牛影视| 青青草国产成人av片免费| 一区二区三区免费在线观看| 日本一区二区三区国色天香| 精品国产免费一区二区三区四区 | 欧美日韩视频在线一区二区| av中文字幕在线不卡| 国产丶欧美丶日本不卡视频| 精品一区二区三区香蕉蜜桃 | av电影在线观看完整版一区二区| 乱中年女人伦av一区二区| 亚洲一区二区三区四区五区黄 | 国产精品免费看片| 久久综合资源网| 久久久久久久久久久99999| 日韩欧美国产精品一区| 欧美一级高清片在线观看| 7777精品伊人久久久大香线蕉完整版| 日本精品一区二区三区四区的功能| 91视视频在线直接观看在线看网页在线看| 国产伦精一区二区三区| 国产精品一区三区| 国产成人av电影| 99久久综合99久久综合网站| va亚洲va日韩不卡在线观看| 成人av集中营| 日本高清无吗v一区| 欧美在线免费视屏| 日韩一区二区免费在线观看| 欧美精品一区二区高清在线观看| 久久亚洲一区二区三区四区| 日本一区二区成人| 一区二区三区精品在线观看| 亚洲精品日韩一| 美日韩黄色大片| 国产精品乡下勾搭老头1| 不卡一卡二卡三乱码免费网站| 一本大道久久a久久综合婷婷| 在线观看亚洲精品视频| 日韩视频在线永久播放| 久久久国产综合精品女国产盗摄| 国产精品人人做人人爽人人添| 亚洲久草在线视频| 裸体健美xxxx欧美裸体表演| 国产精品自拍在线| 91福利小视频| 精品少妇一区二区三区日产乱码 | 成人激情免费视频| 欧美伊人久久大香线蕉综合69 | 久久亚洲影视婷婷| 亚洲男同1069视频| 蜜桃视频一区二区三区在线观看| 国产精品主播直播| 91久久精品网| 国产三级久久久| 午夜精品一区二区三区电影天堂| 国产在线不卡一区| 在线观看视频一区| 中文字幕乱码一区二区免费| 天天操天天色综合| 日本乱人伦aⅴ精品| 久久久蜜桃精品| 三级久久三级久久|