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

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

?? pitch.c

?? G711/G723/G726/g728/g729 a語(yǔ)音壓縮算法的資料及原程序
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* Version 3.3    Last modified: December 26, 1995 */

/*---------------------------------------------------------------------------*
 * procedure Pitch_ol                                                        *
 * ~~~~~~~~~~~~~~~~~~                                                        *
 * Compute the open loop pitch lag.                                          *
 *                                                                           *
 *---------------------------------------------------------------------------*/

#include "typedef.h"
#include "basic_op.h"
#include "oper_32b.h"
#include "ld8k.h"
#include "tab_ld8k.h"

/* local function */

static Word16 Lag_max(        /* output: lag found                           */
  Word16 signal[],     /* input : signal used to compute the open loop pitch */
  Word16 L_frame,      /* input : length of frame to compute pitch           */
  Word16 lag_max,      /* input : maximum lag                                */
  Word16 lag_min,      /* input : minimum lag                                */
  Word16 *cor_max);    /* output: normalized correlation of selected lag     */


Word16 Pitch_ol(       /* output: open loop pitch lag                        */
   Word16 signal[],    /* input : signal used to compute the open loop pitch */
                       /*     signal[-pit_max] to signal[-1] should be known */
   Word16   pit_min,   /* input : minimum pitch lag                          */
   Word16   pit_max,   /* input : maximum pitch lag                          */
   Word16   L_frame    /* input : length of frame to compute pitch           */
)
{
  Word16  i, j;
  Word16  max1, max2, max3;
  Word16  p_max1, p_max2, p_max3;
  Word32  t0, L_temp;

  /* Scaled signal */

  Word16 scaled_signal[L_FRAME+PIT_MAX];
  Word16 *scal_sig;

  scal_sig = &scaled_signal[pit_max];

  /*--------------------------------------------------------*
   *  Verification for risk of overflow.                    *
   *--------------------------------------------------------*/

   Overflow = 0;
   t0 = 0;

   for(i= -pit_max; i< L_frame; i++)
     t0 = L_mac(t0, signal[i], signal[i]);

  /*--------------------------------------------------------*
   * Scaling of input signal.                               *
   *                                                        *
   *   if Overflow        -> scal_sig[i] = signal[i]>>3     *
   *   else if t0 < 1^20  -> scal_sig[i] = signal[i]<<3     *
   *   else               -> scal_sig[i] = signal[i]        *
   *--------------------------------------------------------*/

   if(Overflow == 1)
   {
     for(i=-pit_max; i<L_frame; i++)
       scal_sig[i] = shr(signal[i], 3);
   }
   else {
     L_temp = L_sub(t0, (Word32)1048576L);
     if ( L_temp < (Word32)0 )  /* if (t0 < 2^20) */
     {
        for(i=-pit_max; i<L_frame; i++)
          scal_sig[i] = shl(signal[i], 3);
     }
     else
     {
       for(i=-pit_max; i<L_frame; i++)
         scal_sig[i] = signal[i];
     }
   }
  /*--------------------------------------------------------------------*
   *  The pitch lag search is divided in three sections.                *
   *  Each section cannot have a pitch multiple.                        *
   *  We find a maximum for each section.                               *
   *  We compare the maximum of each section by favoring small lag.     *
   *                                                                    *
   *  First section:  lag delay = pit_max     downto 4*pit_min          *
   *  Second section: lag delay = 4*pit_min-1 downto 2*pit_min          *
   *  Third section:  lag delay = 2*pit_min-1 downto pit_min            *
   *--------------------------------------------------------------------*/


   j = shl(pit_min, 2);
   p_max1 = Lag_max(scal_sig, L_frame, pit_max, j, &max1);

   i = sub(j, 1); j = shl(pit_min, 1);
   p_max2 = Lag_max(scal_sig, L_frame, i, j, &max2);

   i = sub(j, 1);
   p_max3 = Lag_max(scal_sig, L_frame, i, pit_min , &max3);

  /*--------------------------------------------------------------------*
   * Compare the 3 sections maximum, and favor small lag.               *
   *--------------------------------------------------------------------*/

  if( sub(mult(max1, THRESHPIT), max2)  < 0)
  {
    max1 = max2;
    p_max1 = p_max2;
  }

  if( sub(mult(max1, THRESHPIT), max3)  < 0)
  {
    p_max1 = p_max3;
  }


  return (p_max1);
}

