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

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

?? cod_ld8k.c

?? G.729 coder and decoder, ANSI C, for windows, unix, DSP, etc.
?? 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一区二区三区免费野_久草精品视频
国产一区二区三区| 在线视频欧美精品| 亚洲欧洲日产国码二区| 99riav一区二区三区| 依依成人精品视频| 欧美色欧美亚洲另类二区| 日韩高清不卡一区二区三区| 欧美一级国产精品| 国产精品白丝av| 亚洲欧洲综合另类| 8v天堂国产在线一区二区| 国产在线一区二区综合免费视频| 中文av一区二区| 在线观看日韩国产| 免费久久精品视频| 欧美国产成人精品| 欧美性极品少妇| 激情丁香综合五月| 综合久久综合久久| 午夜电影一区二区| 日韩精品综合一本久道在线视频| 国产成人免费av在线| 亚洲男人的天堂av| 欧美videossexotv100| www.综合网.com| 五月天中文字幕一区二区| 欧美变态tickle挠乳网站| 99久久精品国产麻豆演员表| 午夜视频在线观看一区二区 | 欧美亚洲禁片免费| 久久精品久久99精品久久| 国产精品私人自拍| 欧美另类高清zo欧美| 国产成人夜色高潮福利影视| 亚洲激情中文1区| 欧美mv日韩mv国产网站app| 99久久99久久精品免费观看 | 色天天综合色天天久久| 麻豆久久久久久久| 亚洲天堂免费在线观看视频| 欧美一区二区三区在线| 97se狠狠狠综合亚洲狠狠| 日本三级亚洲精品| 亚洲人xxxx| 久久新电视剧免费观看| 在线一区二区三区做爰视频网站| 国产在线精品不卡| 亚洲高清视频的网址| 国产精品美女视频| 欧美一区二区免费观在线| 99视频一区二区| 国产在线国偷精品免费看| 亚洲一区视频在线| 国产精品欧美综合在线| 日韩一区二区精品| 在线观看日韩精品| 成人ar影院免费观看视频| 美女视频黄免费的久久 | 成人激情图片网| 久久99精品久久只有精品| 亚洲国产日韩a在线播放性色| 欧美激情一区二区三区不卡| 91精品国产丝袜白色高跟鞋| 91啪在线观看| 国产精品一区二区黑丝| 人人精品人人爱| 一个色妞综合视频在线观看| 中文字幕欧美区| 精品日韩在线一区| 欧美久久久久久久久久| 99久久777色| 国产91丝袜在线观看| 精品综合免费视频观看| 午夜电影一区二区| 欧美日韩精品欧美日韩精品| av中文字幕在线不卡| 国产经典欧美精品| 韩国午夜理伦三级不卡影院| 视频一区免费在线观看| 亚洲国产精品一区二区久久| 中文字幕一区二区三区四区| 国产三级一区二区| 久久综合av免费| 日韩欧美高清在线| 日韩一区二区中文字幕| 欧美电影影音先锋| 欧美系列日韩一区| 欧美午夜影院一区| 在线观看区一区二| 一本一道久久a久久精品综合蜜臀| 成人教育av在线| 成人免费毛片片v| 国产成人在线观看免费网站| 国产一区二区三区久久悠悠色av| 久久精品国产精品亚洲精品 | 国产一二精品视频| 国产在线不卡一卡二卡三卡四卡| 免费高清在线视频一区·| 奇米影视一区二区三区小说| 日韩一区精品字幕| 天天操天天干天天综合网| 亚洲成a人片在线观看中文| 亚洲sss视频在线视频| 亚洲成人激情综合网| 舔着乳尖日韩一区| 日本在线不卡一区| 日本欧美在线看| 久久精品免费看| 美女视频黄a大片欧美| 麻豆成人av在线| 九九精品一区二区| 精品一区二区三区蜜桃| 国产一区二区三区| 国产成都精品91一区二区三| 岛国精品在线播放| 波多野洁衣一区| 一道本成人在线| 欧美日韩一级二级| 91麻豆精品国产91久久久使用方法| 91精品国产综合久久精品麻豆| 欧美一区二区三区影视| 精品日韩一区二区三区免费视频| 久久这里只有精品首页| 国产情人综合久久777777| 欧美激情在线观看视频免费| 成人欧美一区二区三区| 一区av在线播放| 日本网站在线观看一区二区三区| 青娱乐精品在线视频| 国产在线一区观看| 99久久伊人久久99| 91视频国产资源| 欧美日韩一级片网站| 日韩欧美色电影| 国产亚洲精品bt天堂精选| 一本久道久久综合中文字幕| 在线日韩国产精品| 91麻豆精品91久久久久久清纯 | 日韩三级在线免费观看| 久久只精品国产| 中文字幕欧美一区| 亚洲第一主播视频| 激情图片小说一区| 99国产精品国产精品久久| 欧美日韩国产精品成人| 欧美va天堂va视频va在线| 日本一区二区三区免费乱视频| 亚洲精品国产精华液| 蜜臀av一区二区| 99精品欧美一区二区三区小说 | 国产视频一区二区在线| 玉足女爽爽91| 国内成人精品2018免费看| 成人av第一页| 91精品国产综合久久久久久久久久 | 久久精品夜色噜噜亚洲a∨| 中文字幕色av一区二区三区| 亚洲18色成人| 福利一区二区在线| 欧美美女视频在线观看| 久久久久久久久久久久久夜| 亚洲激情五月婷婷| 狠狠色狠狠色合久久伊人| 91免费观看国产| 欧美不卡一区二区三区四区| 国产精品久久久久久久裸模| 图片区日韩欧美亚洲| 成人中文字幕在线| 欧美日韩电影在线播放| 中文字幕久久午夜不卡| 天堂成人国产精品一区| 成人福利视频在线看| 欧美精品精品一区| 中文字幕一区免费在线观看| 青青草国产精品97视觉盛宴| av中文字幕不卡| 精品少妇一区二区三区在线视频| 一区二区在线免费观看| 国产九色精品成人porny| 欧美三级韩国三级日本三斤| 国产欧美一区视频| 日韩av中文字幕一区二区三区| 99精品桃花视频在线观看| 欧美一级片在线看| 亚洲精品久久久久久国产精华液| 国产最新精品免费| 欧美日韩精品久久久| 中文字幕一区三区| 国产在线精品一区在线观看麻豆| 欧美视频精品在线观看| 国产精品视频看| 激情欧美日韩一区二区| 欧美另类久久久品| 亚洲精品高清视频在线观看| 国产精品一区三区| 日韩一区二区电影在线| 亚洲一区二区三区中文字幕| 成年人国产精品| 久久久久久亚洲综合| 奇米精品一区二区三区在线观看|