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

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

?? pitch.c

?? ITU-T G.729的一個實現例子(包括附錄b的vod檢測等功能)
?? C
?? 第 1 頁 / 共 2 頁
字號:
 *     t_min    : minimum value of pitch lag.                                *
 *     t_max    : maximum value of pitch lag.                                *
 *                                                                           *
 * Output arguments:                                                         *
 *     corr_norm[]:  normalized correlation (correlation between target and  *
 *                   filtered excitation divided by the square root of       *
 *                   energy of filtered excitation)                          *
 *--------------------------------------------------------------------------*/

static void Norm_Corr(Word16 exc[], Word16 xn[], Word16 h[], Word16 L_subfr,
               Word16 t_min, Word16 t_max, Word16 corr_norm[])
{
  Word16 i,j,k;
  Word16 corr_h, corr_l, norm_h, norm_l;
  Word32 s, L_temp;

  Word16 excf[L_SUBFR];
  Word16 scaling, h_fac, *s_excf, scaled_excf[L_SUBFR];


  k =  negate(t_min);

  /* compute the filtered excitation for the first delay t_min */

  Convolve(&exc[k], h, excf, L_subfr);

  /* scaled "excf[]" to avoid overflow */

  for(j=0; j<L_subfr; j++)
    scaled_excf[j] = shr(excf[j], 2);

  /* Compute energy of excf[] for danger of overflow */

  s = 0;
  for (j = 0; j < L_subfr; j++)
    s = L_mac(s, excf[j], excf[j]);

  L_temp = L_sub(s, 67108864L);
  if (L_temp <= 0L)      /* if (s <= 2^26) */
  {
    s_excf = excf;
    h_fac = 15-12;               /* h in Q12 */
    scaling = 0;
  }
  else {
    s_excf = scaled_excf;        /* "excf[]" is divide by 2 */
    h_fac = 15-12-2;             /* h in Q12, divide by 2 */
    scaling = 2;
  }

  /* loop for every possible period */

  for (i = t_min; i <= t_max; i++)
  {
    /* Compute 1/sqrt(energy of excf[]) */

    s = 0;
    for (j = 0; j < L_subfr; j++)
      s = L_mac(s, s_excf[j], s_excf[j]);

    s = Inv_sqrt(s);                     /* Result in Q30 */
    L_Extract(s, &norm_h, &norm_l);

    /* Compute correlation between xn[] and excf[] */

    s = 0;
    for (j = 0; j < L_subfr; j++)
      s = L_mac(s, xn[j], s_excf[j]);

    L_Extract(s, &corr_h, &corr_l);

    /* Normalize correlation = correlation * (1/sqrt(energy)) */

    s = Mpy_32(corr_h, corr_l, norm_h, norm_l);

    corr_norm[i] = extract_h(L_shl(s, 16));   /* Result is on 16 bits */

    /* modify the filtered excitation excf[] for the next iteration */

    if( sub(i, t_max) != 0)
    {
      k=sub(k,1);
      for (j = L_subfr-(Word16)1; j > 0; j--)
      {
        s = L_mult(exc[k], h[j]);
        s = L_shl(s, h_fac);             /* h is in Q(12-scaling) */
        s_excf[j] = add(extract_h(s), s_excf[j-1]);
      }
      s_excf[0] = shr(exc[k], scaling);
    }
  }
  return;
}

/*---------------------------------------------------------------------*
 * Function  G_pitch:                                                  *
 *           ~~~~~~~~                                                  *
 *---------------------------------------------------------------------*
 * Compute correlations <xn,y1> and <y1,y1> to use in gains quantizer. *
 * Also compute the gain of pitch. Result in Q14                       *
 *  if (gain < 0)  gain =0                                             *
 *  if (gain >1.2) gain =1.2                                           *
 *---------------------------------------------------------------------*/


