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

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

?? lsp.c

?? 本源代碼包含了各種聲音
?? C
?? 第 1 頁 / 共 2 頁
字號:
            for ( j = 0 ; j < BandInfoTable[k][1] ; j ++ )
                Tmp[j] = mult_r( Wvect[BandInfoTable[k][0]+j],
                                                            LspQntPnt[j] ) ;

            Acc0 = (Word32) 0 ;
            for ( j = 0 ; j < BandInfoTable[k][1] ; j ++ )
                Acc0 = L_mac( Acc0, Tv[BandInfoTable[k][0]+j], Tmp[j] ) ;
            Acc0 = L_shl( Acc0, (Word16) 1 ) ;
            for ( j = 0 ; j < BandInfoTable[k][1] ; j ++ )
                Acc0 = L_msu( Acc0, LspQntPnt[j], Tmp[j] ) ;

            LspQntPnt += BandInfoTable[k][1] ;

 /*
  * Compare the metric to the previous maximum and select the
  * new index
  */
            if ( Acc0 > Acc1 ) {
                Acc1 = Acc0 ;
                Indx = (Word32) i ;
            }
        }

 /*
  * Pack the result with the optimum index for this band
  */
        Rez = L_shl( Rez, (Word16) LspCbBits ) ;
        Rez = L_add( Rez, Indx ) ;
    }

    return Rez ;
}

/*
**
** Function:            Lsp_Inq()
**
** Description:     Performs inverse vector quantization of the
**          LSP frequencies.  The LSP vector is divided
**          into 3 sub-vectors, or bands, of dimension 3,
**          3, and 4.  Each band is inverse quantized
**          separately using a different VQ table.  Each
**          table has 256 entries, so each VQ index is 8
**          bits.  (Only the LSP vector for subframe 3 is
**          quantized per frame.)
**
** Links to text:   Sections 2.6, 3.2
**
** Arguments:
**
**  Word16 *Lsp     Empty buffer
**  Word16 PrevLsp[]    Quantized LSP frequencies from the previous frame
**               (10 words)
**  Word32 LspId        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].
**  Word16 Crc      Frame erasure indicator
**
** Outputs:
**
**  Word16 Lsp[]        Quantized LSP frequencies for current frame (10
**               words)
**
** Return value:         None
**
*/
void Lsp_Inq( Word16 *Lsp, Word16 *PrevLsp, Word32 LspId, Word16 Crc )
{
    int  i,j   ;

    Word16  *LspQntPnt  ;


    Word16   Scon  ;
    Word16   Lprd  ;

    Word16   Tmp   ;
    Flag     Test  ;


 /*
  * Check for frame erasure.  If a frame erasure has occurred, the
  * resulting VQ table entries are zero.  In addition, a different
  * fixed predictor and minimum frequency separation are used.
  */
    if ( Crc == (Word16) 0 ) {
        Scon = (Word16) 0x0100 ;
        Lprd = LspPrd0 ;
    }
    else {
        LspId = (Word32) 0 ;
        Scon = (Word16) 0x0200 ;
        Lprd = LspPrd1 ;
    }


 /*
  * Inverse quantize the 10th-order LSP vector.  Each band is done
  * separately.
  */
    for ( i = LspQntBands-1; i >= 0 ; i -- ) {

 /*
  * Get the VQ table entry corresponding to the transmitted index
  */
        Tmp = (Word16) ( LspId & (Word32) 0x000000ff ) ;
        LspId >>= 8 ;

        LspQntPnt = BandQntTable[i] ;

        for ( j = 0 ; j < BandInfoTable[i][1] ; j ++ )
            Lsp[BandInfoTable[i][0] + j] =
                                LspQntPnt[Tmp*BandInfoTable[i][1] + j] ;
    }

 /*
  * Subtract the DC component from the previous frame's quantized
  * vector
  */
    for ( j = 0 ; j < LpcOrder ; j ++ )
        PrevLsp[j] = sub(PrevLsp[j], LspDcTable[j] ) ;

 /*
  * Generate the prediction vector using a fixed first-order
  * predictor based on the previous frame's (DC-free) quantized
  * vector
  */
    for ( j = 0 ; j < LpcOrder ; j ++ ) {
        Tmp = mult_r( PrevLsp[j], Lprd ) ;
        Lsp[j] = add( Lsp[j], Tmp ) ;
    }

 /*
  * Add the DC component back to the previous quantized vector,
  * which is needed in later routines
  */
    for ( j = 0 ; j < LpcOrder ; j ++ ) {
        PrevLsp[j] = add( PrevLsp[j], LspDcTable[j] ) ;
        Lsp[j] = add( Lsp[j], LspDcTable[j] ) ;
    }


 /*
  * Perform a stability test on the quantized LSP frequencies.  This
  * test checks that the frequencies are ordered, with a minimum
  * separation between each.  If the test fails, the frequencies are
  * iteratively modified until the test passes.  If after 10
  * iterations the test has not passed, the previous frame's
  * quantized LSP vector is used.
  */
    for ( i = 0 ; i < LpcOrder ; i ++ ) {

        /* Check the first frequency */
        if ( Lsp[0] < (Word16) 0x180 )
            Lsp[0] = (Word16) 0x180 ;

        /* Check the last frequency */
        if ( Lsp[LpcOrder-1] > (Word16) 0x7e00 )
            Lsp[LpcOrder-1] = (Word16) 0x7e00 ;

        /* Perform the modification */
        for ( j = 1 ; j < LpcOrder ; j ++ ) {

            Tmp = add( Scon, Lsp[j-1] ) ;
            Tmp = sub( Tmp, Lsp[j] ) ;
            if ( Tmp > (Word16) 0 ) {
                Tmp = shr( Tmp, (Word16) 1 ) ;
                Lsp[j-1] = sub( Lsp[j-1], Tmp ) ;
                Lsp[j] = add( Lsp[j], Tmp ) ;
            }
        }

        Test = False ;

 /*
  * Test the modified frequencies for stability.  Break out of
  * the loop if the frequencies are stable.
  */
        for ( j = 1 ; j < LpcOrder ; j ++ ) {
            Tmp = add( Lsp[j-1], Scon ) ;
            Tmp = sub( Tmp, (Word16) 4 ) ;
            Tmp = sub( Tmp, Lsp[j] ) ;
            if ( Tmp > (Word16) 0 )
                Test = True ;
        }

        if ( Test == False )
            break ;
    }


 /*
  * Return the result of the stability check.  True = not stable,
  * False = stable.
  */
    if ( Test == True) {
        for ( j = 0 ; j < LpcOrder ; j ++ )
            Lsp[j] = PrevLsp[j] ;
    }

    return;
}

