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

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

?? enc_gain.c

?? Linux 影片撥放解碼 Video DVD
?? C
?? 第 1 頁 / 共 2 頁
字號:
   {
      tmp[i+1] = old_ol_lag[i];
   }

   E_GAIN_sort(5, tmp);

   return tmp[3];

}

/*
 * E_GAIN_norm_corr
 *
 * Parameters:
 *    exc            I: excitation buffer
 *    xn             I: target signal
 *    h              I: weighted synthesis filter impulse response (Q15)
 *    t0_min         I: minimum value in the searched range
 *    t0_max         I: maximum value in the searched range
 *    corr_norm      O: normalized correlation (Q15)
 *
 * Function:
 *    Find the normalized correlation between the target vector and the
 *    filtered past excitation (correlation between target and filtered
 *    excitation divided by the square root of energy of filtered excitation)
 *    Size of subframe = L_SUBFR.
 *
 * Returns:
 *    void
 */
static void E_GAIN_norm_corr(Float32 exc[], Float32 xn[], Float32 h[],
                             Word32 t_min, Word32 t_max, Float32 corr_norm[])
{
   Float32 excf[L_SUBFR];  /* filtered past excitation */
   Float32 alp, ps, norm;
   Word32 t, j, k;


   k = - t_min;

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

   E_UTIL_f_convolve(&exc[k], h, excf);

   /* loop for every possible period */

   for (t = t_min; t <= t_max; t++)
   {
      /* Compute correlation between xn[] and excf[] */

      ps = 0.0F;
      alp = 0.01F;

      for (j = 0; j < L_SUBFR; j++)
      {
         ps += xn[j] * excf[j];
         alp += excf[j] * excf[j];
      }

      /* Compute 1/sqrt(energie of excf[]) */

      norm = (Float32)(1.0F / sqrt(alp));

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

      corr_norm[t] = ps * norm;

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

      if (t != t_max)
      {
         k--;

         for (j = L_SUBFR - 1; j > 0; j--)
         {
            excf[j] = excf[j - 1] + exc[k] * h[j];
         }

         excf[0] = exc[k];
      }
   }

   return;
}


/*
 * E_GAIN_norm_corr_interpolate
 *
 * Parameters:
 *    x           I: input vector
 *    frac        I: fraction (-4..+3)
 *
 * Function:
 *    Interpolating the normalized correlation
 *
 * Returns:
 *    interpolated value
 */
static Float32 E_GAIN_norm_corr_interpolate(Float32 *x, Word32 frac)
{
   Float32 s, *x1, *x2;
   const Float32 *c1, *c2;

   if (frac < 0)
   {
      frac += 4;
      x--;
   }

   x1 = &x[0];
   x2 = &x[1];
   c1 = &E_ROM_inter4_1[frac];
   c2 = &E_ROM_inter4_1[4 - frac];

   s = x1[0] * c1[0] + x2[0] * c2[0];
   s += x1[-1] * c1[4] + x2[1] * c2[4];
   s += x1[-2] * c1[8] + x2[2] * c2[8];
   s += x1[-3] * c1[12] + x2[3] * c2[12];

   return s;
}

/*
 * E_GAIN_closed_loop_search
 *
 * Parameters:
 *    exc            I: excitation buffer
 *    xn             I: target signal
 *    h              I: weighted synthesis filter impulse response
 *    t0_min         I: minimum value in the searched range
 *    t0_max         I: maximum value in the searched range
 *    pit_frac       O: chosen fraction
 *    i_subfr        I: flag to first subframe
 *    t0_fr2         I: minimum value for resolution 1/2
 *    t0_fr1         I: minimum value for resolution 1
 *
 * Function:
 *    Find the closed loop pitch period with 1/4 subsample resolution.
 *
 * Returns:
 *    chosen integer pitch lag
 */
