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

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

?? pitch.c

?? G711/G723/G726/g728/g729 a語(yǔ)音壓縮算法的資料及原程序
?? 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一区二区三区免费野_久草精品视频
亚洲视频图片小说| 亚洲欧美日韩电影| 99国产精品久久久久久久久久 | 久久久久久久综合色一本| 91精彩视频在线| 玖玖九九国产精品| 亚洲精选视频免费看| 久久久久久一级片| 精品乱人伦一区二区三区| 99精品欧美一区二区三区小说 | 岛国av在线一区| 免费黄网站欧美| 亚洲国产欧美另类丝袜| 国产精品美女一区二区三区 | 欧美变态tickling挠脚心| 欧美日韩一区三区| 欧美影视一区在线| 91福利国产精品| 97se亚洲国产综合自在线| 国产白丝网站精品污在线入口| 视频一区二区欧美| 偷拍亚洲欧洲综合| 婷婷久久综合九色综合绿巨人| 亚洲一区二区av在线| 日韩精品一二三| 亚洲 欧美综合在线网络| 亚洲综合区在线| 亚洲欧美综合另类在线卡通| 日韩免费一区二区| 91精品婷婷国产综合久久 | 国产午夜一区二区三区| 国产三级精品在线| 亚洲国产电影在线观看| 亚洲欧美日韩久久精品| 亚洲品质自拍视频| 香蕉久久一区二区不卡无毒影院| 日韩中文字幕91| 国产成人精品综合在线观看 | 欧美一级专区免费大片| 欧美人成免费网站| 精品区一区二区| 国产亚洲污的网站| 亚洲电影你懂得| 久久99国产精品成人| 波多野洁衣一区| 在线视频国产一区| 91精品国产综合久久久久| 久久亚洲一区二区三区四区| 亚洲国产成人自拍| 青娱乐精品视频在线| 成人精品鲁一区一区二区| 欧美中文字幕亚洲一区二区va在线| 欧美日韩精品综合在线| 久久久久久夜精品精品免费| 日韩综合小视频| 色悠悠亚洲一区二区| 日韩欧美在线1卡| 亚洲午夜激情网站| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 高清av一区二区| 国产亚洲欧洲一区高清在线观看| 亚洲成人在线观看视频| 91在线云播放| 久久久久一区二区三区四区| 久久99国产精品成人| 一本久久a久久免费精品不卡| 国产午夜亚洲精品不卡| 青青草国产精品97视觉盛宴| 在线中文字幕一区| 中文字幕一区二区三区视频 | 一本一本大道香蕉久在线精品| 久久品道一品道久久精品| 美女视频免费一区| 色综合色综合色综合色综合色综合 | 色综合咪咪久久| 国产精品毛片久久久久久久| 成人免费不卡视频| 国产精品美女视频| 成人av免费在线观看| 国产精品成人午夜| 在线观看日韩一区| 日本女人一区二区三区| 日韩欧美一区二区久久婷婷| 日本欧美肥老太交大片| 久久蜜臀中文字幕| 成人爱爱电影网址| 亚洲18女电影在线观看| 日韩精品资源二区在线| 成人国产精品免费| 亚洲夂夂婷婷色拍ww47| 91精品午夜视频| 日韩国产高清在线| 日韩精品在线看片z| 免费三级欧美电影| 久久伊人中文字幕| 懂色av噜噜一区二区三区av| 国产精品污网站| 色综合婷婷久久| 青青草国产成人av片免费| 欧美一区三区二区| 成人福利电影精品一区二区在线观看| 国产精品美女一区二区在线观看| 99久久精品久久久久久清纯| 国产精品盗摄一区二区三区| 色94色欧美sute亚洲线路一ni| 天天色天天操综合| 久久久91精品国产一区二区三区| 在线日韩av片| 久久精品久久精品| 日精品一区二区| 国产女主播一区| 久久亚洲精品国产精品紫薇| 欧美一区二区三区四区在线观看| 一本一本大道香蕉久在线精品 | 成人av免费在线播放| 国产激情精品久久久第一区二区| 激情图区综合网| 国产成人精品一区二区三区网站观看| 麻豆精品在线看| 日韩一级在线观看| 色综合天天天天做夜夜夜夜做| 麻豆91精品视频| 蜜桃视频在线观看一区| 蜜桃视频在线观看一区二区| 亚洲一线二线三线久久久| 欧美激情艳妇裸体舞| 欧美xfplay| 6080午夜不卡| 日韩一卡二卡三卡四卡| 亚洲精品一线二线三线| 日韩免费福利电影在线观看| 欧美一区二区在线视频| 日韩一区二区三区在线观看 | 在线国产电影不卡| 色天天综合色天天久久| 欧美日韩国产乱码电影| 欧美日韩日日摸| 欧美一级在线免费| 亚洲精品一线二线三线| 国产日韩在线不卡| 日本一区二区三区dvd视频在线| 久久综合丝袜日本网| 欧美激情一区二区三区蜜桃视频 | 奇米色777欧美一区二区| 一区二区在线免费观看| 亚洲精品一区二区三区福利| 99riav一区二区三区| 国产成人无遮挡在线视频| 日韩精品电影在线| 蜜桃免费网站一区二区三区 | 看电视剧不卡顿的网站| 久久电影国产免费久久电影 | 日韩精品91亚洲二区在线观看| 亚洲18色成人| 丰满亚洲少妇av| 精品视频1区2区3区| 亚洲国产精品99久久久久久久久 | 中文字幕日韩av资源站| 亚洲一区二区av在线| 国产精品一线二线三线精华| 国产高清不卡一区二区| 91麻豆精品国产无毒不卡在线观看 | 国产在线精品一区二区三区不卡| 日韩美女视频一区二区在线观看| 国产精品国模大尺度视频| 日韩成人dvd| 色视频一区二区| 久久亚洲二区三区| 亚洲丝袜制服诱惑| 成人av在线一区二区三区| 欧美成人精品1314www| 亚洲精品成人天堂一二三| 懂色av中文字幕一区二区三区| 欧美日韩一卡二卡三卡| 一区二区三区成人在线视频| 成人妖精视频yjsp地址| 久久老女人爱爱| 久久99九九99精品| 日韩精品一区二区三区在线| 奇米影视一区二区三区小说| 欧美三级一区二区| 依依成人精品视频| 色婷婷亚洲一区二区三区| 亚洲欧洲精品成人久久奇米网| 99久久国产免费看| 亚洲欧洲成人自拍| 91视频在线观看| 亚洲一区二区欧美日韩| 7777精品伊人久久久大香线蕉最新版| 亚洲欧美日韩国产综合| 色吊一区二区三区| 亚洲午夜精品网| 日韩一区二区电影| 99久久久久免费精品国产| 日本一区二区电影| 在线观看免费一区| 亚洲成a人片在线不卡一二三区 | 欧美视频一区二区三区| 亚洲福利视频一区| 精品福利在线导航|