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

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

?? exc2.c

?? 本程序的壓縮編碼是G.723的編解碼程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
** Links to text:   Sections 2.14, 2.18 & 3.4
**
** Arguments:
**
**  FLOAT  *Tv      Reconstructed excitation vector
**  FLOAT  *PrevExc Previous excitation vector
**  int    Olp      closed-loop pitch period
**  int    Lid      Jitter around pitch period
**  int    Gid      Gain vector index in 5- dimensional
**                      adaptive gain vector codebook
**
** Outputs:
**
**  FLOAT  *Tv      Reconstructed excitation vector
**
** Return value:    None
**
*/
void  Decod_Acbk(FLOAT *Tv, FLOAT *PrevExc, int Olp, int Lid, int Gid)
{
    int      i;
    FLOAT    RezBuf[SubFrLen+ClPitchOrd-1];
    FLOAT   *sPnt;

    Get_Rez(RezBuf, PrevExc, (Olp + Lid) - Pstep);


    i = 0;
    if (WrkRate == Rate63)
    {
        if (Olp >= (SubFrLen-2))
            i++;
    }
    else
        i=1;

    sPnt = AcbkGainTablePtr[i] + Gid*20;

    /*  Compute output vector */

    for (i=0; i < SubFrLen; i++)
        Tv[i] = DotProd(&RezBuf[i], sPnt, ClPitchOrd);
}

/*
**
** Function:        Comp_Lpf()
**
** Description:     Computes pitch postfilter parameters.
**                  The pitch postfilter lag is first derived (Find_B
**                  and Find_F). Then, the one that gives the largest
**                  contribution is used to calculate the gains (Get_Ind).
**
**
** Links to text:   Section 3.6
**
** Arguments:
**
**  FLOAT  *Buff    decoded excitation
**  int    Olp      Decoded pitch lag
**  int    Sfc      Subframe index
**
** Outputs:
**
**
** Return value:
**
**  PFDEF       Pitch postfilter parameters: PF.Gain    Pitch Postfilter gain
**                                           PF.ScGn    Pitch Postfilter scaling gain
**                                           PF.Indx    Pitch postfilter lag
*/
PFDEF Comp_Lpf(FLOAT *Buff, int Olp, int Sfc)
{
    PFDEF  Pf;
    FLOAT  Lcr[5];
    int    Bindx, Findx;
    FLOAT  Acc0,Acc1;

    /*  Initialize  */

    Pf.Indx = 0;
    Pf.Gain = (FLOAT)0.0;
    Pf.ScGn = (FLOAT)1.0;

    /*  Find both indices */

    Bindx = Find_B(Buff, Olp, Sfc);
    Findx = Find_F(Buff, Olp, Sfc);

    /*  Combine the results */

    if ((Bindx==0) && (Findx==0))
        return Pf;

    /*  Compute target energy  */

    Lcr[0] = DotProd(&Buff[PitchMax+Sfc*SubFrLen],
                    &Buff[PitchMax+Sfc*SubFrLen],SubFrLen);

    if (Bindx != 0)
    {
        Lcr[1] = DotProd(&Buff[PitchMax+Sfc*SubFrLen],
                        &Buff[PitchMax+Sfc*SubFrLen+Bindx],SubFrLen);
        Lcr[2] = DotProd(&Buff[PitchMax+Sfc*SubFrLen+Bindx],
                        &Buff[PitchMax+Sfc*SubFrLen+Bindx],SubFrLen);
    }

    if (Findx != 0)
    {
        Lcr[3] = DotProd(&Buff[PitchMax+Sfc*SubFrLen],
                        &Buff[PitchMax+Sfc*SubFrLen+Findx],SubFrLen);
        Lcr[4] = DotProd(&Buff[PitchMax+Sfc*SubFrLen+Findx],
                        &Buff[PitchMax+Sfc*SubFrLen+Findx],SubFrLen);
    }

    /*  Select the best pair  */

    if ((Bindx != 0) && (Findx == 0))
        Pf = Get_Ind(Bindx, Lcr[0], Lcr[1], Lcr[2]);

    if ((Bindx == 0) && (Findx != 0))
        Pf = Get_Ind(Findx, Lcr[0], Lcr[3], Lcr[4]);

    if ((Bindx != 0) && (Findx != 0))
    {
        Acc0 = Lcr[4] * Lcr[1] * Lcr[1];
        Acc1 = Lcr[2] * Lcr[3] * Lcr[3];
        if (Acc0 > Acc1)
            Pf = Get_Ind(Bindx, Lcr[0], Lcr[1], Lcr[2]);
        else
            Pf = Get_Ind(Findx, Lcr[0], Lcr[3], Lcr[4]);
    }

    return Pf;
}

