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

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

?? cod_ld8k.c

?? 本源代碼包含了各種聲音
?? C
?? 第 1 頁 / 共 2 頁
字號:
    * 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;
}

/**************************************************************************
 * routine test_err - computes the accumulated potential error in the     *
 * adaptive codebook contribution                                         *
 **************************************************************************/

static Word16 test_err(  /* (o) flag set to 1 if taming is necessary  */
 Word16 T0,       /* (i) integer part of pitch delay           */
 Word16 T0_frac   /* (i) fractional part of pitch delay        */
)
 {
    Word16 i, t1, zone1, zone2, flag;
    Word32 L_maxloc, L_acc;

    if(T0_frac > 0) {
        t1 = add(T0, 1);
    }
    else {
        t1 = T0;
    }

    i = sub(t1, (L_SUBFR+L_INTER10));
    if(i < 0) {
        i = 0;
    }
    zone1 = tab_zone[i];

    i = add(t1, (L_INTER10 - 2));
    zone2 = tab_zone[i];

    L_maxloc = -1L;
    flag = 0 ;
    for(i=zone2; i>=zone1; i--) {
        L_acc = L_sub(L_exc_err[i], L_maxloc);
        if(L_acc > 0L) {
                L_maxloc = L_exc_err[i];
        }
    }
    L_acc = L_sub(L_maxloc, L_THRESH_ERR);
    if(L_acc > 0L) {
        flag = 1;
    }

    return(flag);
}

/**************************************************************************
 *routine update_exc_err - maintains the memory used to compute the error *
 * function due to an adaptive codebook mismatch between encoder and      *
 * decoder                                                                *
 **************************************************************************/

