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

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

?? pitch.c

?? 語(yǔ)音編碼的原程序,是在國(guó)外的網(wǎng)站下來(lái)的,沒(méi)有改動(dòng)可以直接在軟電話下使用!
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
 *     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);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级日韩一级| 国产综合色精品一区二区三区| 国产精品视频一二三| 精品精品欲导航| 日韩精品一区二区三区视频播放| 日韩午夜激情av| 日韩一级片在线观看| 日韩一区二区免费电影| 日韩欧美中文字幕制服| 精品美女在线播放| 久久综合精品国产一区二区三区| 精品国产乱码久久久久久蜜臀| 日韩欧美第一区| 2020日本不卡一区二区视频| 国产日韩亚洲欧美综合| 国产精品免费久久| 亚洲乱码国产乱码精品精可以看| 亚洲欧美成aⅴ人在线观看| 亚洲一区二区三区四区在线观看 | 在线欧美日韩国产| 欧美色综合网站| 日韩午夜激情视频| 久久精品人人做| 亚洲婷婷综合久久一本伊一区| 亚洲免费观看高清| 亚洲444eee在线观看| 久久国产欧美日韩精品| 成人涩涩免费视频| 在线亚洲欧美专区二区| 日韩欧美黄色影院| 欧美国产精品一区二区| 亚洲一区二区三区三| 久久99久久99| 99re成人精品视频| 欧美一区欧美二区| 国产精品三级视频| 亚洲一区影音先锋| 韩国视频一区二区| 色综合天天综合给合国产| 欧美日韩一二区| 国产午夜精品久久久久久免费视 | 国产一区二区精品在线观看| 99久久精品国产导航| 欧美日韩aaa| 中文字幕欧美日韩一区| 天天色天天爱天天射综合| 黄色资源网久久资源365| 97成人超碰视| 日韩免费视频一区二区| 亚洲欧美综合另类在线卡通| 日韩电影免费在线| 99re热视频精品| 亚洲精品一区二区精华| 夜夜操天天操亚洲| 国产精品一区在线| 欧美日韩一区二区三区免费看 | 亚洲视频 欧洲视频| 奇米777欧美一区二区| 91一区二区在线观看| 精品999在线播放| 亚欧色一区w666天堂| 成人精品国产福利| 精品日韩一区二区三区免费视频| 亚洲视频在线一区二区| 国产九色精品成人porny| 欧美精品在线观看一区二区| 中文久久乱码一区二区| 免费欧美高清视频| 在线精品国精品国产尤物884a| 国产日韩av一区| 裸体在线国模精品偷拍| 精品视频1区2区3区| 亚洲视频小说图片| 高清成人免费视频| 2020国产精品自拍| 免费av成人在线| 欧美色欧美亚洲另类二区| 中文字幕在线一区免费| 国内精品视频一区二区三区八戒| 在线播放91灌醉迷j高跟美女| 亚洲私人黄色宅男| 成人av高清在线| 欧美国产一区视频在线观看| 六月婷婷色综合| 欧美精品久久一区二区三区| 亚洲一区二区免费视频| 91麻豆精品在线观看| 国产精品久久一级| 国产传媒久久文化传媒| www国产成人免费观看视频 深夜成人网| 天堂av在线一区| 欧美日韩高清在线| 丝袜诱惑亚洲看片| 91麻豆精品国产91久久久久久久久| 亚洲精品免费在线播放| 色哟哟日韩精品| 一区二区三区欧美视频| 91网上在线视频| 日韩一区在线看| 91免费看`日韩一区二区| 亚洲欧洲日韩一区二区三区| 成人免费视频caoporn| 国产精品福利影院| av亚洲精华国产精华| 最近中文字幕一区二区三区| 99精品视频一区| 亚洲美腿欧美偷拍| 色菇凉天天综合网| 亚洲福利视频一区二区| 欧美久久久久久久久中文字幕| 午夜精品福利久久久| 日韩一区二区在线播放| 久久精品国产在热久久| 久久午夜羞羞影院免费观看| 麻豆精品一区二区综合av| 久久尤物电影视频在线观看| 国产精品456露脸| 国产精品电影一区二区三区| 色综合久久久久综合99| 午夜一区二区三区视频| 欧美一区三区四区| 国产精品一区免费在线观看| 中文字幕一区二区三区在线观看| 日本精品一区二区三区高清 | 蜜臀a∨国产成人精品| 久久蜜桃av一区精品变态类天堂| 国产精品一线二线三线精华| ...xxx性欧美| 欧美三级韩国三级日本一级| 青青草91视频| 中文字幕成人av| 欧美亚洲禁片免费| 久久国产精品露脸对白| 欧美国产日韩精品免费观看| 一本一本大道香蕉久在线精品| 亚洲国产日日夜夜| 精品国产露脸精彩对白| 97精品国产露脸对白| 热久久久久久久| 国产精品乱码妇女bbbb| 欧美日韩久久久一区| 国产在线精品免费av| 亚洲视频免费在线| 精品毛片乱码1区2区3区| 色综合一区二区三区| 日韩1区2区日韩1区2区| 久久免费视频色| 欧美日韩精品免费| 丁香激情综合五月| 日本成人在线不卡视频| 中文字幕在线观看不卡| 日韩一区二区高清| 色综合久久88色综合天天6| 极品少妇一区二区三区精品视频| 亚洲视频网在线直播| 欧美成人免费网站| 一本久久精品一区二区| 国产一区二区伦理| 亚洲成人精品一区| 国产欧美日韩一区二区三区在线观看| 色88888久久久久久影院按摩| 麻豆国产一区二区| 玉足女爽爽91| 亚洲国产岛国毛片在线| 日韩一区二区视频在线观看| av影院午夜一区| 国内久久婷婷综合| 亚洲一二三区不卡| 中文字幕一区日韩精品欧美| 欧美大尺度电影在线| 欧美性大战久久久| 9久草视频在线视频精品| 黄网站免费久久| 日本三级亚洲精品| 一区二区三区丝袜| 国产精品视频观看| 精品美女在线播放| 日韩一区二区三区视频| 欧美主播一区二区三区美女| av在线不卡电影| 丁香婷婷综合五月| 国产福利一区二区| 精品一区二区三区在线观看| 天天免费综合色| 亚洲国产sm捆绑调教视频| 亚洲日本免费电影| 中文字幕欧美一区| 国产精品电影院| 国产精品丝袜久久久久久app| 久久婷婷综合激情| 精品国产乱码久久久久久图片| 51精品国自产在线| 欧美日韩卡一卡二| 欧美日韩精品二区第二页| 在线观看国产日韩| 91精品视频网| 欧洲激情一区二区| 在线免费精品视频| 欧美日韩一区二区不卡| 欧美三级一区二区|