Word16 G_pitch(      /* (o) Q14 : Gain of pitch lag saturated to 1.2       */
  Word16 xn[],       /* (i)     : Pitch target.                            */
  Word16 y1[],       /* (i)     : Filtered adaptive codebook.              */
  Word16 g_coeff[],  /* (i)     : Correlations need for gain quantization. */
  Word16 L_subfr     /* (i)     : Length of subframe.                      */
)
{
   Word16 i;
   Word16 xy, yy, exp_xy, exp_yy, gain;
   Word32 s;

   Word16 scaled_y1[L_SUBFR];

   /* divide "y1[]" by 4 to avoid overflow */

   for(i=0; i<L_subfr; i++)
     scaled_y1[i] = shr(y1[i], 2);

   /* Compute scalar product <y1[],y1[]> */

   Overflow = 0;
   s = 1;                    /* Avoid case of all zeros */
   for(i=0; i<L_subfr; i++)
     s = L_mac(s, y1[i], y1[i]);

   if (Overflow == 0) {
     exp_yy = norm_l(s);
     yy     = round( L_shl(s, exp_yy) );
   }
   else {
     s = 1;                  /* Avoid case of all zeros */
     for(i=0; i<L_subfr; i++)
       s = L_mac(s, scaled_y1[i], scaled_y1[i]);
     exp_yy = norm_l(s);
     yy     = round( L_shl(s, exp_yy) );
     exp_yy = sub(exp_yy, 4);
   }

   /* Compute scalar product <xn[],y1[]> */

   Overflow = 0;
   s = 0;
   for(i=0; i<L_subfr; i++)
     s = L_mac(s, xn[i], y1[i]);

   if (Overflow == 0) {
     exp_xy = norm_l(s);
     xy     = round( L_shl(s, exp_xy) );
   }
   else {
     s = 0;
     for(i=0; i<L_subfr; i++)
       s = L_mac(s, xn[i], scaled_y1[i]);
     exp_xy = norm_l(s);
     xy     = round( L_shl(s, exp_xy) );
     exp_xy = sub(exp_xy, 2);
   }

   g_coeff[0] = yy;
   g_coeff[1] = sub(15, exp_yy);
   g_coeff[2] = xy;
   g_coeff[3] = sub(15, exp_xy);

   /* If (xy <= 0) gain = 0 */


   if (xy <= 0)
   {
      g_coeff[3] = -15;   /* Force exp_xy to -15 = (15-30) */
      return( (Word16) 0);
   }

   /* compute gain = xy/yy */

   xy = shr(xy, 1);             /* Be sure xy < yy */
   gain = div_s( xy, yy);

   i = sub(exp_xy, exp_yy);
   gain = shr(gain, i);         /* saturation if > 1.99 in Q14 */

   /* if(gain >1.2) gain = 1.2  in Q14 */

   if( sub(gain, 19661) > 0)
   {
     gain = 19661;
   }


   return(gain);
}

/*----------------------------------------------------------------------*
 *    Function Enc_lag3                                                 *
 *             ~~~~~~~~                                                 *
 *   Encoding of fractional pitch lag with 1/3 resolution.              *
 *----------------------------------------------------------------------*
 * The pitch range for the first subframe is divided as follows:        *
 *   19 1/3  to   84 2/3   resolution 1/3                               *
 *   85      to   143      resolution 1                                 *
 *                                                                      *
 * The period in the first subframe is encoded with 8 bits.             *
 * For the range with fractions:                                        *
 *   index = (T-19)*3 + frac - 1;   where T=[19..85] and frac=[-1,0,1]  *
 * and for the integer only range                                       *
 *   index = (T - 85) + 197;        where T=[86..143]                   *
 *----------------------------------------------------------------------*
 * For the second subframe a resolution of 1/3 is always used, and the  *
 * search range is relative to the lag in the first subframe.           *
 * If t0 is the lag in the first subframe then                          *
 *  t_min=t0-5   and  t_max=t0+4   and  the range is given by           *
 *       t_min - 2/3   to  t_max + 2/3                                  *
 *                                                                      *
 * The period in the 2nd subframe is encoded with 5 bits:               *
 *   index = (T-(t_min-1))*3 + frac - 1;    where T[t_min-1 .. t_max+1] *
 *----------------------------------------------------------------------*/