Word32 E_GAIN_closed_loop_search(Float32 exc[], Float32 xn[], Float32 h[],
                             Word32 t0_min, Word32 t0_max, Word32 *pit_frac,
                             Word32 i_subfr, Word32 t0_fr2, Word32 t0_fr1)
{
   Float32 corr_v[15 + 2 * L_INTERPOL1 + 1];
   Float32 cor_max, max, temp;
   Float32 *corr;
   Word32 i, fraction, step;
   Word32 t0, t_min, t_max;

   /* Find interval to compute normalized correlation */

   t_min = t0_min - L_INTERPOL1;
   t_max = t0_max + L_INTERPOL1;

   /* allocate memory to normalized correlation vector */
   corr = &corr_v[-t_min];      /* corr[t_min..t_max] */

   /* Compute normalized correlation between target and filtered excitation */
   E_GAIN_norm_corr(exc, xn, h, t_min, t_max, corr);

   /*  find integer pitch */
   max = corr[t0_min];
   t0  = t0_min;

   for(i = t0_min + 1; i <= t0_max; i++)
   {
      if( corr[i] > max)
      {
         max = corr[i];
         t0 = i;
      }
   }

   /* If first subframe and t0 >= t0_fr1, do not search fractionnal pitch */

   if((i_subfr == 0) & (t0 >= t0_fr1))
   {
      *pit_frac = 0;
      return(t0);
   }

   /*
    * Search fractionnal pitch with 1/4 subsample resolution.
    * Test the fractions around t0 and choose the one which maximizes
    * the interpolated normalized correlation.
    */

   step = 1;                /* 1/4 subsample resolution */
   fraction = -3;
   if (((i_subfr == 0) & (t0 >= t0_fr2)) | (t0_fr2 == PIT_MIN))
   {
      step = 2;              /* 1/2 subsample resolution */
      fraction = -2;
   }

   if (t0 == t0_min)
   {
      fraction = 0;
   }

   cor_max = E_GAIN_norm_corr_interpolate(&corr[t0], fraction);

   for (i = (fraction + step); i <= 3; i += step)
   {
      temp = E_GAIN_norm_corr_interpolate(&corr[t0], i);

      if (temp > cor_max)
      {
         cor_max = temp;
         fraction = i;
      }
   }

   /* limit the fraction value in the interval [0,1,2,3] */

   if (fraction < 0)
   {
      fraction += 4;
      t0 -= 1;
   }

   *pit_frac = fraction;

   return (t0);
}


/*
 * E_GAIN_adaptive_codebook_excitation
 *
 * Parameters:
 *    exc          I/O: excitation buffer
 *    T0             I: integer pitch lag
 *    frac           I: fraction of lag
 *    L_subfr        I: subframe size
 *
 * Function:
 *    Compute the result of Word32 term prediction with fractional
 *    interpolation of resolution 1/4.
 *
 * Returns:
 *    interpolated signal (adaptive codebook excitation)
 */
void E_GAIN_adaptive_codebook_excitation(Word16 exc[], Word16 T0, Word32 frac, Word16 L_subfr)
{
   Word32 i, j, k, L_sum;
   Word16 *x;

   x = &exc[-T0];

   frac = -(frac);

   if (frac < 0)
   {
      frac = (frac + UP_SAMP);
      x--;

   }

   x = x - L_INTERPOL2 + 1;

   for (j = 0; j < L_subfr; j++)
   {
      L_sum = 0L;

      for (i = 0, k = ((UP_SAMP - 1) - frac); i < 2 * L_INTERPOL2; i++, k += UP_SAMP)
      {
         L_sum = L_sum + (x[i] * E_ROM_inter4_2[k]);
      }

      L_sum = (L_sum + 0x2000) >> 14;
      exc[j] = E_UTIL_saturate(L_sum);
      x++;
   }

   return;
}

/*
 * E_GAIN_pitch_sharpening
 *
 * Parameters:
 *    x            I/O: impulse response (or algebraic code)
 *    pit_lag        I: pitch lag
 *
 * Function:
 *    Performs Pitch sharpening routine for one subframe.
 *    pitch sharpening factor is 0.85
 *
 * Returns:
 *    void
 */
void E_GAIN_pitch_sharpening(Word16 *x, Word16 pit_lag)
{
   Word32 L_tmp, i;

   for (i = pit_lag; i < L_SUBFR; i++)
   {
      L_tmp = x[i] << 15;
      L_tmp += x[i - pit_lag] * PIT_SHARP;
      x[i] = (Word16)((L_tmp + 0x4000) >> 15);
   }

   return;
}

void E_GAIN_f_pitch_sharpening(Float32 *x, Word32 pit_lag)
{
   Word32 i;

   for (i = pit_lag; i < L_SUBFR; i++)
   {
      x[i] += x[i - pit_lag] * F_PIT_SHARP;
   }

   return;
}

