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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lpc.c

?? ARM嵌入式應(yīng)用開發(fā)典型實(shí)例配書光盤,希望對(duì)你有用!
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/***** 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 ;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品影视av免费| 国产老肥熟一区二区三区| 日韩欧美一级精品久久| www.爱久久.com| 免费成人在线网站| 有码一区二区三区| 国产亚洲欧美一区在线观看| 制服.丝袜.亚洲.中文.综合 | 国产精品77777| 亚洲18女电影在线观看| 中文字幕一区二区不卡| 久久久久国产精品麻豆ai换脸| 欧美精品色一区二区三区| 99视频精品免费视频| 国产乱码精品一区二区三区五月婷| 午夜在线成人av| 亚洲精品国产成人久久av盗摄 | 欧美电视剧免费全集观看| 色狠狠综合天天综合综合| 丰满白嫩尤物一区二区| 精品亚洲欧美一区| 青青草国产成人av片免费| 亚洲制服丝袜av| 亚洲三级久久久| ...av二区三区久久精品| 久久久国产综合精品女国产盗摄| 日韩精品中文字幕一区二区三区 | 色成年激情久久综合| 成人黄页毛片网站| 大尺度一区二区| 丁香婷婷综合色啪| 国产成人av一区二区三区在线观看| 激情偷乱视频一区二区三区| 免费观看成人av| 精品在线免费视频| 精品一区二区三区视频在线观看| 蜜臀a∨国产成人精品| 日韩av二区在线播放| 日韩国产精品91| 奇米影视一区二区三区小说| 轻轻草成人在线| 精品一区精品二区高清| 国产一区在线精品| 成人免费视频一区| 99在线精品一区二区三区| 99精品久久99久久久久| 91一区二区在线观看| 欧美综合久久久| 91.com视频| 久久影院视频免费| 国产欧美一区二区精品秋霞影院| 国产精品私人影院| 亚洲激情av在线| 日韩精品乱码av一区二区| 另类人妖一区二区av| 精品一区二区久久久| 成人听书哪个软件好| 一本色道**综合亚洲精品蜜桃冫| 欧洲生活片亚洲生活在线观看| 欧美色手机在线观看| 日韩精品一区二区三区中文不卡| 久久一区二区三区国产精品| 国产精品乱码一区二区三区软件| 亚洲男人天堂一区| 日本aⅴ精品一区二区三区 | 亚洲欧美激情插 | eeuss鲁一区二区三区| 欧美中文字幕亚洲一区二区va在线 | 亚洲电影视频在线| 九九视频精品免费| 99精品1区2区| 欧美电影影音先锋| 久久精品夜夜夜夜久久| 亚洲啪啪综合av一区二区三区| 亚洲 欧美综合在线网络| 国产一区二区调教| 一本大道久久a久久精品综合| 91精品国产aⅴ一区二区| 久久久不卡网国产精品二区| 亚洲精品国产第一综合99久久| 全国精品久久少妇| 91美女在线视频| 日韩欧美国产成人一区二区| 综合电影一区二区三区 | 欧美日韩国产综合视频在线观看| 精品国产制服丝袜高跟| 亚洲精品日日夜夜| 国产精品综合av一区二区国产馆| 欧美专区亚洲专区| 国产日韩欧美精品电影三级在线| 亚洲最快最全在线视频| 国产毛片一区二区| 3751色影院一区二区三区| 亚洲欧美一区二区三区极速播放 | 性做久久久久久免费观看欧美| 国产成人精品网址| 日韩欧美视频在线| 亚洲高清一区二区三区| 成人av资源网站| 欧美mv和日韩mv国产网站| 一区二区三区日韩欧美精品| 国产一区二区三区四| 777a∨成人精品桃花网| 亚洲人123区| 成人黄色在线视频| 久久久久久久久97黄色工厂| 美美哒免费高清在线观看视频一区二区 | 久久精品国产亚洲一区二区三区| 在线一区二区视频| 国产精品国产成人国产三级 | 欧美性生活影院| 亚洲欧洲精品一区二区三区不卡| 国产乱子轮精品视频| 制服丝袜亚洲色图| 五月婷婷综合激情| 欧美图片一区二区三区| 亚洲男人的天堂av| 成人午夜在线视频| 国产三级一区二区| 国内久久精品视频| 欧美mv日韩mv国产网站| 麻豆久久久久久久| 欧美一区日本一区韩国一区| 亚洲第一成年网| 欧美亚日韩国产aⅴ精品中极品| 亚洲欧美日韩国产手机在线| 91亚洲大成网污www| 亚洲日本va在线观看| 99在线精品一区二区三区| 国产精品乱人伦一区二区| 成人h版在线观看| 国产精品成人网| 99久久99久久精品国产片果冻| 中文字幕中文字幕在线一区| 成人av在线影院| 中文字幕一区日韩精品欧美| 99久久99久久免费精品蜜臀| 日韩一区在线免费观看| 日本韩国精品在线| 亚洲黄色录像片| 欧美日韩久久不卡| 日韩不卡一区二区| 日韩欧美卡一卡二| 国产一区二区三区精品视频| 欧美国产日韩精品免费观看| 成人免费毛片嘿嘿连载视频| 亚洲天堂精品在线观看| 91精品福利在线| 丝袜美腿亚洲综合| 欧美本精品男人aⅴ天堂| 国产高清不卡二三区| 中文字幕五月欧美| 欧美在线免费观看视频| 日韩中文字幕1| 精品精品国产高清a毛片牛牛 | 日韩有码一区二区三区| 日韩精品一区二区三区中文不卡 | 天堂久久一区二区三区| 日韩片之四级片| 国产成人在线免费观看| 国产精品高潮呻吟久久| 欧美日韩免费高清一区色橹橹| 免费人成在线不卡| 欧美激情在线一区二区三区| 一本色道久久综合亚洲91| 奇米影视一区二区三区小说| 国产色爱av资源综合区| 欧美综合天天夜夜久久| 久久不见久久见免费视频1| 国产精品美女久久久久久久久久久| 在线观看日韩高清av| 蜜臀av性久久久久蜜臀av麻豆 | 午夜影院久久久| 亚洲精品一区二区在线观看| 97se亚洲国产综合自在线观| 青椒成人免费视频| 国产精品高潮久久久久无| 91精品欧美一区二区三区综合在| 国产馆精品极品| 丝袜美腿亚洲综合| 国产精品美女久久久久aⅴ国产馆| 欧美浪妇xxxx高跟鞋交| 国产成人无遮挡在线视频| 亚洲国产乱码最新视频| 国产清纯在线一区二区www| 欧美日韩国产123区| 成人午夜视频福利| 日韩高清中文字幕一区| 欧美激情一区二区三区不卡| 制服.丝袜.亚洲.中文.综合 | 精品日韩成人av| 欧美图片一区二区三区| 夫妻av一区二区| 精品一区二区三区欧美| 亚洲高清免费在线| 国产精品欧美极品| 欧美成人一区二区| 欧美日韩二区三区| 一本到三区不卡视频| 国产91精品精华液一区二区三区|