/*
**
** Function:            Lsp_Int()
**
** Description:     Computes the quantized LPC coefficients for a
**          frame.  First the quantized LSP frequencies
**          for all subframes are computed by linear
**          interpolation.  These frequencies are then
**          transformed to quantized LPC coefficients.
**
** Links to text:   Sections 2.7, 3.3
**
** Arguments:
**
**  Word16 *QntLpc      Empty buffer
**  Word16 CurrLsp[]    Quantized LSP frequencies for the current frame,
**               subframe 3 (10 words)
**  Word16 PrevLsp[]    Quantized LSP frequencies for the previous frame,
**               subframe 3 (10 words)
**
** Outputs:
**
**  Word16 QntLpc[]     Quantized LPC coefficients for current frame, all
**               subframes (40 words)
**
** Return value:        None
**
*/
void  Lsp_Int( Word16 *QntLpc, Word16 *CurrLsp, Word16 *PrevLsp )
{
    int   i,j   ;

    Word16   Tmp   ;
    Word16  *Dpnt  ;

    Word32   Acc0  ;


 /*
  * Initialize the interpolation factor
  */
    Tmp = (Word16) (MIN_16 / SubFrames ) ;

    Dpnt = QntLpc ;


 /*
  * Do for all subframes
  */
    for ( i = 0 ; i < SubFrames ; i ++ ) {

 /*
  * Compute the quantized LSP frequencies by linear interpolation
  * of the frequencies from subframe 3 of the current and
  * previous frames
  */
        for ( j = 0 ; j < LpcOrder ; j ++ ) {
            Acc0 = L_deposit_h( PrevLsp[j] ) ;
            Acc0 = L_mac( Acc0, Tmp, PrevLsp[j] ) ;
            Acc0 = L_msu( Acc0, Tmp, CurrLsp[j] ) ;
            Dpnt[j] = round( Acc0 ) ;
        }

 /*
  * Convert the quantized LSP frequencies to quantized LPC
  * coefficients
  */
        LsptoA( Dpnt ) ;
        Dpnt += LpcOrder ;

        /* Update the interpolation factor */
        Tmp = add( Tmp, (Word16) (MIN_16 / SubFrames ) ) ;
    }

}