static void update_exc_err(
 Word16 gain_pit,      /* (i) pitch gain */
 Word16 T0             /* (i) integer part of pitch delay */
)
 {

    Word16 i, zone1, zone2, n;
    Word32 L_worst, L_temp, L_acc;
    Word16 hi, lo;

    L_worst = -1L;
    n = sub(T0, L_SUBFR);

    if(n < 0) {
        L_Extract(L_exc_err[0], &hi, &lo);
        L_temp = Mpy_32_16(hi, lo, gain_pit);
        L_temp = L_shl(L_temp, 1);
        L_temp = L_add(0x00004000L, L_temp);
        L_acc = L_sub(L_temp, L_worst);
        if(L_acc > 0L) {
                L_worst = L_temp;
        }
        L_Extract(L_temp, &hi, &lo);
        L_temp = Mpy_32_16(hi, lo, gain_pit);
        L_temp = L_shl(L_temp, 1);
        L_temp = L_add(0x00004000L, L_temp);
        L_acc = L_sub(L_temp, L_worst);
        if(L_acc > 0L) {
                L_worst = L_temp;
        }
    }

    else {

        zone1 = tab_zone[n];

        i = sub(T0, 1);
        zone2 = tab_zone[i];

        for(i = zone1; i <= zone2; i++) {
                L_Extract(L_exc_err[i], &hi, &lo);
                L_temp = Mpy_32_16(hi, lo, gain_pit);
                L_temp = L_shl(L_temp, 1);
                L_temp = L_add(0x00004000L, L_temp);
                L_acc = L_sub(L_temp, L_worst);
                if(L_acc > 0L) L_worst = L_temp;
        }
    }

    for(i=3; i>=1; i--) {
        L_exc_err[i] = L_exc_err[i-1];
    }
    L_exc_err[0] = L_worst;

    return;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞成人午夜伦在线观看| eeuss鲁片一区二区三区在线观看| 久久se精品一区精品二区| 99久久精品情趣| 日韩丝袜情趣美女图片| 亚洲精品v日韩精品| 国产成人亚洲综合a∨猫咪| 欧美日韩国产首页在线观看| 亚洲一区在线观看视频| 色先锋久久av资源部| 日韩视频免费观看高清完整版在线观看 | 国产不卡在线一区| 欧美日本一区二区| 亚洲女人的天堂| 不卡欧美aaaaa| 久久午夜老司机| 国产高清亚洲一区| 欧美一区二区三区啪啪| 三级在线观看一区二区| 欧美日韩国产高清一区| 亚洲综合区在线| 色哟哟在线观看一区二区三区| 国产精品毛片久久久久久| 国产不卡视频一区二区三区| 久久久久久久久久久久久久久99| 青青草国产成人av片免费| 欧美日韩免费观看一区三区| 亚洲电影一区二区| 欧美熟乱第一页| 亚洲午夜久久久久久久久电影网| 一本一道波多野结衣一区二区| 亚洲欧美日韩一区二区| 色综合色综合色综合色综合色综合| 国产精品传媒视频| 色综合久久天天综合网| 亚洲精品v日韩精品| 欧美性xxxxxx少妇| 丝袜诱惑亚洲看片| 精品国免费一区二区三区| 国产美女精品人人做人人爽| 18欧美亚洲精品| 日韩三级中文字幕| 国产成人精品www牛牛影视| 久久综合五月天婷婷伊人| 蜜臀久久99精品久久久久宅男 | www.亚洲在线| 亚洲欧美日韩久久| 欧美精品自拍偷拍动漫精品| 蜜臀av在线播放一区二区三区| 欧美α欧美αv大片| 国产精品一区免费在线观看| 中文字幕在线不卡国产视频| 91在线国产观看| 天堂蜜桃91精品| 国产日韩欧美精品电影三级在线| 99综合影院在线| 亚洲电影中文字幕在线观看| 日韩精品一区二区三区在线播放| 成人性生交大片免费看在线播放 | 亚洲精品国产成人久久av盗摄 | 裸体一区二区三区| 精品国产91九色蝌蚪| 成人一区二区三区视频| 亚洲国产精品一区二区久久| 久久人人爽爽爽人久久久| 色综合久久88色综合天天6| 麻豆国产一区二区| 综合欧美亚洲日本| 精品伦理精品一区| 91福利小视频| 粉嫩av一区二区三区| 亚洲va欧美va国产va天堂影院| 国产亚洲欧洲997久久综合| 欧美在线观看视频在线| 粉嫩蜜臀av国产精品网站| 婷婷中文字幕一区三区| 青娱乐精品视频| 91精品国产综合久久久久久| 粗大黑人巨茎大战欧美成人| 性做久久久久久免费观看欧美| 国产区在线观看成人精品| 欧美日韩三级视频| 北条麻妃一区二区三区| 免费观看成人av| 亚洲国产视频a| 中文字幕在线观看一区| 欧美大胆人体bbbb| 欧美日韩免费不卡视频一区二区三区| 国产91在线|亚洲| 国产在线播放一区三区四| 日韩制服丝袜av| 亚洲一区二区三区精品在线| 中文字幕亚洲在| 欧美激情一区二区三区| 久久在线观看免费| 欧美第一区第二区| 欧美一区二区美女| 欧美久久久久免费| 精品视频一区二区三区免费| 91免费视频观看| 91毛片在线观看| 精品福利av导航| 色婷婷久久综合| 成人国产精品免费网站| 国产美女精品在线| 国产中文一区二区三区| 久久精品av麻豆的观看方式| 日韩国产在线观看一区| 亚洲国产视频在线| 亚洲电影你懂得| 亚洲国产毛片aaaaa无费看| 亚洲国产视频在线| 天堂成人国产精品一区| 青青草国产成人99久久| 九九精品一区二区| 狠狠色狠狠色综合系列| 国产成人自拍高清视频在线免费播放 | 国内精品在线播放| 国内成人精品2018免费看| 国内精品国产成人国产三级粉色| 国模一区二区三区白浆| 成人av高清在线| 色婷婷国产精品久久包臀| 在线免费观看日本一区| 欧美激情一区二区三区| 最新国产の精品合集bt伙计| 亚洲人成小说网站色在线| 精品少妇一区二区三区免费观看 | 精品国产成人在线影院 | 国产99久久精品| av午夜一区麻豆| 色哟哟在线观看一区二区三区| 欧美午夜电影一区| 欧美一卡在线观看| 久久久天堂av| 亚洲精品久久久久久国产精华液| 日韩av一区二区三区四区| 精品一区二区av| 粉嫩一区二区三区在线看| 91欧美激情一区二区三区成人| 欧美日韩一区二区三区在线| 欧美一级黄色大片| 国产精品成人午夜| 国产精品久久看| 亚洲成在人线免费| 国模套图日韩精品一区二区 | 亚洲高清免费视频| 国内外精品视频| 欧美无人高清视频在线观看| 精品国产区一区| 亚洲一区二区三区四区五区黄 | 久久国内精品视频| 99国内精品久久| 欧美不卡一区二区| 亚洲精品一二三| 国产a视频精品免费观看| 欧美三级韩国三级日本三斤| 久久久99精品免费观看不卡| 午夜日韩在线观看| 波多野结衣中文字幕一区二区三区| 欧美日韩国产片| 中文字幕一区二区三区乱码在线| 视频一区国产视频| 91麻豆免费看| 亚洲国产精品精华液2区45| 午夜久久久影院| 99re视频精品| 国产日韩欧美在线一区| 日本成人在线电影网| 日本精品免费观看高清观看| 国产日韩欧美激情| 激情久久久久久久久久久久久久久久| 欧美三片在线视频观看| 国产精品久久久久一区| 国产精品综合在线视频| 91精品欧美综合在线观看最新 | 一区二区日韩电影| 91免费看片在线观看| 国产精品久久久一区麻豆最新章节| 久久精品国产99| 日韩视频免费观看高清完整版 | 成人av资源站| 亚洲国产精品99久久久久久久久 | 欧美变态tickle挠乳网站| 五月天丁香久久| 欧美日韩小视频| 亚洲永久免费av| 在线观看国产一区二区| 一区二区三区四区乱视频| 91日韩在线专区| 亚洲精品成人悠悠色影视| 91视视频在线观看入口直接观看www | 美女网站色91| 日韩视频一区二区三区在线播放 | 日韩一区精品字幕| 欧美精品第1页| 日韩精品一区第一页| 欧美一二三区在线观看| 九九国产精品视频| 欧美激情中文字幕|