/*
 * E_GAIN_voice_factor
 *
 * Parameters:
 *    exc            I: pitch excitation (Q_exc)
 *    Q_exc          I: exc format
 *    gain_pit       I: gain of pitch (Q14)
 *    code           I: Fixed codebook excitation (Q9)
 *    gain_code      I: gain of code (Q0)
 *
 *
 * Function:
 *    Find the voicing factor (1=voice to -1=unvoiced)
 *    Subframe length is L_SUBFR
 *
 * Returns:
 *    factor (-1=unvoiced to 1=voiced) (Q15)
 */
Word32 E_GAIN_voice_factor(Word16 exc[], Word16 Q_exc, Word16 gain_pit,
                          Word16 code[], Word16 gain_code)
{

   Word32 i, L_tmp, tmp, exp, ener1, exp1, ener2, exp2;

   ener1 = E_UTIL_dot_product12(exc, exc, L_SUBFR, &exp1) >> 16;
   exp1 = exp1 - (Q_exc + Q_exc);
   L_tmp = (gain_pit * gain_pit) << 1;
   exp = E_UTIL_norm_l(L_tmp);
   tmp = (L_tmp << exp) >> 16;
   ener1 = (ener1 * tmp) >> 15;
   exp1 = (exp1 - exp) - 10;        /* 10 -> gain_pit Q14 to Q9 */

   ener2 = E_UTIL_dot_product12(code, code, L_SUBFR, &exp2) >> 16;

   exp = E_UTIL_norm_s(gain_code);
   tmp = gain_code << exp;
   tmp = (tmp * tmp) >> 15;
   ener2 = (ener2 * tmp) >> 15;
   exp2 = exp2 - (exp + exp);

   i = exp1 - exp2;

   if (i >= 0)
   {
      ener1 = ener1 >> 1;
      ener2 = ener2 >> (i + 1);
   }
   else
   {
      i = 1 - i;
      if (i < 32)
      {
         ener1 = ener1 >> i;
      }
      else
      {
         ener1 = 0;
      }
      ener2 = ener2 >> 1;
   }

   tmp = ener1 - ener2;
   ener1 = (ener1 + ener2) + 1;

   tmp = (tmp << 15) / ener1;

   return (tmp);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91高清视频在线| 日韩电影在线观看电影| 亚洲视频一区在线观看| 日韩制服丝袜av| caoporn国产精品| 日韩美女一区二区三区| 亚洲欧美日韩国产另类专区| 精品一区二区av| 欧美三级中文字| 亚洲欧美欧美一区二区三区| 国产一区在线视频| 91精品国产91久久久久久最新毛片| 国产精品视频一区二区三区不卡| 久久精品二区亚洲w码| 欧美系列一区二区| 亚洲日本在线天堂| 从欧美一区二区三区| 精品久久人人做人人爰| 人禽交欧美网站| 欧美性猛交一区二区三区精品| 中文文精品字幕一区二区| 热久久免费视频| 91精品免费观看| 日韩电影在线一区二区| 欧美伦理影视网| 亚洲电影第三页| 欧美午夜精品电影| 亚洲一区二区不卡免费| 91在线高清观看| 国产精品美女一区二区在线观看| 久久综合久久99| 欧美日韩色一区| 欧美一a一片一级一片| 欧美在线影院一区二区| 成av人片一区二区| 国产高清成人在线| 国产一区999| 日本午夜精品一区二区三区电影| 亚洲va欧美va人人爽午夜| 中文字幕av免费专区久久| 中文字幕在线不卡国产视频| 91浏览器在线视频| 欧美日韩久久久久久| 丝袜美腿亚洲综合| 91精品国产综合久久久久久漫画 | 欧美剧在线免费观看网站 | 日韩高清国产一区在线| 337p亚洲精品色噜噜| 久久综合综合久久综合| 精品电影一区二区| 国产91富婆露脸刺激对白| 一区二区中文视频| 欧美撒尿777hd撒尿| 麻豆国产一区二区| 久久日韩粉嫩一区二区三区| jlzzjlzz亚洲女人18| 亚洲精品成人a在线观看| 欧美日韩中文字幕一区| 精品在线免费视频| 亚洲欧洲精品天堂一级| 欧美日韩免费不卡视频一区二区三区| 日韩国产精品久久| 国产日韩一级二级三级| 在线精品观看国产| 久久99久久99| 中文字幕一区二区三区不卡| 欧美在线观看一区二区| 精品系列免费在线观看| 亚洲欧美电影一区二区| 日韩午夜在线影院| 99久久伊人精品| 六月丁香婷婷色狠狠久久| 国产欧美精品在线观看| 欧美日韩和欧美的一区二区| 国产jizzjizz一区二区| 日韩中文字幕麻豆| 亚洲欧洲日韩一区二区三区| 7878成人国产在线观看| 成人午夜av在线| 一区二区三区在线观看网站| 午夜精品视频一区| 精品免费99久久| 久久成人免费网| 欧美二区在线观看| 亚洲成a天堂v人片| 色婷婷一区二区| 一区二区三区欧美亚洲| 99久久久久久99| 国产精品久久久久毛片软件| 不卡一区二区三区四区| 亚洲影院久久精品| 激情伊人五月天久久综合| 91麻豆精品国产综合久久久久久| 福利电影一区二区| 韩国中文字幕2020精品| 亚洲超丰满肉感bbw| 亚洲天堂网中文字| 欧美激情一区二区三区全黄| 日韩精品乱码免费| 精品久久久久久最新网址| 国产精品99久久久久久有的能看| 国产精品区一区二区三区| 国产成人综合视频| 国产精品日产欧美久久久久| av亚洲精华国产精华精华 | 久久久噜噜噜久噜久久综合| 久久精品99久久久| 国产色一区二区| 色综合久久99| 美女尤物国产一区| 玉米视频成人免费看| 日韩一区二区三区在线| 国产福利91精品一区| 国产精品一区专区| 亚洲第一狼人社区| 国产精品―色哟哟| 亚洲人成网站影音先锋播放| aaa欧美日韩| 久久久www成人免费无遮挡大片| 国产一区激情在线| 亚洲精选视频免费看| 一区二区三区资源| 国产乱码一区二区三区| 精品日韩99亚洲| fc2成人免费人成在线观看播放| 久久精品72免费观看| 久久99久久精品| 国产精品一级片| 99综合电影在线视频| 99久久99久久综合| 精品久久免费看| 欧美激情一区二区三区在线| 欧美国产精品久久| 亚洲天堂a在线| 一区二区三区.www| 日韩av不卡一区二区| 精品在线观看视频| 99久久精品免费看国产免费软件| 色妞www精品视频| 欧美日韩午夜精品| 久久先锋影音av| 亚洲女与黑人做爰| 美洲天堂一区二卡三卡四卡视频| 国产又黄又大久久| 91免费在线看| 91精品久久久久久久91蜜桃 | 欧美亚洲国产怡红院影院| 51精品秘密在线观看| 久久蜜臀精品av| 亚洲免费在线观看| 久久爱www久久做| 91在线观看地址| 日韩午夜av电影| 自拍偷拍国产亚洲| 免费成人在线观看视频| 91一区二区在线观看| 欧美一区二区福利视频| 中文字幕一区二区三区在线播放| 午夜亚洲国产au精品一区二区| 久久精品国产一区二区三| 99热国产精品| 精品对白一区国产伦| 夜夜嗨av一区二区三区| 国产激情视频一区二区在线观看| 在线一区二区视频| 国产日韩欧美高清| 秋霞影院一区二区| 91亚洲国产成人精品一区二区三| 日韩午夜激情视频| 亚洲精品日日夜夜| 丁香桃色午夜亚洲一区二区三区| 欧美性大战久久久久久久蜜臀| 国产亚洲欧美日韩日本| 日韩中文字幕91| 色国产综合视频| 中文一区二区完整视频在线观看| 秋霞午夜av一区二区三区| 91久久久免费一区二区| 国产午夜久久久久| 麻豆91精品视频| 欧美男同性恋视频网站| 亚洲制服欧美中文字幕中文字幕| 国产99久久久国产精品| 2023国产精品视频| 青草国产精品久久久久久| 欧美日韩一区二区在线观看视频 | 五月激情综合色| 欧洲视频一区二区| 亚洲美女免费在线| 99久久精品情趣| 亚洲欧美影音先锋| 成人一区二区三区| 亚洲国产精品ⅴa在线观看| 狠狠久久亚洲欧美| 日韩免费观看高清完整版| 日韩和欧美一区二区三区| 6080国产精品一区二区| 亚洲成av人片在线观看无码| 国产精品麻豆欧美日韩ww| 粉嫩嫩av羞羞动漫久久久|