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

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

?? cod_ld8k.c

?? g.729協議源代碼,c語言,直接可以應用(dsp定點化)
?? C
?? 第 1 頁 / 共 2 頁
字號:
  
  /* Case of active frame */
  *ana++ = 1;
  seed = INIT_SEED;
  ppastVad = pastVad;
  pastVad = Vad;
  
  /* LSP quantization */

  Qua_lsp(lsp_new, lsp_new_q, ana);
  ana += 2;                         /* Advance analysis parameters pointer */

  /*--------------------------------------------------------------------*
   * Find interpolated LPC parameters in all subframes (quantized)      *
   * The interpolated parameters are in array Aq_t[] of size (M+1)*4    *
   *--------------------------------------------------------------------*/
  Int_qlpc(lsp_old_q, lsp_new_q, Aq_t);
  for(i=0; i<M; i++) lsp_old_q[i] = lsp_new_q[i];

 /*----------------------------------------------------------------------*
  * - Find the open-loop pitch delay                                     *
  *----------------------------------------------------------------------*/
  /*開環基音分析*/
  T_op = Pitch_ol(wsp, PIT_MIN, PIT_MAX, L_FRAME);

  /* Range for closed loop pitch search in 1st subframe */

  T0_min = sub(T_op, 3);
  if (sub(T0_min,PIT_MIN)<0) {
    T0_min = PIT_MIN;
  }

  T0_max = add(T0_min, 6);
  if (sub(T0_max ,PIT_MAX)>0)
  {
     T0_max = PIT_MAX;
     T0_min = sub(T0_max, 6);
  }

 /*------------------------------------------------------------------------*
  *          Loop for every subframe in the analysis frame                 *
  *------------------------------------------------------------------------*
  *  To find the pitch and innovation parameters. The subframe size is     *
  *  L_SUBFR and the loop is repeated 2 times.                             *
  *     - find the weighted LPC coefficients                               *
  *     - find the LPC residual signal res[]                               *
  *     - compute the target signal for pitch search                       *
  *     - compute impulse response of weighted synthesis filter (h1[])     *
  *     - find the closed-loop pitch parameters                            *
  *     - encode the pitch delay                                           *
  *     - update the impulse response h1[] by including fixed-gain pitch   *
  *     - find target vector for codebook search                           *
  *     - codebook search                                                  *
  *     - encode codebook address                                          *
  *     - VQ of pitch and codebook gains                                   *
  *     - find synthesis speech                                            *
  *     - update states of weighting filter                                *
  *------------------------------------------------------------------------*/

  A  = A_t;     /* pointer to interpolated LPC parameters           */
  Aq = Aq_t;    /* pointer to interpolated quantized LPC parameters */

  i_gamma = 0;
  for (i_subfr = 0;  i_subfr < L_FRAME; i_subfr += L_SUBFR)
  {

    /*---------------------------------------------------------------*
     * Find the weighted LPC coefficients for the weighting filter.  *
     *---------------------------------------------------------------*/

    Weight_Az(A, gamma1[i_gamma], M, Ap1);
    Weight_Az(A, gamma2[i_gamma], M, Ap2);
    i_gamma = add(i_gamma,1);

    /*---------------------------------------------------------------*
     * Compute impulse response, h1[], of weighted synthesis filter  *
     *---------------------------------------------------------------*/

    for (i = 0; i <= M; i++) {
        ai_zero[i] = Ap1[i];
    }

    Syn_filt(Aq, ai_zero, h1, L_SUBFR, zero, 0);
    Syn_filt(Ap2, h1, h1, L_SUBFR, zero, 0);

   /*------------------------------------------------------------------------*
    *                                                                        *
    *          Find the target vector for pitch search:                      *
    *          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                       *
    *                                                                        *
    *              |------|  res[n]                                          *
    *  speech[n]---| A(z) |--------                                          *
    *              |------|       |   |--------| error[n]  |------|          *
    *                    zero -- (-)--| 1/A(z) |-----------| W(z) |-- target *
    *                    exc          |--------|           |------|          *
    *                                                                        *
    * Instead of subtracting the zero-input response of filters from         *
    * the weighted input speech, the above configuration is used to          *
    * compute the target vector. This configuration gives better performance *
    * with fixed-point implementation. The memory of 1/A(z) is updated by    *
    * filtering (res[n]-exc[n]) through 1/A(z), or simply by subtracting     *
    * the synthesis speech from the input speech:                            *
    *    error[n] = speech[n] - syn[n].                                      *
    * The memory of W(z) is updated by filtering error[n] through W(z),      *
    * or more simply by subtracting the filtered adaptive and fixed          *
    * codebook excitations from the target:                                  *
    *     target[n] - gain_pit*y1[n] - gain_code*y2[n]                       *
    * as these signals are already available.                                *
    *                                                                        *
    *------------------------------------------------------------------------*/


    Residu(Aq, &speech[i_subfr], &exc[i_subfr], L_SUBFR);   /* LPC residual */

    Syn_filt(Aq, &exc[i_subfr], error, L_SUBFR, mem_err, 0);

    Residu(Ap1, error, xn, L_SUBFR);

    Syn_filt(Ap2, xn, xn, L_SUBFR, mem_w0, 0);    /* target signal xn[]*/

    /*----------------------------------------------------------------------*
     *                 Closed-loop fractional pitch search                  *
     *----------------------------------------------------------------------*/

    T0 = Pitch_fr3(&exc[i_subfr], xn, h1, L_SUBFR, T0_min, T0_max,
                               i_subfr, &T0_frac);

    index = Enc_lag3(T0, T0_frac, &T0_min, &T0_max,PIT_MIN,PIT_MAX,i_subfr);

    *ana++ = index;
    if (i_subfr == 0) {
      *ana++ = Parity_Pitch(index);
    }

   /*-----------------------------------------------------------------*
    *   - find unity gain pitch excitation (adaptive codebook entry)  *
    *     with fractional interpolation.                              *
    *   - find filtered pitch exc. y1[]=exc[] convolve with h1[])     *
    *   - compute pitch gain and limit between 0 and 1.2              *
    *   - update target vector for codebook search                    *
    *   - find LTP residual.                                          *
    *-----------------------------------------------------------------*/

    Pred_lt_3(&exc[i_subfr], T0, T0_frac, L_SUBFR);

    Convolve(&exc[i_subfr], h1, y1, L_SUBFR);

    gain_pit = G_pitch(xn, y1, g_coeff, L_SUBFR);

    /* clip pitch gain if taming is necessary */
    temp = test_err(T0, T0_frac);

    if( temp == 1){
      if (sub(gain_pit, GPCLIP) > 0) {
        gain_pit = GPCLIP;
      }
    }

    /* xn2[i]   = xn[i] - y1[i] * gain_pit  */

    for (i = 0; i < L_SUBFR; i++)
    {
      L_temp = L_mult(y1[i], gain_pit);
      L_temp = L_shl(L_temp, 1);               /* gain_pit in Q14 */
      xn2[i] = sub(xn[i], extract_h(L_temp));
    }


   /*-----------------------------------------------------*
    * - Innovative codebook search.                       *
    *-----------------------------------------------------*/

    index = ACELP_Codebook(xn2, h1, T0, sharp, i_subfr, code, y2, &i);
    *ana++ = index;        /* Positions index */
    *ana++ = i;            /* Signs index     */


   /*-----------------------------------------------------*
    * - Quantization of gains.                            *
    *-----------------------------------------------------*/

    g_coeff_cs[0]     = g_coeff[0];                   /* <y1,y1> */
    exp_g_coeff_cs[0] = negate(g_coeff[1]);           /* Q-Format:XXX -> JPN  */
    g_coeff_cs[1]     = negate(g_coeff[2]);           /* (xn,y1) -> -2<xn,y1> */
    exp_g_coeff_cs[1] = negate(add(g_coeff[3], 1));   /* Q-Format:XXX -> JPN  */

    Corr_xy2( xn, y1, y2, g_coeff_cs, exp_g_coeff_cs );  /* Q0 Q0 Q12 ^Qx ^Q0 */
                         /* g_coeff_cs[3]:exp_g_coeff_cs[3] = <y2,y2>   */
                         /* g_coeff_cs[4]:exp_g_coeff_cs[4] = -2<xn,y2> */
                         /* g_coeff_cs[5]:exp_g_coeff_cs[5] = 2<y1,y2>  */

    *ana++ = Qua_gain(code, g_coeff_cs, exp_g_coeff_cs,
                      L_SUBFR, &gain_pit, &gain_code, temp);

   /*------------------------------------------------------------*
    * - Update pitch sharpening "sharp" with quantized gain_pit  *
    *------------------------------------------------------------*/

    sharp = gain_pit;
    if (sub(sharp, SHARPMAX) > 0) { sharp = SHARPMAX;         }
    if (sub(sharp, SHARPMIN) < 0) { sharp = SHARPMIN;         }

   /*------------------------------------------------------*
    * - Find the total excitation                          *
    * - find synthesis speech corresponding to exc[]       *
    * - update filters memories for finding the target     *
    *   vector in the next subframe                        *
    *   (update error[-m..-1] and mem_w_err[])             *
    *   update error function for taming process           *
    *------------------------------------------------------*/

    for (i = 0; i < L_SUBFR;  i++)
    {
      /* exc[i] = gain_pit*exc[i] + gain_code*code[i]; */
      /* exc[i]  in Q0   gain_pit in Q14               */
      /* code[i] in Q13  gain_cod in Q1                */

      L_temp = L_mult(exc[i+i_subfr], gain_pit);
      L_temp = L_mac(L_temp, code[i], gain_code);
      L_temp = L_shl(L_temp, 1);
      exc[i+i_subfr] = round(L_temp);
    }

    update_exc_err(gain_pit, T0);

    Syn_filt(Aq, &exc[i_subfr], &synth[i_subfr], L_SUBFR, mem_syn, 1);

    for (i = L_SUBFR-M, j = 0; i < L_SUBFR; i++, j++)
    {
      mem_err[j] = sub(speech[i_subfr+i], synth[i_subfr+i]);
      temp       = extract_h(L_shl( L_mult(y1[i], gain_pit),  1) );
      k          = extract_h(L_shl( L_mult(y2[i], gain_code), 2) );
      mem_w0[j]  = sub(xn[i], add(temp, k));
    }

    A  += MP1;           /* interpolated LPC parameters for next subframe */
    Aq += MP1;

  }

 /*--------------------------------------------------*
  * Update signal for next frame.                    *
  * -> shift to the left by L_FRAME:                 *
  *     speech[], wsp[] and  exc[]                   *
  *--------------------------------------------------*/

  Copy(&old_speech[L_FRAME], &old_speech[0], L_TOTAL-L_FRAME);
  Copy(&old_wsp[L_FRAME], &old_wsp[0], PIT_MAX);
  Copy(&old_exc[L_FRAME], &old_exc[0], PIT_MAX+L_INTERPOL);

  return;
}