/*
**
** Function:            LsptoA()
**
** Description:     Converts LSP frequencies to LPC coefficients
**          for a subframe.  Sum and difference
**          polynomials are computed from the LSP
**          frequencies (which are the roots of these
**          polynomials).  The LPC coefficients are then
**          computed by adding the sum and difference
**          polynomials.
**          
** Links to text:   Sections 2.7, 3.3
**
** Arguments:       
**
**  Word16 Lsp[]        LSP frequencies (10 words)
**
** Outputs:
**
**  Word16 Lsp[]        LPC coefficients (10 words)
**
** Return value:        None
** 
*/
void  LsptoA( Word16 *Lsp )
{
    int   i,j   ;

    Word32   Acc0,Acc1   ;
    Word16   Tmp ;

    Word32   P[LpcOrder/2+1] ;
    Word32   Q[LpcOrder/2+1] ;


 /*
  * Compute the cosines of the LSP frequencies by table lookup and
  * linear interpolation
  */
    for ( i = 0 ; i < LpcOrder ; i ++ ) {

 /*
  * Do the table lookup using bits [15:7] of the LSP frequency
  */
        j = (int) shr( Lsp[i], (Word16) 7 ) ;
        Acc0 = L_deposit_h( CosineTable[j] ) ;

 /*
  * Do the linear interpolations using bits [6:0] of the LSP
  * frequency
  */
        Tmp = sub(CosineTable[j+1], CosineTable[j] ) ;
        Acc0 = L_mac( Acc0, Tmp, add( shl( (Word16)(Lsp[i] & 0x007f) ,
                                (Word16)8 ), (Word16) 0x0080 ) ) ;
        Acc0 = L_shl( Acc0, (Word16) 1 ) ;
        Lsp[i] = negate( round( Acc0 ) ) ;
    }


 /*
  * Compute the sum and difference polynomials with the real roots
  * removed.  These are computed by polynomial multiplication as
  * follows.  Let the sum polynomial be P(z).  Define the elementary
  * polynomials P_i(z) = 1 - 2cos(w_i) z^{-1} + z^{-2}, for 1<=i<=
  * 5, where {w_i} are the LSP frequencies corresponding to the sum
  * polynomial.  Then P(z) = P_1(z)P_2(z)...P_5(z).  Similarly
  * the difference polynomial Q(z) = Q_1(z)Q_2(z)...Q_5(z).
  */

 /*
  * Initialize the arrays with the coefficients of the product
  * P_1(z)P_2(z) and Q_1(z)Q_2(z).  Scale by 1/8.
  */
    P[0] = (Word32) 0x10000000L ;
    P[1] = L_mult( Lsp[0], (Word16) 0x2000 ) ;
    P[1] = L_mac( P[1], Lsp[2], (Word16) 0x2000 ) ;
    P[2] = L_mult( Lsp[0], Lsp[2] ) ;
    P[2] = L_shr( P[2], (Word16) 1 ) ;
    P[2] = L_add( P[2], (Word32) 0x20000000L ) ;

    Q[0] = (Word32) 0x10000000L ;
    Q[1] = L_mult( Lsp[1], (Word16) 0x2000 ) ;
    Q[1] = L_mac( Q[1], Lsp[3], (Word16) 0x2000 ) ;
    Q[2] = L_mult( Lsp[1], Lsp[3] ) ;
    Q[2] = L_shr( Q[2], (Word16) 1 ) ;
    Q[2] = L_add( Q[2], (Word32) 0x20000000L ) ;

 /*
  * Compute the intermediate polynomials P_1(z)P_2(z)...P_i(z) and
  * Q_1(z)Q_2(z)...Q_i(z), for i = 2, 3, 4.  Each intermediate
  * polynomial is symmetric, so only the coefficients up to i+1 need
  * by computed.  Scale by 1/2 each iteration for a total of 1/8.
  */
    for ( i = 2 ; i < LpcOrder/2 ; i ++ ) {

        /* Compute coefficient (i+1) */
        Acc0 = P[i] ;
        Acc0 = L_mls( Acc0, Lsp[2*i+0] ) ;
        Acc0 = L_add( Acc0, P[i-1] ) ;
        P[i+1] = Acc0 ;

        Acc1 = Q[i] ;
        Acc1 = L_mls( Acc1, Lsp[2*i+1] ) ;
        Acc1 = L_add( Acc1, Q[i-1] ) ;
        Q[i+1] = Acc1 ;

        /* Compute coefficients i, i-1, ..., 2 */
        for ( j = i ; j >= 2 ; j -- ) {
            Acc0 = P[j-1] ;
            Acc0 = L_mls( Acc0, Lsp[2*i+0] ) ;
            Acc0 = L_add( Acc0, L_shr(P[j], (Word16) 1 ) ) ;
            Acc0 = L_add( Acc0, L_shr(P[j-2], (Word16) 1 ) ) ;
            P[j] = Acc0 ;

            Acc1 = Q[j-1] ;
            Acc1 = L_mls( Acc1, Lsp[2*i+1] ) ;
            Acc1 = L_add( Acc1, L_shr(Q[j], (Word16) 1 ) ) ;
            Acc1 = L_add( Acc1, L_shr(Q[j-2], (Word16) 1 ) ) ;
            Q[j] = Acc1 ;
        }

        /* Compute coefficients 1, 0 */
        P[0] = L_shr( P[0], (Word16) 1 ) ;
        Q[0] = L_shr( Q[0], (Word16) 1 ) ;

        Acc0 = L_deposit_h( Lsp[2*i+0] ) ;
        Acc0 = L_shr( Acc0, (Word16) i ) ;
        Acc0 = L_add( Acc0, P[1] ) ;
        Acc0 = L_shr( Acc0, (Word16) 1 ) ;
        P[1] = Acc0 ;

        Acc1 = L_deposit_h( Lsp[2*i+1] ) ;
        Acc1 = L_shr( Acc1, (Word16) i ) ;
        Acc1 = L_add( Acc1, Q[1] ) ;
        Acc1 = L_shr( Acc1, (Word16) 1 ) ;
        Q[1] = Acc1 ;
    }


 /*
  * Convert the sum and difference polynomials to LPC coefficients
  * The LPC polynomial is the sum of the sum and difference
  * polynomials with the real zeros factored in: A(z) = 1/2 {P(z) (1
  * + z^{-1}) + Q(z) (1 - z^{-1})}.  The LPC coefficients are scaled
  * here by 16; the overall scale factor for the LPC coefficients
  * returned by this function is therefore 1/4.
  */
    for ( i = 0 ; i < LpcOrder/2 ; i ++ ) {
        Acc0 = P[i] ;
        Acc0 = L_add( Acc0, P[i+1] ) ;
        Acc0 = L_sub( Acc0, Q[i] ) ;
        Acc0 = L_add( Acc0, Q[i+1] ) ;
        Acc0 = L_shl( Acc0, (Word16) 3 ) ;
        Lsp[i] = negate( round( Acc0 ) ) ;

        Acc1 = P[i] ;
        Acc1 = L_add( Acc1, P[i+1] ) ;
        Acc1 = L_add( Acc1, Q[i] ) ;
        Acc1 = L_sub( Acc1, Q[i+1] ) ;
        Acc1 = L_shl( Acc1, (Word16) 3 ) ;
        Lsp[LpcOrder-1-i] = negate( round( Acc1 ) ) ;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合另类小说色区| 中文字幕在线播放不卡一区| 91福利视频久久久久| 成人性生交大片免费看在线播放| 国产成人免费网站| 成人sese在线| 97久久精品人人做人人爽| 91亚洲大成网污www| 91福利视频网站| 欧美喷潮久久久xxxxx| 日韩欧美中文字幕精品| 精品国产乱码久久久久久久| 国产日韩欧美高清| 国产精品卡一卡二卡三| 亚洲精品国产精品乱码不99 | 精品国产一区二区三区av性色| 欧美久久一区二区| 日韩免费高清av| 久久久精品国产99久久精品芒果| 国产精品伦理在线| 香蕉av福利精品导航| 狠狠狠色丁香婷婷综合激情| 成人精品gif动图一区| 欧美在线免费观看视频| 精品国产a毛片| 一区二区三区在线视频观看| 亚洲成人精品影院| 国产精品一区二区果冻传媒| 91麻豆精东视频| 精品国精品国产| 亚洲人成人一区二区在线观看| 亚洲线精品一区二区三区八戒| 狂野欧美性猛交blacked| av成人免费在线| 日韩一区二区电影网| 国产精品日韩精品欧美在线| 日日骚欧美日韩| 波多野结衣在线aⅴ中文字幕不卡| 精品1区2区3区| 中文字幕免费观看一区| 日本伊人午夜精品| 99精品视频一区二区三区| 91精品国产免费久久综合| 中文字幕日韩av资源站| 老司机精品视频线观看86| 色噜噜狠狠成人中文综合| 久久免费美女视频| 日本欧美韩国一区三区| 色系网站成人免费| 中文字幕巨乱亚洲| 久久精品国产久精国产爱| 91高清视频免费看| 中文字幕一区二区三区在线观看| 极品尤物av久久免费看| 欧美日韩免费观看一区二区三区| 久久精品一区二区三区av| 热久久免费视频| 欧亚一区二区三区| 亚洲手机成人高清视频| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 国产精品美日韩| 狠狠色丁香久久婷婷综合丁香| 欧美精品色一区二区三区| 国产精品成人免费在线| 高清免费成人av| 久久久国产精华| 国产成人免费xxxxxxxx| 久久久国产一区二区三区四区小说| 免费成人在线播放| 日韩一级片在线观看| 男男视频亚洲欧美| 欧美精品久久天天躁| 日韩电影在线一区| 91精品在线观看入口| 日韩主播视频在线| 91精品啪在线观看国产60岁| 亚洲动漫第一页| 欧美一区二区三区四区久久| 天堂资源在线中文精品| 91麻豆精品国产91久久久久久久久| 午夜日韩在线观看| 日韩欧美一二三四区| 韩国精品久久久| 亚洲国产岛国毛片在线| 成人高清伦理免费影院在线观看| 国产喂奶挤奶一区二区三区| 成人一区二区三区在线观看| 国产精品美女久久久久aⅴ| 91在线视频网址| 亚洲午夜久久久久久久久电影院 | 老汉av免费一区二区三区| 日韩欧美在线综合网| 精品在线你懂的| 中文字幕第一页久久| 91在线国产福利| 亚洲成人自拍一区| 日韩精品一区二区三区老鸭窝| 久久99九九99精品| 最新高清无码专区| 欧美肥妇bbw| 国产精品综合一区二区| 亚洲欧洲av色图| 欧美精品在欧美一区二区少妇| 久久www免费人成看片高清| 国产欧美一区二区精品性| 色综合色狠狠综合色| 日韩精品一二三四| 国产精品伦一区二区三级视频| 欧美性一区二区| 精品一区二区三区视频在线观看| 中文字幕一区二区三区视频| 7777精品伊人久久久大香线蕉经典版下载 | 欧美国产综合一区二区| 日本精品一区二区三区四区的功能| 日韩电影一区二区三区| 中文字幕一区二区在线观看| 日韩一区二区免费视频| www.亚洲色图| 激情成人午夜视频| 亚洲成av人片在线观看无码| 欧美国产日韩a欧美在线观看| 欧美性色综合网| 韩国精品免费视频| 午夜精品久久久久| 自拍偷在线精品自拍偷无码专区| 欧美一区永久视频免费观看| 91麻豆产精品久久久久久| 国产一区二区成人久久免费影院| 午夜一区二区三区在线观看| 亚洲色图欧美偷拍| 久久久久久久久久久久久久久99 | 国产精品91xxx| 视频一区中文字幕| 亚洲一区二区免费视频| 中国色在线观看另类| 久久久亚洲欧洲日产国码αv| 3atv一区二区三区| 欧美三级欧美一级| 91在线免费看| 北岛玲一区二区三区四区| 国产一区二区不卡| 激情国产一区二区| 久久99久久精品欧美| 亚洲 欧美综合在线网络| 一区二区三区电影在线播| 最近日韩中文字幕| 亚洲欧美一区二区三区极速播放 | 日韩一区精品字幕| 亚洲不卡在线观看| 亚洲bdsm女犯bdsm网站| 亚洲成va人在线观看| 午夜久久久久久久久| 天天操天天色综合| 日韩av一区二区在线影视| 首页国产欧美日韩丝袜| 青青草91视频| 精品一区精品二区高清| 国产精品自在欧美一区| 国v精品久久久网| 97成人超碰视| 在线免费av一区| 91麻豆精品国产自产在线| 在线不卡中文字幕| 日韩欧美国产一区在线观看| 久久久久97国产精华液好用吗| 国产午夜精品在线观看| 国产精品萝li| 亚洲午夜精品在线| 美国欧美日韩国产在线播放| 韩国精品主播一区二区在线观看| 国产东北露脸精品视频| 色诱亚洲精品久久久久久| 欧美性受极品xxxx喷水| 欧美一区二区视频观看视频| 久久综合色8888| 亚洲青青青在线视频| 日韩激情在线观看| 国产激情精品久久久第一区二区| 99精品欧美一区二区蜜桃免费| 在线观看国产日韩| 欧美精品一区二区三区很污很色的 | 国产精品情趣视频| 一级精品视频在线观看宜春院| 天堂午夜影视日韩欧美一区二区| 精彩视频一区二区三区| 成人福利在线看| 欧美一区二区网站| 亚洲电影你懂得| 国产在线播放一区三区四| 91丨porny丨蝌蚪视频| 欧美一级黄色大片| 1区2区3区欧美| 久久精品国产999大香线蕉| 成人亚洲精品久久久久软件| 欧美日本视频在线| 国产日产欧美一区二区视频| 午夜精品久久久久久| 国产成人av电影在线播放| 91麻豆精品国产自产在线| 日韩伦理av电影|