/*
**
** Function:        Find_B()
**
** Description:     Computes best pitch postfilter backward lag by
**                  backward cross correlation maximization around the
**                  decoded pitch lag
**                  of the subframe 0 (for subrames 0 & 1)
**                  of the subframe 2 (for subrames 2 & 3)
**
** Links to text:   Section 3.6
**
** Arguments:
**
**  FLOAT  *Buff    decoded excitation
**  int    Olp      Decoded pitch lag
**  int    Sfc      Subframe index
**
** Outputs:     None
**
** Return value:
**
**  Word16   Pitch postfilter backward lag
*/
int  Find_B(FLOAT *Buff, int Olp, int Sfc)
{
    int  i;

    int  Indx = 0;

    FLOAT  Acc0,Acc1;

    if (Olp > (PitchMax-3))
        Olp = (PitchMax-3);

    Acc1 = (FLOAT)0.0;

    for (i=Olp-3; i<=Olp+3; i++)
    {
        Acc0 = DotProd(&Buff[PitchMax+Sfc*SubFrLen],
                    &Buff[PitchMax+Sfc*SubFrLen-i],SubFrLen);

        /* return index of largest cross correlation */

        if (Acc0 > Acc1)
        {
            Acc1 = Acc0;
            Indx = i;
        }
    }
    return -Indx;
}


/*
**
** Function:        Find_F()
**
** Description:     Computes best pitch postfilter forward lag by
**                  forward cross correlation maximization around the
**                  decoded pitch lag
**                  of the subframe 0 (for subrames 0 & 1)
**                  of the subframe 2 (for subrames 2 & 3)
**
** Links to text:   Section 3.6
**
** Arguments:
**
**  FLOAT  *Buff    decoded excitation
**  int    Olp      Decoded pitch lag
**  int    Sfc      Subframe index
**
** Outputs:     None
**
** Return value:
**
**  int       Pitch postfilter forward lag
*/
int  Find_F(FLOAT *Buff, int Olp, int Sfc)
{
    int    i;
    int    Indx = 0;
    FLOAT  Acc0,Acc1;

    if (Olp > (PitchMax-3))
        Olp = (PitchMax-3);

    Acc1 = (FLOAT)0.0;

    for (i=Olp-3; i<=Olp+3; i++)
    {
        if (!((Sfc*SubFrLen+SubFrLen+i) > Frame))
        {
            Acc0 = DotProd(&Buff[PitchMax+Sfc*SubFrLen],
                            &Buff[PitchMax+Sfc*SubFrLen+i],SubFrLen);

            /* return index of largest cross correlation */

            if (Acc0 > Acc1)
            {
                Acc1 = Acc0;
                Indx = i;
            }
        }
    }

    return Indx;
}

/*
**
** Function:        Filt_Lpf()
**
** Description:     Applies the pitch postfilter for each subframe.
**
** Links to text:   Section 3.6
**
** Arguments:
**
**  FLOAT  *Tv      Pitch postfiltered excitation
**  FLOAT  *Buff    decoded excitation
**  PFDEF Pf        Pitch postfilter parameters
**  int    Sfc      Subframe index
**
** Outputs:
**
**  FLOAT  *Tv      Pitch postfiltered excitation
**
** Return value: None
**
*/
void  Filt_Lpf(FLOAT *Tv, FLOAT *Buff, PFDEF Pf, int Sfc)
{
    int  i;

    for (i = 0; i < SubFrLen; i++)
        Tv[Sfc*SubFrLen+i]= Buff[PitchMax+Sfc*SubFrLen+i]*Pf.ScGn +
                            Buff[PitchMax+Sfc*SubFrLen+Pf.Indx+i]*Pf.Gain;
}