Word16 Enc_lag3(     /* output: Return index of encoding */
  Word16 T0,         /* input : Pitch delay              */
  Word16 T0_frac,    /* input : Fractional pitch delay   */
  Word16 *T0_min,    /* in/out: Minimum search delay     */
  Word16 *T0_max,    /* in/out: Maximum search delay     */
  Word16 pit_min,    /* input : Minimum pitch delay      */
  Word16 pit_max,    /* input : Maximum pitch delay      */
  Word16 pit_flag    /* input : Flag for 1st subframe    */
)
{
  Word16 index, i;

  if (pit_flag == 0)   /* if 1st subframe */
  {
    /* encode pitch delay (with fraction) */

    if (sub(T0, 85) <= 0)
    {
      /* index = t0*3 - 58 + t0_frac   */
      i = add(add(T0, T0), T0);
      index = add(sub(i, 58), T0_frac);
    }
    else {
      index = add(T0, 112);
    }

    /* find T0_min and T0_max for second (or fourth) subframe */

    *T0_min = sub(T0, 5);
    if (sub(*T0_min, pit_min) < 0)
    {
      *T0_min = pit_min;
    }

    *T0_max = add(*T0_min, 9);
    if (sub(*T0_max, pit_max) > 0)
    {
      *T0_max = pit_max;
      *T0_min = sub(*T0_max, 9);
    }
  }
  else      /* if second subframe */
  {

    /* i = t0 - t0_min;               */
    /* index = i*3 + 2 + t0_frac;     */
    i = sub(T0, *T0_min);
    i = add(add(i, i), i);
    index = add(add(i, 2), T0_frac);
  }


  return index;
}


/*---------------------------------------------------------------------------*
 * Procedure Interpol_3()                                                    *
 * ~~~~~~~~~~~~~~~~~~~~~~                                                    *
 * For interpolating the normalized correlation with 1/3 resolution.         *
 *--------------------------------------------------------------------------*/
