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

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

?? lpc.c

?? 視頻會議源碼
?? 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一区二区三区免费野_久草精品视频
国内不卡的二区三区中文字幕| 国产成人精品亚洲午夜麻豆| 麻豆精品一区二区av白丝在线| 国产一区二区女| 在线精品亚洲一区二区不卡| 久久久久亚洲综合| 午夜欧美大尺度福利影院在线看| 国产成人午夜精品5599 | 一本在线高清不卡dvd| 欧美一级xxx| 一卡二卡三卡日韩欧美| 国产精品乡下勾搭老头1| 91精品在线麻豆| 一区二区三区资源| 国产成人午夜片在线观看高清观看| 欧美色国产精品| 亚洲六月丁香色婷婷综合久久| 激情小说欧美图片| 91精品国产全国免费观看| 亚洲精品免费在线| av成人免费在线| 国产欧美一区二区三区鸳鸯浴| 奇米一区二区三区av| 欧美军同video69gay| 一区二区三区**美女毛片| 99久久久久久| 中文字幕免费不卡| 亚洲免费av高清| 一区二区三区欧美在线观看| 欧美中文字幕一二三区视频| 欧美精品久久99| 欧美夫妻性生活| 亚洲人被黑人高潮完整版| 成人在线一区二区三区| 久久久99久久精品欧美| 波多野结衣在线一区| 欧美xxxxx牲另类人与| 奇米四色…亚洲| 91精品国产综合久久久久久漫画| 亚洲成a人片在线不卡一二三区| 色8久久人人97超碰香蕉987| 亚洲欧美激情视频在线观看一区二区三区| 成人av影视在线观看| ...av二区三区久久精品| 91蜜桃在线免费视频| 亚洲综合男人的天堂| 欧美色图在线观看| 日韩激情一二三区| 色综合久久88色综合天天| 99精品偷自拍| 亚洲蜜臀av乱码久久精品蜜桃| 色av一区二区| 视频一区二区国产| 精品盗摄一区二区三区| 国产成人av影院| 亚洲精品一二三四区| 欧美疯狂性受xxxxx喷水图片| 久久国产福利国产秒拍| 国产婷婷精品av在线| 色婷婷香蕉在线一区二区| 偷偷要91色婷婷| 久久久久久久精| av成人老司机| 日本va欧美va瓶| 国产精品欧美经典| 欧美日韩成人综合天天影院| 国产曰批免费观看久久久| 国产精品久久久久久久裸模| 欧美日韩在线观看一区二区| 狠狠狠色丁香婷婷综合久久五月| 中文字幕永久在线不卡| 9191精品国产综合久久久久久 | 亚洲一二三区不卡| 欧美成人a在线| 色悠悠亚洲一区二区| 免费成人在线观看视频| 中文字幕日本不卡| 日韩午夜激情视频| 色999日韩国产欧美一区二区| 久久99精品一区二区三区三区| 国产精品夫妻自拍| 日韩视频免费观看高清完整版在线观看 | 亚洲最新视频在线播放| 精品国产伦一区二区三区免费| 一本色道久久综合精品竹菊| 久久电影网电视剧免费观看| 亚洲自拍偷拍九九九| 国产丝袜欧美中文另类| 日韩一级二级三级精品视频| 色吊一区二区三区 | 视频一区二区中文字幕| 中文字幕亚洲欧美在线不卡| 2021久久国产精品不只是精品| 欧美午夜精品久久久久久孕妇| 成人天堂资源www在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 亚洲精品国产一区二区精华液| 欧美经典一区二区| 亚洲欧洲99久久| 中文字幕第一区| 久久人人爽爽爽人久久久| 欧美一区二区二区| 欧美日韩不卡一区二区| 欧洲一区二区三区免费视频| 成人黄色a**站在线观看| 国产精品一二三在| 极品美女销魂一区二区三区免费 | 中文字幕亚洲成人| 久久久久久日产精品| 精品国产乱码久久久久久牛牛| 911精品产国品一二三产区| 欧美三区在线观看| 国产精品日韩成人| 日韩女优av电影在线观看| 91麻豆swag| 99久久国产综合精品色伊| 成人小视频在线| 国产suv一区二区三区88区| 麻豆免费看一区二区三区| 日韩经典中文字幕一区| 午夜精品久久久久久久久久| 五月天精品一区二区三区| 亚洲成a人在线观看| 五月婷婷激情综合| 三级不卡在线观看| 麻豆成人免费电影| 狠狠色丁香婷婷综合久久片| 国产精品一级黄| 不卡在线视频中文字幕| av网站一区二区三区| 日本久久电影网| 欧美色区777第一页| 91精品国产色综合久久不卡蜜臀 | 久久综合999| 日韩欧美国产综合一区| 欧美成人福利视频| 亚洲bt欧美bt精品| 午夜精品一区二区三区电影天堂| 日韩av中文字幕一区二区三区 | 亚洲另类一区二区| 亚洲成人tv网| 国产一区二区成人久久免费影院| 成人综合在线视频| 欧美亚洲国产一区二区三区va| 欧美日韩一级片网站| 精品剧情v国产在线观看在线| 国产欧美一区二区精品婷婷| 亚洲欧美综合在线精品| 午夜精品福利久久久| 国内久久精品视频| 日本久久电影网| 日韩欧美在线网站| 亚洲人一二三区| 日本不卡在线视频| 成人午夜精品一区二区三区| 欧美在线免费播放| 久久久国产精华| 亚洲国产精品影院| 成人一级视频在线观看| 欧美性感一区二区三区| 久久精品综合网| 午夜影院久久久| 成人av免费在线| 欧美电影免费观看高清完整版在线观看| 国产精品区一区二区三| 视频在线在亚洲| proumb性欧美在线观看| 日韩欧美色综合网站| 亚洲精品成人精品456| 国产一区二区三区av电影 | 亚洲欧美中日韩| 亚洲综合久久久久| 国产乱码精品1区2区3区| 欧洲精品一区二区| 国产欧美精品一区二区色综合| 国产成人高清在线| 欧美变态tickle挠乳网站| 亚洲精品乱码久久久久久| 高清shemale亚洲人妖| 日韩欧美在线网站| 日本一区中文字幕| 欧美午夜不卡视频| 亚洲乱码国产乱码精品精98午夜| 福利视频网站一区二区三区| 欧美一区二区大片| 婷婷成人综合网| 欧美性感一区二区三区| 一区二区在线观看免费视频播放| 懂色av一区二区三区免费观看| 欧美精品一区二区三区很污很色的 | 亚洲精品成人a在线观看| 成人动漫精品一区二区| 国产偷v国产偷v亚洲高清| 韩国三级在线一区| 欧美精品高清视频| 欧美老人xxxx18| 99国产精品一区| 精品国产区一区| 首页亚洲欧美制服丝腿| 欧美日韩日日夜夜|