/*
**
** Function:        Get_Ind()
**
** Description:     Computes gains of the pitch postfilter.
**                  The gains are calculated using the cross correlation
**                  (forward or backward, the one with the greatest contribution)
**                  and the energy of the signal. Also, a test is performed on
**                  the prediction gain to see whether the pitch postfilter
**                  should be used or not.
**
**
**
** Links to text:   Section 3.6
**
** Arguments:
**
**  int    Ind      Pitch postfilter lag
**  FLOAT  Ten      energy of the current subframe excitation vector
**  FLOAT  Ccr      Crosscorrelation of the excitation
**  FLOAT  Enr      Energy of the (backward or forward) "delayed" excitation
**
** Outputs:     None
**
** Return value:
**
**  PFDEF
**         int      Indx    Pitch postfilter lag
**         FLOAT    Gain    Pitch postfilter gain
**         FLOAT    ScGn    Pitch postfilter scaling gain
**
*/
PFDEF Get_Ind(int Ind, FLOAT Ten, FLOAT Ccr, FLOAT Enr)
{
    FLOAT  Acc0,Acc1;
    FLOAT  Exp;

    PFDEF Pf;


    Pf.Indx = Ind;

    /*  Check valid gain > 2db */

    Acc0 = (Ten * Enr)/(FLOAT)4.0;
    Acc1 = Ccr * Ccr;

    if (Acc1 > Acc0)
    {
        if (Ccr >= Enr)
            Pf.Gain = LpfConstTable[WrkRate];
        else
            Pf.Gain = (Ccr/Enr) * LpfConstTable[WrkRate];

        /*  Compute scaling gain  */

        Exp  = Ten + 2*Ccr*Pf.Gain + Pf.Gain*Pf.Gain*Enr;

        if (fabs(Exp) < (FLOAT) FLT_MIN)
            Pf.ScGn = (FLOAT)0.0;
        else
            Pf.ScGn = (FLOAT)sqrt(Ten/Exp);
    }
    else
    {
        Pf.Gain = (FLOAT)0.0;
        Pf.ScGn = (FLOAT)1.0;
    }

    Pf.Gain = Pf.Gain * Pf.ScGn;

    return Pf;
}

/*
**
** Function:        Comp_Info()
**
** Description:     Voiced/unvoiced classifier.
**                  It is based on a cross correlation maximization over the
**                  last 120 samples of the frame and with an index varying
**                  around the decoded pitch lag (from L-3 to L+3). Then the
**                  prediction gain is tested to declare the frame voiced or
**                  unvoiced.
**
** Links to text:   Section 3.10.2
**
** Arguments:
**
**  FLOAT  *Buff  decoded excitation
**  int    Olp    Decoded pitch lag
**  FLOAT  *Gain
**
** Outputs: None
**
** Return value:
**
**      Word16    Estimated pitch value
*/
Word16  Comp_Info(FLOAT *Buff, int Olp, FLOAT *Gain)
{
    int    i;
    FLOAT  Acc0;
    FLOAT  Tenr;
    FLOAT  Ccr,Enr;
    int    Indx;

    if (Olp > (PitchMax-3))
        Olp = (PitchMax-3);

    Indx = Olp;
    Ccr =  (FLOAT)0.0;

    for (i=Olp-3; i <= Olp+3; i++)
    {
        Acc0 = DotProd(&Buff[PitchMax+Frame-2*SubFrLen],
                        &Buff[PitchMax+Frame-2*SubFrLen-i],2*SubFrLen);

        if (Acc0 > Ccr)
        {
            Ccr = Acc0;
            Indx = i;
        }
    }

    /*  Compute target energy  */

    Tenr = DotProd(&Buff[PitchMax+Frame-2*SubFrLen],
                    &Buff[PitchMax+Frame-2*SubFrLen],2*SubFrLen);
    *Gain = Tenr;

    /*  Compute best energy */

    Enr = DotProd(&Buff[PitchMax+Frame-2*SubFrLen-Indx],
                    &Buff[PitchMax+Frame-2*SubFrLen-Indx],2*SubFrLen);

    if (Ccr <= (FLOAT)0.0)
        return 0;

    if (((((FLOAT)0.125)*Enr*Tenr) - (Ccr*Ccr)) < (FLOAT)0.0)
        return (Word16) Indx;

    return 0;
}