Word16 Interpol_3(      /* (o)  : interpolated value  */
  Word16 *x,            /* (i)  : input vector        */
  Word16 frac           /* (i)  : fraction            */
)
{
  Word16 i, k;
  Word16 *x1, *x2, *c1, *c2;
  Word32 s;

  if(frac < 0)
  {
    frac = add(frac, UP_SAMP);
    x--;
  }

  x1 = &x[0];
  x2 = &x[1];
  c1 = &inter_3[frac];
  c2 = &inter_3[sub(UP_SAMP,frac)];

  s = 0;
  for(i=0, k=0; i< L_INTER4; i++, k+=UP_SAMP)
  {
    s = L_mac(s, x1[-i], c1[k]);
    s = L_mac(s, x2[i],  c2[k]);
  }


  return round(s);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品你懂的| 国内一区二区视频| 国产一区二三区好的| 色综合久久久久| 久久久精品2019中文字幕之3| 亚洲综合色自拍一区| 国产真实乱偷精品视频免| 成人免费毛片高清视频| 欧美一区二区黄| 亚洲国产成人tv| 99久久综合狠狠综合久久| 日韩欧美一级二级三级| 亚洲最色的网站| 99国产精品一区| 日本一区二区三区久久久久久久久不 | 色综合久久久久综合体| 久久久久国产成人精品亚洲午夜| 同产精品九九九| 欧美日韩视频在线第一区| 亚洲日本一区二区三区| 成人激情综合网站| 国产欧美精品一区二区色综合朱莉| 青椒成人免费视频| 制服丝袜国产精品| 日本中文字幕一区二区视频| 在线亚洲+欧美+日本专区| 国产精品三级在线观看| 成人性生交大片免费看在线播放 | 欧美午夜精品久久久久久超碰 | 一区二区激情视频| 91在线精品一区二区三区| 国产三级欧美三级日产三级99| 久久精品国产精品亚洲红杏| 日韩欧美国产一区在线观看| 欧美a级理论片| 欧美一区二区三区四区在线观看| 亚洲gay无套男同| 制服.丝袜.亚洲.中文.综合| 日韩在线一区二区三区| 欧美男生操女生| 卡一卡二国产精品| 久久久亚洲欧洲日产国码αv| 久久国产欧美日韩精品| 久久先锋影音av| www.成人在线| 樱花草国产18久久久久| 欧美日韩精品系列| 久久99久久精品| 中文字幕精品一区二区精品绿巨人 | 国产精品久久久久久久第一福利 | 激情深爱一区二区| 国产亚洲精品超碰| 成人97人人超碰人人99| 亚洲精品高清在线观看| 欧美日韩电影在线播放| 老司机午夜精品99久久| 国产日韩精品一区二区三区| 成人avav影音| 亚洲一区二区三区国产| 欧美大片日本大片免费观看| 国产精品香蕉一区二区三区| 亚洲天堂久久久久久久| 欧美日韩国产一级| 国产精一品亚洲二区在线视频| 中文字幕视频一区二区三区久| 91亚洲资源网| 免费高清成人在线| 国产精品第一页第二页第三页| 在线看不卡av| 国产真实乱偷精品视频免| 亚洲视频网在线直播| 日韩一区二区在线免费观看| 国产ts人妖一区二区| 亚洲永久免费视频| 久久久高清一区二区三区| 91国偷自产一区二区三区观看| 夜夜操天天操亚洲| 久草精品在线观看| 精品美女被调教视频大全网站| 精品va天堂亚洲国产| 亚洲国产婷婷综合在线精品| 色欲综合视频天天天| 欧美成人午夜电影| 日本视频在线一区| 欧美日韩国产小视频在线观看| 久久伊人中文字幕| 国产成人在线免费| 欧美影视一区二区三区| 亚洲一区二区精品视频| 久久精品亚洲精品国产欧美kt∨| 欧美制服丝袜第一页| 国产精品白丝jk黑袜喷水| 日韩在线卡一卡二| 亚洲综合色成人| 自拍偷自拍亚洲精品播放| 欧美第一区第二区| 在线播放日韩导航| 欧美唯美清纯偷拍| 色爱区综合激月婷婷| www.日韩大片| 国产aⅴ精品一区二区三区色成熟| 日韩精品三区四区| 婷婷亚洲久悠悠色悠在线播放| 亚洲欧美激情小说另类| 中文字幕一区二区三区四区不卡| 欧美大片日本大片免费观看| 91麻豆精品国产| 欧美亚男人的天堂| 欧美性色欧美a在线播放| 在线观看亚洲精品| 日本韩国欧美国产| 欧美日韩一区成人| 欧美日韩在线精品一区二区三区激情 | 色婷婷久久一区二区三区麻豆| 成人免费毛片app| youjizz久久| jvid福利写真一区二区三区| 成人夜色视频网站在线观看| 国产精品91xxx| 粉嫩高潮美女一区二区三区 | 另类综合日韩欧美亚洲| 蜜桃在线一区二区三区| 另类调教123区| 国产成人小视频| av中文字幕一区| 色婷婷综合久久| 欧美日韩免费不卡视频一区二区三区| 色8久久精品久久久久久蜜| 欧美手机在线视频| 欧美一区二区三区不卡| 337p日本欧洲亚洲大胆色噜噜| 精品国产乱码久久久久久蜜臀 | 中文字幕中文字幕在线一区 | 99精品视频一区| 欧美性感一区二区三区| 7777精品久久久大香线蕉| 欧美mv日韩mv国产网站| 久久午夜老司机| 亚洲男人的天堂一区二区| 亚洲va中文字幕| 国产在线看一区| 91在线一区二区三区| 欧美日产国产精品| 精品av综合导航| 亚洲天堂网中文字| 青青草原综合久久大伊人精品优势| 国产在线国偷精品免费看| 91免费国产在线观看| 日韩一区二区三区在线观看| 久久久久久久久久看片| 亚洲精品va在线观看| 激情小说欧美图片| 91免费看视频| 精品少妇一区二区三区| 亚洲精品日韩综合观看成人91| 肉肉av福利一精品导航| 成人开心网精品视频| 欧美日产在线观看| 国产精品免费视频一区| 天堂久久久久va久久久久| 国产丶欧美丶日本不卡视频| 欧美三电影在线| 国产精品久99| 久久99国产乱子伦精品免费| 91丨porny丨首页| 精品国产网站在线观看| 一区二区三区四区在线免费观看| 韩国精品主播一区二区在线观看| 91久久人澡人人添人人爽欧美| 久久嫩草精品久久久精品一| 亚洲成人动漫在线观看| 成人动漫视频在线| 精品国产免费久久 | 亚洲另类在线一区| 国模套图日韩精品一区二区| 欧美乱妇15p| 亚洲免费观看高清完整版在线| 国产一区二区在线观看免费| 精品视频在线免费观看| 亚洲人成精品久久久久久 | 午夜激情一区二区三区| 一本色道a无线码一区v| 国产欧美日本一区视频| 国产综合色视频| 日韩精品中文字幕在线不卡尤物| 一级做a爱片久久| 99精品在线免费| 国产精品色哟哟网站| 国产白丝精品91爽爽久久| 久久美女艺术照精彩视频福利播放| 日韩精品色哟哟| 91精品久久久久久久99蜜桃| 午夜欧美电影在线观看| 欧美性感一区二区三区| 亚洲一区中文日韩| 欧美午夜宅男影院| 午夜免费久久看| 91精品国产全国免费观看 | www.欧美色图| 亚洲欧洲成人自拍|