/*---------------------------------------------------------------------------*
 * procedure Lag_max                                                         *
 * ~~~~~~~~~~~~~~~~~                                                         *
 * Find the lag that has maximum correlation with scal_sig[]                 *
 *                                                                           *
 *---------------------------------------------------------------------------*
 * arguments:                                                                *
 *                                                                           *
 *   signal[]   :Signal used to compute the open loop pitch.                 *
 *   L_frame    :Length of frame to compute pitch.                           *
 *   lag_max    :Maximum lag                                                 *
 *   lag_min    :Minimum lag                                                 *
 *   *cor_max   ;Maximum of normalized correlation of lag found.             *
 *                                                                           *
 *   Return lag found.                                                       *
 *--------------------------------------------------------------------------*/

static Word16 Lag_max( /* output: lag found                                  */
  Word16 signal[],     /* input : signal used to compute the open loop pitch */
  Word16 L_frame,      /* input : length of frame to compute pitch           */
  Word16 lag_max,      /* input : maximum lag                                */
  Word16 lag_min,      /* input : minimum lag                                */
  Word16 *cor_max)     /* output: normalized correlation of selected lag     */
{
  Word16  i, j;
  Word16  *p, *p1;
  Word32  max, t0, L_temp;
  Word16  max_h, max_l, ener_h, ener_l;
  Word16  p_max;

  max = MIN_32;

   /* initialization used only to suppress Microsoft Visual C++  warnings */

  p_max = lag_max;

  for (i = lag_max; i >= lag_min; i--)
  {
    p  = signal;
    p1 = &signal[-i];
    t0 = 0;

    for (j=0; j<L_frame; j++, p++, p1++)
      t0 = L_mac(t0, *p, *p1);

    L_temp = L_sub(t0,max);
    if (L_temp >= 0L)
    {
      max    = t0;
      p_max = i;
    }
  }

  /* compute energy */

  t0 = 0;
  p = &signal[-p_max];
  for(i=0; i<L_frame; i++, p++)
    t0 = L_mac(t0, *p, *p);

  /* 1/sqrt(energy),    result in Q30 */

  t0 = Inv_sqrt(t0);

  /* max = max/sqrt(energy)                   */
  /* This result will always be on 16 bits !! */

  L_Extract(max, &max_h, &max_l);
  L_Extract(t0, &ener_h, &ener_l);

  t0 = Mpy_32(max_h, max_l, ener_h, ener_l);
  *cor_max = extract_l(t0);

  return(p_max);
}

/*--------------------------------------------------------------------------*
 * Function  Pitch_fr3()                                                    *
 * ~~~~~~~~~~~~~~~~~~~~~                                                    *
 * Find the pitch period with 1/3 subsample resolution.                     *
 *--------------------------------------------------------------------------*/

        /* Local functions */

static void Norm_Corr(Word16 exc[], Word16 xn[], Word16 h[], Word16 L_subfr,
                      Word16 t_min, Word16 t_max, Word16 corr_norm[]);


Word16 Pitch_fr3(    /* (o)     : pitch period.                          */
  Word16 exc[],      /* (i)     : excitation buffer                      */
  Word16 xn[],       /* (i)     : target vector                          */
  Word16 h[],        /* (i) Q12 : impulse response of filters.           */
  Word16 L_subfr,    /* (i)     : Length of subframe                     */
  Word16 t0_min,     /* (i)     : minimum value in the searched range.   */
  Word16 t0_max,     /* (i)     : maximum value in the searched range.   */
  Word16 i_subfr,    /* (i)     : indicator for first subframe.          */
  Word16 *pit_frac   /* (o)     : chosen fraction.                       */
)
{
  Word16 i;
  Word16 t_min, t_max;
  Word16 max, lag, frac;
  Word16 *corr;
  Word16 corr_int;
  Word16 corr_v[40];           /* Total length = t0_max-t0_min+1+2*L_INTER */


  /* Find interval to compute normalized correlation */

  t_min = sub(t0_min, L_INTER4);
  t_max = add(t0_max, L_INTER4);

  corr = &corr_v[-t_min];

  /* Compute normalized correlation between target and filtered excitation */

  Norm_Corr(exc, xn, h, L_subfr, t_min, t_max, corr);

  /* Find integer pitch */

  max = corr[t0_min];
  lag = t0_min;

  for(i= t0_min+(Word16)1; i<=t0_max; i++)
  {
    if( sub(corr[i], max) >= 0)
    {
      max = corr[i];
      lag = i;
    }
  }

  /* If first subframe and lag > 84 do not search fractional pitch */

  if( (i_subfr == 0) && (sub(lag, 84) > 0) )
  {
    *pit_frac = 0;
    return(lag);
  }

  /* Test the fractions around T0 and choose the one which maximizes   */
  /* the interpolated normalized correlation.                          */

  max  = Interpol_3(&corr[lag], -2);
  frac = -2;

  for (i = -1; i <= 2; i++)
  {
    corr_int = Interpol_3(&corr[lag], i);
    if (sub(corr_int, max) > 0)
    {
      max = corr_int;
      frac = i;
    }
  }

  /* limit the fraction value between -1 and 1 */

  if (sub(frac, -2) == 0)
  {
    frac = 1;
    lag = sub(lag, 1);
  }
  if (sub(frac, 2) == 0)
  {
    frac = -1;
    lag = add(lag, 1);
  }

  *pit_frac = frac;


  return(lag);
}