/*
**
** Function:        Regen()
**
** Description:     Performs residual interpolation depending of the frame
**                  classification.
**                  If the frame is previously declared unvoiced, the excitation
**                  is regenerated using a random number generator. Otherwise
**                  a periodic excitation is generated with the period previously
**                  found.
**
** Links to text:   Section 3.10.2
**
** Arguments:
**
**  FLOAT  *DataBuff current subframe decoded excitation
**  FLOAT  *Buff     past decoded excitation
**  Word16 Lag       Decoded pitch lag from previous frame
**  FLOAT  Gain      Interpolated gain from previous frames
**  int    Ecount    Number of erased frames
**  Word16 *Sd       Random number used in unvoiced cases
**
** Outputs:
**
**  Word16 *DataBuff current subframe decoded excitation
**  Word16 *Buff     updated past excitation
**
** Return value:    None
**
*/
void    Regen(FLOAT *DataBuff, FLOAT *Buff, Word16 Lag, FLOAT Gain,
              int Ecount, Word16 *Sd)
{
    int  i;

    /*  Test for clearing */

    if (Ecount >= ErrMaxNum)
    {
        for (i = 0; i < Frame; i++)
            DataBuff[i] = (FLOAT)0.0;
        for (i = 0; i < Frame+PitchMax; i++)
            Buff[i] = (FLOAT)0.0;
    }
    else
    {

        /*  Interpolate accordingly to the voicing estimation */

        if (Lag != 0)
        {
            /*  Voiced case */
            for (i = 0; i < Frame; i++)
                Buff[PitchMax+i] = Buff[PitchMax-Lag+i];
            for (i = 0; i < Frame; i++)
                DataBuff[i] = Buff[PitchMax+i] = Buff[PitchMax+i] * (FLOAT)0.75;
        }
        else
        {

            /* Unvoiced case */

            for (i = 0; i < Frame; i++)
                DataBuff[i] = Gain*(FLOAT)Rand_lbc(Sd)*((FLOAT)1.0/(FLOAT)32768.0);

            /* Clear buffer to reset memory */

            for (i = 0; i < Frame+PitchMax; i++)
                Buff[i] = (FLOAT)0.0;
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影在线观看电影| 国产精品网站导航| 国产精选一区二区三区| 亚洲欧美色图小说| 欧美三级视频在线播放| 久久9热精品视频| 综合激情成人伊人| 日韩视频免费观看高清完整版在线观看| 久久99精品视频| 亚洲少妇中出一区| 精品国产91乱码一区二区三区| 成人av电影观看| 免费看欧美美女黄的网站| 国产欧美一区二区精品久导航| 欧美日韩日日夜夜| 狠狠色丁香久久婷婷综| 日本一区二区视频在线观看| 欧美日韩在线观看一区二区| 大陆成人av片| 青青草精品视频| 一区二区三区高清在线| 91麻豆精品91久久久久久清纯| 国产成人av网站| 蜜臀精品一区二区三区在线观看 | 美国一区二区三区在线播放| 国产精品乱码久久久久久| 制服丝袜日韩国产| 色综合婷婷久久| 国产精品18久久久久| 日韩电影免费一区| 亚洲福利一二三区| 国产精品美女www爽爽爽| 欧美一区二区视频在线观看2022| 日本精品视频一区二区三区| 国产精品亚洲午夜一区二区三区| 美女网站一区二区| 日韩国产高清影视| 亚洲国产日韩综合久久精品| 亚洲品质自拍视频网站| 国产精品欧美经典| 久久综合网色—综合色88| 欧美乱妇15p| 欧美日韩在线免费视频| 色哟哟国产精品| 91亚洲精品久久久蜜桃| 韩国三级在线一区| 亚洲一区二区欧美| 亚洲人成在线观看一区二区| 中文字幕欧美区| 国产精品午夜在线| 亚洲国产成人私人影院tom| 欧美r级电影在线观看| 91麻豆精品国产无毒不卡在线观看| 在线观看91精品国产入口| 欧美性极品少妇| 欧美丝袜丝交足nylons| 欧美日韩国产一二三| 欧美人伦禁忌dvd放荡欲情| 欧美日韩精品一区二区三区蜜桃| 欧美日韩成人综合在线一区二区 | 欧美精品欧美精品系列| 欧美日韩久久一区二区| 欧美挠脚心视频网站| 欧美日韩高清一区二区不卡 | 91丨porny丨户外露出| 91蝌蚪porny九色| 色视频欧美一区二区三区| 91久久线看在观草草青青| 在线观看国产日韩| 欧美高清视频一二三区 | 久久久国产一区二区三区四区小说| 久久久久久久综合狠狠综合| 久久久久国产精品人| 精品久久一区二区| 久久精品在线观看| 综合欧美一区二区三区| 亚洲电影中文字幕在线观看| 日本成人在线一区| 国产成人日日夜夜| 91网站黄www| 欧美日韩精品系列| 欧美成人一区二区三区片免费| 26uuu久久综合| 国产精品国产精品国产专区不蜜| 亚洲老司机在线| 奇米精品一区二区三区四区| 国产精品亚洲一区二区三区妖精| 91丨porny丨国产入口| 欧美日韩精品三区| 国产网站一区二区| 一二三四区精品视频| 石原莉奈一区二区三区在线观看| 美女脱光内衣内裤视频久久网站 | 亚洲男人电影天堂| 亚洲成人动漫在线免费观看| 国产一区二区伦理| 91黄视频在线观看| 欧美一区二区福利在线| 中文字幕一区二区三区精华液| 免费不卡在线观看| 一本色道久久综合亚洲91| 精品国产不卡一区二区三区| 午夜欧美在线一二页| heyzo一本久久综合| 精品国产一二三| 视频在线观看一区二区三区| 91麻豆精品秘密| 欧美国产一区在线| 国产主播一区二区| 欧美一区二区在线播放| 亚洲成人在线观看视频| 9i看片成人免费高清| 久久免费电影网| 麻豆极品一区二区三区| 欧美日韩精品久久久| 亚洲精品国产a久久久久久 | 宅男在线国产精品| 亚洲国产精品久久人人爱蜜臀| 成人午夜av电影| 久久精品在线观看| 精品一区二区国语对白| 欧美成人r级一区二区三区| 亚洲第一搞黄网站| 欧美日韩视频一区二区| 一区二区成人在线| 色www精品视频在线观看| 国产精品福利一区二区| 成人免费视频播放| 国产三级精品在线| 东方aⅴ免费观看久久av| 国产亚洲女人久久久久毛片| 麻豆精品视频在线观看视频| 欧美一区日本一区韩国一区| 亚洲不卡在线观看| 91精品国产综合久久婷婷香蕉| 亚洲aⅴ怡春院| 欧美日韩第一区日日骚| 日本vs亚洲vs韩国一区三区 | 日韩一区二区视频| 免费观看在线综合色| 欧美一区二区三区公司| 日本特黄久久久高潮| 91精品国产91久久综合桃花| 日韩精品亚洲专区| 日韩一区二区电影| 久久精品二区亚洲w码| 欧美大片在线观看一区| 精品写真视频在线观看| 国产蜜臀av在线一区二区三区| 成人免费视频国产在线观看| 亚洲天天做日日做天天谢日日欢| 日本精品视频一区二区| 午夜精品在线看| 欧美成人一区二区三区片免费| 国产精品资源在线| 国产精品久久久久一区二区三区共| 成年人午夜久久久| 亚洲午夜激情av| 日韩一区二区精品| 成人午夜免费电影| 一区二区三区91| 91精品欧美久久久久久动漫| 国产一区二区三区在线观看免费视频| 国产精品理论片| 欧美日韩国产在线播放网站| 激情图区综合网| 亚洲欧洲精品天堂一级| 欧美性xxxxxxxx| 国产一区二区在线观看免费| 国产精品拍天天在线| 欧美午夜理伦三级在线观看| 美日韩一级片在线观看| 国产精品久久久久久久久免费相片 | 国产精品美日韩| 欧美日韩久久一区二区| 国产精品亚洲第一| 一区二区日韩av| wwwwww.欧美系列| 91丨porny丨最新| 日本免费在线视频不卡一不卡二| 国产欧美一区二区精品婷婷| 欧美日韩成人在线| 高清国产一区二区| 首页国产欧美久久| 中文字幕视频一区| 欧美大黄免费观看| 在线观看一区二区精品视频| 国产盗摄精品一区二区三区在线| 亚洲午夜电影在线观看| 欧美国产视频在线| 欧美一区二区三区在线视频| 99精品视频在线播放观看| 老色鬼精品视频在线观看播放| 亚洲欧洲成人精品av97| 欧美成人一区二区三区在线观看| 一本一道久久a久久精品| 国产一区二区0| 天天综合天天综合色| 中文字幕制服丝袜一区二区三区 | 欧美激情综合五月色丁香小说|