亚洲欧美第一页_禁久久精品乱码_粉嫩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浏览器入口在线观看| 日韩欧美一级在线播放| 一区二区中文视频| 老汉av免费一区二区三区| 不卡免费追剧大全电视剧网站| 91精品国模一区二区三区| 国产精品久久久久久久久免费相片| 天堂午夜影视日韩欧美一区二区| 国产91在线观看| 欧美一二三在线| 亚洲激情六月丁香| 国产成人h网站| 日韩欧美一区电影| 亚洲第一狼人社区| 91美女在线观看| 中文字幕不卡的av| 激情文学综合网| 欧美男人的天堂一二区| 亚洲天堂中文字幕| 成人黄色在线网站| 久久一留热品黄| 久久99精品国产麻豆婷婷| 欧美精品自拍偷拍动漫精品| 亚洲最新在线观看| 99riav一区二区三区| 国产精品三级视频| 国产成人免费视频一区| 久久综合视频网| 久久不见久久见中文字幕免费| 欧美日韩一级二级三级| 亚洲综合免费观看高清完整版| 播五月开心婷婷综合| 国产精品毛片久久久久久| 国产精一品亚洲二区在线视频| 亚洲精品一区二区精华| 国产专区欧美精品| 久久免费午夜影院| 国产精品1区二区.| 亚洲国产成人自拍| 99久久综合色| 一区二区三区四区亚洲| 欧美三区在线观看| 日韩av中文字幕一区二区| 欧美大片拔萝卜| 国产一区二区三区最好精华液 | 亚洲成人综合视频| 欧美亚洲精品一区| 日韩成人免费电影| 日韩欧美另类在线| 国产成人精品三级麻豆| 国产精品国产自产拍高清av| 一本大道av伊人久久综合| 亚洲欧美偷拍卡通变态| 欧美日韩在线播| 久久精品国产**网站演员| 久久蜜桃av一区二区天堂| 国产成a人无v码亚洲福利| 亚洲欧洲在线观看av| 在线观看免费一区| 日本免费新一区视频| 久久久久久久综合| 91麻豆精品在线观看| 首页亚洲欧美制服丝腿| 337p粉嫩大胆噜噜噜噜噜91av| 成人精品国产一区二区4080| 亚洲一二三四区不卡| 欧美v日韩v国产v| 99久久久久免费精品国产| 亚洲成a人片在线不卡一二三区| 欧美xxxxxxxx| 欧美性受xxxx黑人xyx性爽| 麻豆精品一区二区三区| 亚洲国产精品精华液ab| 欧美日韩国产一级| 国产精品夜夜爽| 亚洲永久免费av| www国产成人免费观看视频 深夜成人网| 成人h动漫精品| 日日骚欧美日韩| 国产精品美女久久福利网站| 91精品国产欧美一区二区成人| 国产成人精品免费网站| 婷婷久久综合九色国产成人| 久久久精品天堂| 欧美人妖巨大在线| www.日韩在线| 精品一区二区三区免费观看| 亚洲国产综合在线| 国产日韩欧美制服另类| 91精品久久久久久蜜臀| 91麻豆国产香蕉久久精品| 国产综合成人久久大片91| 亚洲不卡在线观看| 亚洲大型综合色站| 欧美国产成人在线| 91精品国产福利在线观看| 日本乱人伦aⅴ精品| 成人h精品动漫一区二区三区| 老司机免费视频一区二区三区| 一区二区三区色| 国产精品美女久久久久久| 国产性做久久久久久| 欧美一区二区精美| 欧美精品日韩一本| 91国模大尺度私拍在线视频| 成人激情小说网站| 国产福利精品一区二区| 韩国精品在线观看| 蜜桃视频在线观看一区二区| 亚洲国产成人91porn| 亚洲黄色av一区| 亚洲免费在线电影| 亚洲免费观看高清完整版在线| 国产精品福利一区| 国产精品欧美久久久久无广告| 久久精品人人做| 久久久久久久久久电影| 日韩欧美国产小视频| 日韩午夜在线观看视频| 91精品在线观看入口| 欧美久久久久久久久久 | 麻豆中文一区二区| 美脚の诱脚舐め脚责91| 蜜臀av一级做a爰片久久| 久久精品国产久精国产爱| 麻豆国产欧美日韩综合精品二区| 奇米888四色在线精品| 麻豆91免费看| 国产在线精品一区在线观看麻豆| 精品综合久久久久久8888| 黑人精品欧美一区二区蜜桃| 九色综合狠狠综合久久| 国产一区二区美女| 成人av在线播放网站| 色综合久久久久综合99| 欧美视频一区在线| 欧美一区二区三区婷婷月色| 日韩精品专区在线| 欧美国产一区在线| 一区二区三区四区五区视频在线观看| 亚洲国产va精品久久久不卡综合| 免费在线观看精品| 大胆亚洲人体视频| 欧美午夜电影一区| 日韩精品一区二区在线观看| 国产肉丝袜一区二区| 一区二区三区加勒比av| 蜜桃av一区二区| av电影在线观看完整版一区二区| 欧美亚洲一区二区在线| 精品精品欲导航| 亚洲色大成网站www久久九九| 亚洲成人精品一区| 狠狠色狠狠色综合系列| 91理论电影在线观看| 日韩精品在线网站| 亚洲免费资源在线播放| 美女视频第一区二区三区免费观看网站| 国产aⅴ综合色| 欧美绝品在线观看成人午夜影视| 久久久亚洲精品一区二区三区| 亚洲天堂中文字幕| 狠狠狠色丁香婷婷综合久久五月| 色综合久久九月婷婷色综合| 欧美mv和日韩mv的网站| 亚洲女性喷水在线观看一区| 卡一卡二国产精品| 欧美三级乱人伦电影| 国产欧美一区在线| 日本中文字幕一区二区视频 | 国产乱码字幕精品高清av| 精品视频一区二区不卡| 国产午夜精品美女毛片视频| 日产国产欧美视频一区精品| 91极品视觉盛宴| 中文字幕免费不卡在线| 麻豆成人91精品二区三区| 欧美在线一二三| 国产精品电影一区二区| 国产精品一区在线观看乱码| 日韩亚洲电影在线| 亚洲大片免费看| 在线观看免费一区| 亚洲人成小说网站色在线| 国产激情视频一区二区在线观看| 欧美一区二区视频观看视频| 亚洲图片欧美综合| 91麻豆产精品久久久久久 | 国产精品国产三级国产专播品爱网 | 亚洲精选免费视频| thepron国产精品| 日本一区二区成人在线| 国产一区二区中文字幕| 精品国产99国产精品| 久久99精品久久久久久国产越南| 欧美一区二区视频在线观看2020|