/*---------------------------------------------------------------------------*
 * routine  corr_xy2()                                                       *
 * ~~~~~~~~~~~~~~~~~~~~                                                      *
 * Find the correlations between the target xn[], the filtered adaptive      *
 * codebook excitation y1[], and the filtered 1st codebook innovation y2[].  *
 *   g_coeff[2]:exp_g_coeff[2] = <y2,y2>                                     *
 *   g_coeff[3]:exp_g_coeff[3] = -2<xn,y2>                                   *
 *   g_coeff[4]:exp_g_coeff[4] = 2<y1,y2>                                    *
 *---------------------------------------------------------------------------*/
void Corr_xy2(
      Word16 xn[],           /* (i) Q0  :Target vector.                  */
      Word16 y1[],           /* (i) Q0  :Adaptive codebook.              */
      Word16 y2[],           /* (i) Q12 :Filtered innovative vector.     */
      Word16 g_coeff[],      /* (o) Q[exp]:Correlations between xn,y1,y2 */
      Word16 exp_g_coeff[]   /* (o)       :Q-format of g_coeff[]         */
)
{
      Word16   i,exp;
      Word16   exp_y2y2,exp_xny2,exp_y1y2;
      Word16   y2y2,    xny2,    y1y2;
      Word32   L_acc;
      Word16   scaled_y2[L_SUBFR];       /* Q9 */

      /*------------------------------------------------------------------*
       * Scale down y2[] from Q12 to Q9 to avoid overflow                 *
       *------------------------------------------------------------------*/

      for(i=0; i<L_SUBFR; i++)
         scaled_y2[i] = shr(y2[i], 3);

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

      L_acc = 1;                       /* Avoid case of all zeros */
      for(i=0; i<L_SUBFR; i++)
         L_acc = L_mac(L_acc, scaled_y2[i], scaled_y2[i]);    /* L_acc:Q19 */

      exp      = norm_l(L_acc);
      y2y2     = round( L_shl(L_acc, exp) );
      exp_y2y2 = add(exp, 19-16);                          /* Q[19+exp-16] */

      g_coeff[2]     = y2y2;
      exp_g_coeff[2] = exp_y2y2;

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

      L_acc = 1;                       /* Avoid case of all zeros */
      for(i=0; i<L_SUBFR; i++)
         L_acc = L_mac(L_acc, xn[i], scaled_y2[i]);           /* L_acc:Q10 */

      exp      = norm_l(L_acc);
      xny2     = round( L_shl(L_acc, exp) );
      exp_xny2 = add(exp, 10-16);                          /* Q[10+exp-16] */

      g_coeff[3]     = negate(xny2);
      exp_g_coeff[3] = sub(exp_xny2,1);                   /* -2<xn,y2> */

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

      L_acc = 1;                       /* Avoid case of all zeros */
      for(i=0; i<L_SUBFR; i++)
         L_acc = L_mac(L_acc, y1[i], scaled_y2[i]);           /* L_acc:Q10 */

      exp      = norm_l(L_acc);
      y1y2     = round( L_shl(L_acc, exp) );
      exp_y1y2 = add(exp, 10-16);                          /* Q[10+exp-16] */

      g_coeff[4]     = y1y2;
      exp_g_coeff[4] = sub(exp_y1y2,1);    ;                /* 2<y1,y2> */

      return;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图20p| 国产欧美一区二区三区在线看蜜臀 | 午夜精品久久久久久久久久| 日本sm残虐另类| 972aa.com艺术欧美| 久久久久久综合| 琪琪久久久久日韩精品| 91视频在线观看| 国产精品系列在线| 国产在线一区观看| 日韩精品一区二区三区在线观看| 亚洲欧美激情小说另类| 成人av网站在线观看免费| 欧美大片拔萝卜| 日韩福利电影在线观看| 91久久国产综合久久| 国产精品久久久久影院老司| 国产在线精品国自产拍免费| 日韩视频免费直播| 天涯成人国产亚洲精品一区av| 99vv1com这只有精品| 国产精品色呦呦| 成人h动漫精品一区二| 欧美极品美女视频| 高潮精品一区videoshd| 久久久国产午夜精品| 国产中文一区二区三区| 精品国精品国产尤物美女| 日韩精品免费专区| 欧美精品v日韩精品v韩国精品v| 亚洲黄色录像片| 欧美在线你懂得| 亚洲成av人片在线观看无码| 欧美日韩另类一区| 亚洲成a天堂v人片| 91精品国产高清一区二区三区| 婷婷久久综合九色综合绿巨人| 欧美日韩国产片| 青青草97国产精品免费观看无弹窗版| 欧美精品xxxxbbbb| 久久国产精品区| 精品国产乱码久久久久久蜜臀| 国模大尺度一区二区三区| 久久久久久免费网| 不卡的av在线| 亚洲高清免费视频| 欧美一级爆毛片| 国产精品综合视频| 亚洲人成网站精品片在线观看| 91久久精品一区二区| 日韩影院精彩在线| 久久综合五月天婷婷伊人| 粉嫩欧美一区二区三区高清影视| 最新国产精品久久精品| 欧美婷婷六月丁香综合色| 日本在线观看不卡视频| 国产丝袜美腿一区二区三区| 91在线观看下载| 五月天网站亚洲| 久久久欧美精品sm网站| 91麻豆国产精品久久| 日韩精品亚洲专区| 国产精品久久久久久亚洲毛片| 欧洲一区二区av| 国产一区二区三区日韩| 亚洲最新视频在线观看| 精品国产99国产精品| 91丨porny丨蝌蚪视频| 日韩vs国产vs欧美| 日本一区二区电影| 欧美一区二区三区不卡| 91麻豆免费看| 国产精品18久久久久久久久| 亚洲一区二区影院| 国产网红主播福利一区二区| 欧美伦理影视网| 成人高清免费观看| 久久黄色级2电影| 亚洲一级二级在线| 亚洲国产精品国自产拍av| 欧美一区二区免费观在线| 97久久久精品综合88久久| 麻豆国产91在线播放| 一区二区三区四区视频精品免费 | 久久精品国产澳门| 亚洲在线观看免费视频| 国产午夜精品在线观看| 欧美电影免费观看高清完整版 | 国产欧美精品国产国产专区 | 久久电影网站中文字幕| 一区二区三区四区不卡在线| 久久精品视频免费| 日韩欧美一级二级三级| 欧美日韩综合一区| 色综合久久综合中文综合网| 国产精品中文字幕日韩精品| 免费成人在线网站| 亚洲国产精品一区二区久久| 国产精品久久久久久福利一牛影视| 日韩欧美成人午夜| 91麻豆精品国产91久久久使用方法| 91女厕偷拍女厕偷拍高清| 粉嫩一区二区三区在线看| 韩国一区二区在线观看| 免费在线观看日韩欧美| 天堂精品中文字幕在线| 亚洲一区二区三区视频在线播放| 亚洲色图视频免费播放| 国产精品不卡在线| 国产精品伦理一区二区| 国产亚洲精品7777| 国产丝袜欧美中文另类| 亚洲国产成人自拍| 国产女人水真多18毛片18精品视频| 欧美精品一区二区三区蜜桃视频| 日韩一区二区三区在线视频| 日韩精品专区在线影院重磅| 日韩欧美国产一区二区在线播放| 91精品国产高清一区二区三区| 日韩网站在线看片你懂的| 日韩欧美国产不卡| 精品伦理精品一区| 中文字幕免费不卡| 亚洲人成在线观看一区二区| 亚洲宅男天堂在线观看无病毒| 午夜精品久久久久久久久| 日韩vs国产vs欧美| 国产精品亚洲午夜一区二区三区| 成人福利视频在线| 欧美最猛性xxxxx直播| 制服丝袜在线91| 久久中文字幕电影| 国产精品成人免费在线| 香蕉影视欧美成人| 国产综合色精品一区二区三区| 粉嫩欧美一区二区三区高清影视 | 亚洲一区二区三区三| 日韩影院在线观看| 国产高清久久久| 色婷婷一区二区三区四区| 欧美视频一区在线观看| 精品国一区二区三区| 国产精品美女久久久久av爽李琼 | 正在播放一区二区| 国产午夜精品一区二区 | 欧美体内she精视频| 日韩一卡二卡三卡| 国产精品视频一区二区三区不卡| 亚洲国产成人va在线观看天堂| 久久精品噜噜噜成人av农村| 暴力调教一区二区三区| 欧美一区二区免费观在线| 国产精品美女久久久久久| 男男gaygay亚洲| 色综合av在线| 久久免费的精品国产v∧| 亚洲久本草在线中文字幕| 国内成人免费视频| 精品视频色一区| 中文字幕中文乱码欧美一区二区| 午夜久久电影网| 99热国产精品| 国产亚洲人成网站| 婷婷中文字幕综合| 一本到三区不卡视频| 久久影音资源网| 天堂成人国产精品一区| 91丨porny丨中文| 久久久影视传媒| 日韩电影在线观看一区| 色综合久久六月婷婷中文字幕| 欧美精品一区二区三| 日产国产高清一区二区三区 | 成人免费三级在线| 欧美一区二区在线视频| 亚洲精品乱码久久久久久久久| 国产一区二区三区久久悠悠色av| 欧美日韩卡一卡二| 亚洲老妇xxxxxx| 99re这里只有精品首页| 国产欧美一区二区精品忘忧草| 精品系列免费在线观看| 7777精品伊人久久久大香线蕉完整版 | 一本色道**综合亚洲精品蜜桃冫| 久久综合狠狠综合久久综合88| 日韩精品免费专区| 这里是久久伊人| 日日摸夜夜添夜夜添精品视频 | 国产日韩欧美一区二区三区综合| 日韩成人精品在线观看| 51精品国自产在线| 视频一区欧美日韩| 欧美一区二区三区不卡| 日韩经典中文字幕一区| 91精品在线观看入口| 婷婷综合久久一区二区三区| 欧美日韩国产另类一区| 男男视频亚洲欧美| 日韩欧美成人一区| 国产一区二区三区久久久|