/*---------------------------------------------------------------------------*
 * Function Norm_Corr()                                                      *
 * ~~~~~~~~~~~~~~~~~~~~                                                      *
 * Find the normalized correlation between the target vector and the         *
 * filtered past excitation.                                                 *
 *---------------------------------------------------------------------------*
 * Input arguments:                                                          *
 *     exc[]    : excitation buffer                                          *
 *     xn[]     : target vector                                              *
 *     h[]      : impulse response of synthesis and weighting filters (Q12)  *
 *     L_subfr  : Length of subframe                                         *
 *     t_min    : minimum value of pitch lag.                                *
 *     t_max    : maximum value of pitch lag.                                *
 *                                                                           *
 * Output arguments:                                                         *

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产91久久久久 | 亚洲日本韩国一区| 国产在线一区观看| 国产日本亚洲高清| 日本不卡视频一二三区| 欧美巨大另类极品videosbest| 一区二区三区四区在线免费观看 | 亚洲丝袜美腿综合| 在线精品视频免费播放| 亚洲va中文字幕| 制服丝袜中文字幕亚洲| 久国产精品韩国三级视频| 久久人人爽爽爽人久久久| 成人精品视频网站| 亚洲精品国产高清久久伦理二区| 欧美影视一区在线| 美国三级日本三级久久99| 久久久夜色精品亚洲| 91在线视频播放| 日韩精品成人一区二区三区 | 丁香婷婷综合五月| 亚洲国产精品综合小说图片区| 欧美一区二区黄色| 99国产一区二区三精品乱码| 亚洲激情综合网| 国产女同互慰高潮91漫画| 色中色一区二区| 久久99精品国产.久久久久久| 亚洲视频在线一区二区| 欧美一区二区在线视频| 93久久精品日日躁夜夜躁欧美| 香港成人在线视频| 亚洲视频一区在线| 久久久久亚洲综合| 日韩视频中午一区| 91精品91久久久中77777| 粉嫩蜜臀av国产精品网站| 免费高清在线一区| 亚洲国产综合人成综合网站| 欧美极品少妇xxxxⅹ高跟鞋| 欧美一区二区三区啪啪| 天天做天天摸天天爽国产一区| 国产精品国产三级国产aⅴ入口| 欧美一区二区视频免费观看| 99在线精品观看| 国产成人av影院| 久久国产综合精品| 国产精品99久| 91视频观看视频| 欧美亚洲综合久久| 2020国产精品自拍| 久久中文字幕电影| 亚洲欧美日韩综合aⅴ视频| 亚洲黄网站在线观看| 五月激情综合婷婷| 日本不卡一区二区三区高清视频| 国内外成人在线视频| 国产成人精品午夜视频免费| 99精品国产一区二区三区不卡| 91亚洲永久精品| 精品国产精品网麻豆系列| 国产欧美日韩不卡免费| 亚洲一区二区三区在线看| 久久99精品久久只有精品| 免费观看在线综合色| 国产精品一品视频| 欧美日韩国产小视频| 久久精品亚洲麻豆av一区二区| 亚洲欧美成aⅴ人在线观看| 日韩中文字幕av电影| 国产成人av一区| 日韩精品一区二区三区视频播放| 中文字幕在线一区二区三区| 日韩中文字幕区一区有砖一区| 成人自拍视频在线| 久久综合久久鬼色中文字| 性做久久久久久久久| 91小视频免费观看| 国产精品天美传媒沈樵| 韩国av一区二区三区四区| 欧美女孩性生活视频| 亚洲另类色综合网站| 成人小视频免费在线观看| 亚洲精品一线二线三线| 日本欧美加勒比视频| 5858s免费视频成人| 亚洲综合激情另类小说区| 一本到三区不卡视频| 国产精品亲子伦对白| www.99精品| 亚洲欧洲av一区二区三区久久| 国产精品99久久久久久似苏梦涵 | 成人免费高清在线| 国产欧美一区二区精品仙草咪| 久久精品噜噜噜成人av农村| 精品国产第一区二区三区观看体验| 国产在线精品免费| 日韩一级片网址| 国产精品91xxx| 欧美高清在线精品一区| 成人永久aaa| 国产精品国产三级国产| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美性生活一区| 国产又黄又大久久| 日韩精品一区二区三区视频| 国产综合一区二区| 国产精品卡一卡二| 欧美片在线播放| 激情成人午夜视频| 国产精品久久久久婷婷 | 久99久精品视频免费观看| 久久久99精品免费观看不卡| 成人高清免费观看| 日韩精品一级二级| 久久嫩草精品久久久精品一| 北岛玲一区二区三区四区| 亚洲国产日韩a在线播放性色| 91精品免费在线观看| 久久成人免费网| 日韩美女啊v在线免费观看| 日韩女优电影在线观看| 99精品在线观看视频| 美女任你摸久久| 亚洲手机成人高清视频| 亚洲午夜羞羞片| 国产精品久久午夜| 精品国产伦理网| 欧美一区二区在线看| fc2成人免费人成在线观看播放| 亚洲高清免费视频| 国产欧美精品一区| 欧美xxxxxxxx| 91精品福利在线一区二区三区| 99re这里都是精品| 成人手机电影网| 国产精品亚洲第一| 国产精品综合在线视频| 青青草成人在线观看| 婷婷夜色潮精品综合在线| 一卡二卡三卡日韩欧美| 亚洲欧洲色图综合| 亚洲色图色小说| 一区二区三区波多野结衣在线观看| 自拍偷拍欧美激情| 日韩一区欧美小说| 一区二区高清视频在线观看| 亚洲欧美日韩人成在线播放| 中文字幕日韩精品一区| 中文字幕 久热精品 视频在线| 精品蜜桃在线看| 国产精品麻豆久久久| 一区二区高清视频在线观看| 国产精品色哟哟网站| 亚洲午夜在线观看视频在线| 天天色综合天天| 精品中文字幕一区二区小辣椒 | 日韩免费高清视频| 欧美精品一区二区三区一线天视频 | 久久久久久免费| 亚洲色图都市小说| 亚洲福利视频一区| 国产在线一区二区| 色综合久久久久综合体| 欧美日韩大陆在线| 337p日本欧洲亚洲大胆精品| 国产精品国产自产拍高清av| 伊人夜夜躁av伊人久久| 日本欧洲一区二区| www.av精品| 9191国产精品| 1区2区3区国产精品| 精品一区二区免费视频| 色婷婷精品大视频在线蜜桃视频| 精品久久久久久久久久久院品网 | 国产精品视频一区二区三区不卡| 亚洲一卡二卡三卡四卡| 韩国av一区二区三区| 欧美区视频在线观看| 亚洲欧洲一区二区三区| 97久久久精品综合88久久| 4438亚洲最大| 一区二区三区中文字幕| 成人av免费在线播放| 国产日韩在线不卡| 国产一区二三区| 欧美电视剧免费全集观看| 亚洲国产精品精华液网站| 99精品在线观看视频| 综合亚洲深深色噜噜狠狠网站| 国产美女精品在线| 久久久久久久网| 成人一区二区三区视频| 久久综合九色综合欧美98| 久久成人av少妇免费| 精品国产精品网麻豆系列| 激情图片小说一区| 日本一区二区高清| 99麻豆久久久国产精品免费优播| 中文字幕在线观看一区|