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

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

?? lsp.c

?? ARM上實(shí)現(xiàn)視頻會(huì)議源代碼
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/***** File:    lsp.c**** Description: Functions that implement line spectral pair **      (LSP) operations.  **** Functions:****  Converting between linear predictive coding (LPC) coefficients**  and LSP frequencies:****      AtoLsp()**      LsptoA()****  Vector quantization (VQ) of LSP frequencies:****      Lsp_Qnt()**      Lsp_Svq()**      Lsp_Inq()****  Interpolation of LSP frequencies:****      Lsp_Int()*//*    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 "lsp.h"/***** Function:            AtoLsp()**** Description:     Transforms 10 LPC coefficients to the 10**          corresponding LSP frequencies for a subframe.**          This transformation is done once per frame,**          for subframe 3 only.  The transform algorithm**          generates sum and difference polynomials from**          the LPC coefficients.  It then evaluates the**          sum and difference polynomials at uniform**          intervals of pi/256 along the unit circle.**          Intervals where a sign change occurs are**          interpolated to find the zeros of the**          polynomials, which are the LSP frequencies.**** Links to text:   Section 2.5**** Arguments:       ****  Word16 *LspVect     Empty Buffer**  Word16 Lpc[]        Unquantized LPC coefficients (10 words)**  Word16 PrevLsp[]    LSP frequencies from the previous frame (10 words)**** Outputs:****  Word16 LspVect[]    LSP frequencies for the current frame (10 words)**** Return value:        None****/void AtoLsp( Word16 *LspVect, Word16 *Lpc, Word16 *PrevLsp ){    int   i,j,k ;    Word32   Lpq[LpcOrder+2] ;    Word16   Spq[LpcOrder+2] ;    Word16   Exp   ;    Word16   LspCnt ;    Word32   PrevVal,CurrVal   ;    Word32   Acc0,Acc1   ; /*  * Perform a bandwidth expansion on the LPC coefficients.  This  * scales the poles of the LPC synthesis filter by a factor of  * 0.994.  */    for ( i = 0 ; i < LpcOrder ; i ++ )        LspVect[i] = mult_r( Lpc[i], BandExpTable[i] ) ; /*  * Compute the sum and difference polynomials with the roots at z =  * -1 (sum) or z = +1 (difference) removed.  Let these polynomials  * be P(z) and Q(z) respectively, and let their coefficients be  * {p_i} amd {q_i}.  The coefficients are stored in the array Lpq[]  * as follows: p_0, q_0, p_1, q_1, ..., p_5, q_5.  There is no need  * to store the other coefficients because of symmetry.  */ /*  * Set p_0 = q_0 = 1.  The LPC coefficients are already scaled by  *  1/4.  P(z) and Q(z) are scaled by an additional scaling factor of  *  1/16, for an overall factor of 1/64 = 0x02000000L.  */    Lpq[0] = Lpq[1] = (Word32) 0x02000000L ; /*  * This loop computes the coefficients of P(z) and Q(z).  The long  * division (to remove the real zeros) is done recursively.  */    for ( i = 0 ; i < LpcOrder/2 ; i ++ ) {        /* P(z) */        Acc0 = L_negate( Lpq[2*i+0] ) ;        Acc1 = L_deposit_h( LspVect[i] ) ;        Acc1 = L_shr( Acc1, (Word16) 4 ) ;        Acc0 = L_sub( Acc0, Acc1 ) ;        Acc1 = L_deposit_h( LspVect[LpcOrder-1-i] ) ;        Acc1 = L_shr( Acc1, (Word16) 4 ) ;        Acc0 = L_sub( Acc0, Acc1 ) ;        Lpq[2*i+2] = Acc0 ;        /* Q(z) */        Acc0 = Lpq[2*i+1] ;        Acc1 = L_deposit_h( LspVect[i] ) ;        Acc1 = L_shr( Acc1, (Word16) 4 ) ;        Acc0 = L_sub( Acc0, Acc1 ) ;        Acc1 = L_deposit_h( LspVect[LpcOrder-1-i] ) ;        Acc1 = L_shr( Acc1, (Word16) 4 ) ;        Acc0 = L_add( Acc0, Acc1 ) ;        Lpq[2*i+3] = Acc0 ;    } /*  * Divide p_5 and q_5 by 2 for proper weighting during polynomial  * evaluation.  */    Lpq[LpcOrder+0] = L_shr( Lpq[LpcOrder+0], (Word16) 1 ) ;    Lpq[LpcOrder+1] = L_shr( Lpq[LpcOrder+1], (Word16) 1 ) ; /*  * Normalize the polynomial coefficients and convert to shorts  */    /* Find the maximum */    Acc1 = L_abs( Lpq[0] ) ;    for ( i = 1 ; i < LpcOrder+2 ; i ++ ) {        Acc0 = L_abs( Lpq[i] ) ;        if ( Acc0 > Acc1 )            Acc1 = Acc0 ;    }    /* Compute the normalization factor */    Exp = norm_l( Acc1 ) ;    /* Normalize and convert to shorts */    for ( i = 0 ; i < LpcOrder+2 ; i ++ ) {        Acc0 = L_shl( Lpq[i], Exp ) ;        Spq[i] = round( Acc0 ) ;    } /*  * Initialize the search loop  */ /*  * The variable k is a flag that indicates which polynomial (sum or  * difference) the algorithm is currently evaluating.  Start with  * the sum.  */    k = 0 ;    /* Evaluate the sum polynomial at frequency zero */    PrevVal = (Word32) 0 ;    for ( j = 0 ; j <= LpcOrder/2 ; j ++ )        PrevVal = L_mac( PrevVal, Spq[2*j], CosineTable[0] ) ; /*  * Search loop.  Evaluate P(z) and Q(z) at uniform intervals of  * pi/256 along the unit circle.  Check for zero crossings.  The  * zeros of P(w) and Q(w) alternate, so only one of them need by  * evaluated at any given step.  */    LspCnt = (Word16) 0 ;    for ( i = 1 ; i < CosineTableSize/2 ; i ++ ) {        /* Evaluate the selected polynomial */        CurrVal = (Word32) 0 ;        for ( j = 0 ; j <= LpcOrder/2 ; j ++ )            CurrVal = L_mac( CurrVal, Spq[LpcOrder-2*j+k],                                    CosineTable[i*j%CosineTableSize] ) ;        /* Check for a sign change, indicating a zero crossing */        if ( (CurrVal ^ PrevVal) < (Word32) 0 ) { /*  * Interpolate to find the bottom 7 bits of the  * zero-crossing frequency  */            Acc0 = L_abs( CurrVal ) ;            Acc1 = L_abs( PrevVal ) ;            Acc0 = L_add( Acc0, Acc1 ) ;            /* Normalize the sum */            Exp = norm_l( Acc0 ) ;            Acc0 = L_shl( Acc0, Exp ) ;            Acc1 = L_shl( Acc1, Exp ) ;            Acc1 = L_shr( Acc1, (Word16) 8 ) ;            LspVect[LspCnt] = div_l( Acc1, extract_h( Acc0 ) ) ; /*  * Add the upper part of the zero-crossing frequency,  * i.e. bits 7-15  */            Exp = shl( (Word16) (i-1), (Word16) 7 ) ;            LspVect[LspCnt] = add( LspVect[LspCnt], Exp ) ;            LspCnt ++ ;            /* Check if all zeros have been found */            if ( LspCnt == (Word16) LpcOrder )                break ; /*  * Switch the pointer between sum and difference polynomials  */            k ^= 1 ; /*  * Evaluate the new polynomial at the current frequency  */            CurrVal = (Word32) 0 ;            for ( j = 0 ; j <= LpcOrder/2 ; j ++ )                CurrVal = L_mac( CurrVal, Spq[LpcOrder-2*j+k],                                    CosineTable[i*j%CosineTableSize] ) ;        }        /* Update the previous value */        PrevVal = CurrVal ;    } /*  * Check if all 10 zeros were found.  If not, ignore the results of  * the search and use the previous frame's LSP frequencies instead.  */    if ( LspCnt != (Word16) LpcOrder ) {        for ( j = 0 ; j < LpcOrder ; j ++ )            LspVect[j] = PrevLsp[j] ;    }    return ;}/***** Function:            Lsp_Qnt()**** Description:     Vector quantizes the LSP frequencies.  The LSP**          vector is divided into 3 sub-vectors, or**          bands, of dimension 3, 3, and 4.  Each band is**          quantized separately using a different VQ**          table.  Each table has 256 entries, so the**          quantization generates three indices of 8 bits**          each.  (Only the LSP vector for subframe 3 is**          quantized per frame.)**** Links to text:   Section 2.5**** Arguments:       ****  Word16 CurrLsp[]    Unquantized LSP frequencies for the current frame (10 words)**  Word16 PrevLsp[]    LSP frequencies from the previous frame (10 words)**** Outputs:             Quantized LSP frequencies for the current frame (10 words)**** Return value:****  Word32      Long word packed with the 3 VQ indices.  Band 0**          corresponds to bits [23:16], band 1 corresponds**          to bits [15:8], and band 2 corresponds to bits [7:0].**          (Bit 0 is the least significant.)***/Word32   Lsp_Qnt( Word16 *CurrLsp, Word16 *PrevLsp ){    int   i ;    Word16   Wvect[LpcOrder] ;    Word16   Tmp0,Tmp1   ;    Word16   Exp   ; /*  * Compute the VQ weighting vector.  The weights assign greater  * precision to those frequencies that are closer together.  */    /* Compute the end differences */    Wvect[0] = sub( CurrLsp[1], CurrLsp[0] ) ;    Wvect[LpcOrder-1] = sub( CurrLsp[LpcOrder-1], CurrLsp[LpcOrder-2] ) ;    /* Compute the rest of the differences */    for ( i = 1 ; i < LpcOrder-1 ; i ++ ) {        Tmp0 = sub( CurrLsp[i+1], CurrLsp[i] ) ;        Tmp1 = sub( CurrLsp[i], CurrLsp[i-1] ) ;        if ( Tmp0 > Tmp1 )            Wvect[i] = Tmp1 ;        else            Wvect[i] = Tmp0 ;    }    /* Invert the differences */    Tmp0 = (Word16) 0x0020 ;    for ( i = 0 ; i < LpcOrder ; i ++ ) {        if ( Wvect[i] > Tmp0 )            Wvect[i] = div_s( Tmp0, Wvect[i] ) ;        else            Wvect[i] = MAX_16 ;    }    /* Normalize the weight vector */    Tmp0 = (Word16) 0 ;    for ( i = 0 ; i < LpcOrder ; i ++ )        if ( Wvect[i] > Tmp0 )            Tmp0 = Wvect[i] ;    Exp = norm_s( Tmp0 ) ;    for ( i = 0 ; i < LpcOrder ; i ++ )        Wvect[i] = shl( Wvect[i], Exp ) ; /*  * Compute the VQ target vector.  This is the residual that remains  * after subtracting both the DC and predicted  * components.  */ /*  * Subtract the DC component from both the current and previous LSP  * vectors.  */    for ( i = 0 ; i < LpcOrder ; i ++ ) {        CurrLsp[i] = sub( CurrLsp[i], LspDcTable[i] ) ;        PrevLsp[i] = sub( PrevLsp[i], LspDcTable[i] ) ;    } /*  * Generate the prediction vector and subtract it.  Use a constant  * first-order predictor based on the previous (DC-free) LSP  * vector.  */    for ( i = 0 ; i < LpcOrder ; i ++ ) {        Tmp0 = mult_r( PrevLsp[i], (Word16) LspPrd0 ) ;        CurrLsp[i] = sub( CurrLsp[i], Tmp0 ) ;    } /*  * Add the DC component back to the previous LSP vector.  This  * vector is needed in later routines.  */    for ( i = 0 ; i < LpcOrder ; i ++ )        PrevLsp[i] = add( PrevLsp[i], LspDcTable[i] ) ; /*  * Do the vector quantization for all three bands  */    return Lsp_Svq( CurrLsp, Wvect ) ;}/***** Function:            Lsp_Svq()**** Description:     Performs the search of the VQ tables to find**          the optimum LSP indices for all three bands.**          For each band, the search finds the index which **          minimizes the weighted squared error between **          the table entry and the target.**** Links to text:   Section 2.5**** Arguments:       ****  Word16 Tv[]     VQ target vector (10 words)**  Word16 Wvect[]      VQ weight vector (10 words)**** Outputs:         None**** Return value:    ****  Word32      Long word packed with the 3 VQ indices.  Band 0**          corresponds to bits [23:16], band 1 corresponds**          to bits [15:8], and band 2 corresponds to bits [7:0].**              */Word32   Lsp_Svq( Word16 *Tv, Word16 *Wvect ){    int   i,j,k ;    Word32   Rez,Indx    ;    Word32   Acc0,Acc1   ;    Word16   Tmp[LpcOrder] ;    Word16  *LspQntPnt  ; /*  * Initialize the return value  */    Rez = (Word32) 0 ; /*  * Quantize each band separately  */    for ( k = 0 ; k < LspQntBands ; k ++ ) { /*  * Search over the entire VQ table to find the index that  * minimizes the error.  */        /* Initialize the search */        Acc1 = (Word32) -1 ;        Indx = (Word32) 0 ;        LspQntPnt = BandQntTable[k] ;        for ( i = 0 ; i < LspCbSize ; i ++ ) { /*  * Generate the metric, which is the negative error with the  * constant component removed.  */            for ( j = 0 ; j < BandInfoTable[k][1] ; j ++ )

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产aⅴ精品一区二区三区色成熟| 国产精品18久久久久久久网站| 日韩一区二区三区观看| 国产成人精品免费| 一区二区三区四区亚洲| 欧美大度的电影原声| 91最新地址在线播放| 蜜臀精品一区二区三区在线观看 | 热久久国产精品| 国产精品家庭影院| 日韩欧美精品在线视频| 91免费观看视频在线| 国产原创一区二区| 亚洲bt欧美bt精品| 国产精品久久久久久久久免费丝袜 | 日本aⅴ免费视频一区二区三区| 国产精品久久久久久亚洲伦 | 亚洲成年人网站在线观看| 久久精品一区蜜桃臀影院| 欧美日韩不卡一区| 99精品视频在线观看免费| 国产一区欧美一区| 蜜臀久久99精品久久久久久9| 一级精品视频在线观看宜春院| 亚洲国产精品v| 精品少妇一区二区三区在线播放 | 强制捆绑调教一区二区| 亚洲精品免费播放| 国产精品免费视频观看| 久久久三级国产网站| 欧美一区二区三区免费观看视频| 欧美在线不卡视频| 99精品桃花视频在线观看| 成人国产精品免费观看视频| 狠狠色丁香久久婷婷综合丁香| 婷婷中文字幕一区三区| 亚洲黄色录像片| 亚洲嫩草精品久久| 亚洲私人影院在线观看| 亚洲欧美自拍偷拍色图| 国产精品免费aⅴ片在线观看| 国产欧美一区二区三区鸳鸯浴 | 亚洲精品日韩专区silk| 中文字幕免费在线观看视频一区| 久久综合色8888| 精品国产免费一区二区三区四区| 欧美成人一区二区三区在线观看| 在线不卡欧美精品一区二区三区| 欧美精品自拍偷拍| 3d动漫精品啪啪1区2区免费| 欧美一区二区三区小说| 555www色欧美视频| 日韩天堂在线观看| 日韩精品一区二| 久久综合99re88久久爱| 久久精品一区二区三区av| 国产欧美日韩激情| 国产精品免费人成网站| 亚洲精品久久久久久国产精华液| 亚洲美女免费在线| 亚洲成人一区二区| 热久久免费视频| 国产精品一区免费视频| 不卡一区二区三区四区| 色婷婷综合久久| 欧美另类变人与禽xxxxx| 日韩色在线观看| 久久丝袜美腿综合| 国产精品乱码人人做人人爱| 国产成人亚洲精品狼色在线| www.日韩av| 欧美在线观看视频一区二区| 日韩一区二区三区四区| 国产三区在线成人av| 日韩理论在线观看| 婷婷一区二区三区| 精品一区二区三区香蕉蜜桃| 粉嫩一区二区三区在线看| 成人深夜福利app| 欧美伊人精品成人久久综合97 | 久久综合色之久久综合| 国产精品免费aⅴ片在线观看| 亚洲最大色网站| 久久69国产一区二区蜜臀| 99久久综合99久久综合网站| 欧美日韩国产美| 中文字幕精品三区| 亚洲成年人网站在线观看| 国产二区国产一区在线观看| 91国产视频在线观看| 精品奇米国产一区二区三区| 亚洲日本中文字幕区| 麻豆精品一区二区综合av| 97久久精品人人澡人人爽| 91麻豆精品国产综合久久久久久 | 亚洲午夜三级在线| 精品一区二区三区视频| 色噜噜狠狠色综合中国| 精品福利在线导航| 亚洲国产一二三| 国产成人av电影免费在线观看| 欧美男生操女生| 国产女主播一区| 免费精品99久久国产综合精品| 成人黄色免费短视频| 日韩一区二区三区高清免费看看| 亚洲蜜臀av乱码久久精品蜜桃| 激情都市一区二区| 欧美日韩亚洲综合一区| 中文字幕日韩一区| 久草中文综合在线| 欧美精品在欧美一区二区少妇| 国产精品成人一区二区艾草| 久久 天天综合| 欧美日韩一区二区三区四区五区 | 精品国产凹凸成av人导航| 亚洲最大色网站| 不卡视频一二三| 国产亚洲综合在线| 久久国产麻豆精品| 欧美日本一区二区在线观看| 最近日韩中文字幕| 成人精品鲁一区一区二区| 欧美精品一区二区在线观看| 日韩中文字幕不卡| 欧美无乱码久久久免费午夜一区| 中文字幕一区二区三区精华液| 国产盗摄视频一区二区三区| 精品美女在线观看| 奇米影视一区二区三区小说| 欧美日本在线观看| 亚洲大片精品永久免费| 日本道色综合久久| 亚洲情趣在线观看| 97精品久久久久中文字幕| 国产精品乱子久久久久| 成人涩涩免费视频| 欧美国产一区二区| 春色校园综合激情亚洲| 欧美极品少妇xxxxⅹ高跟鞋| 国产成人av电影在线观看| 久久精品一区八戒影视| 韩国女主播成人在线| 亚洲精品一区二区三区在线观看| 免费av成人在线| 精品国产自在久精品国产| 美女视频网站久久| 精品久久久久久亚洲综合网 | 国产在线视视频有精品| 精品国产91九色蝌蚪| 国产主播一区二区| 日本一二三不卡| 99久久久久久99| www.视频一区| 亚洲欧洲日韩一区二区三区| 91丝袜美女网| 亚洲国产日韩a在线播放性色| 欧美日韩视频在线第一区| 亚洲成在线观看| 欧美成人精品3d动漫h| 国产乱码字幕精品高清av| 国产欧美日韩另类一区| 91同城在线观看| 天天av天天翘天天综合网 | 国产精品福利影院| 色素色在线综合| 午夜一区二区三区在线观看| 日韩欧美在线一区二区三区| 国产高清亚洲一区| 综合分类小说区另类春色亚洲小说欧美| 色综合久久久久综合| 日韩精品一卡二卡三卡四卡无卡| 日韩精品一区二区三区三区免费| 国产成人精品影院| 亚洲最色的网站| 日韩精品一区二区在线观看| 成人av在线网| 亚洲福利一区二区三区| 日韩美女视频在线| 99久久精品久久久久久清纯| 午夜精品在线看| 国产婷婷色一区二区三区四区| 一道本成人在线| 久久99精品久久久久婷婷| 国产精品高潮久久久久无| 在线播放91灌醉迷j高跟美女| 国产一区二区三区电影在线观看| 亚洲免费观看在线观看| 欧美成人官网二区| 色久综合一二码| 久久99国产精品久久| 亚洲三级在线免费| 欧美xxx久久| 色视频欧美一区二区三区| 久久国产免费看| 亚洲曰韩产成在线| 国产拍揄自揄精品视频麻豆| 777午夜精品免费视频| eeuss鲁片一区二区三区在线看 | 国产99久久久国产精品免费看|