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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cod_ld8k.c

?? 語音編碼的原程序,是在國外的網(wǎng)站下來的,沒有改動可以直接在軟電話下使用!
?? 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;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品色噜噜| 欧美日韩一区二区在线视频| 欧美一级xxx| 奇米影视7777精品一区二区| 日韩一区二区中文字幕| 韩日精品视频一区| 久久久久九九视频| 99国内精品久久| 亚洲一区影音先锋| 日韩一区二区三区免费看 | 国产91精品精华液一区二区三区 | 中文字幕av一区 二区| 成人污视频在线观看| 亚洲精品videosex极品| 欧美猛男男办公室激情| 久久国产尿小便嘘嘘尿| 国产日韩欧美一区二区三区综合| 白白色 亚洲乱淫| 亚洲第一综合色| 亚洲精品一线二线三线 | 国产乱码一区二区三区| 国产一区二区中文字幕| 久久精品一二三| 色先锋久久av资源部| 成人网页在线观看| 亚洲综合一二三区| 日韩免费一区二区三区在线播放| 国产精品主播直播| 亚洲午夜精品17c| 久久久欧美精品sm网站| 色婷婷狠狠综合| 韩国av一区二区| 国产精品电影院| 在线日韩一区二区| 国产一区高清在线| 午夜av一区二区三区| 久久亚洲综合色一区二区三区| 99精品视频一区二区三区| 三级在线观看一区二区| 欧美国产一区视频在线观看| 欧美日本在线视频| jizzjizzjizz欧美| 精一区二区三区| 天天综合网 天天综合色| 国产欧美一区二区精品忘忧草| 在线精品视频免费播放| 高清不卡一二三区| 麻豆精品在线观看| 亚洲电影一区二区| 亚洲人xxxx| 国产精品免费视频网站| 欧美不卡一区二区三区| 欧美中文字幕久久| 91小视频免费观看| 成人一级视频在线观看| 精品制服美女丁香| 日韩av电影免费观看高清完整版 | 亚洲高清在线精品| 一区精品在线播放| 久久精品免视看| 精品91自产拍在线观看一区| 欧美日韩在线综合| 91久久精品网| 一本一道久久a久久精品| 成人av影视在线观看| 国产一区二区主播在线| 寂寞少妇一区二区三区| 久久精品国产精品亚洲综合| 日韩1区2区3区| 日本视频一区二区三区| 日韩二区在线观看| 爽爽淫人综合网网站| 无码av免费一区二区三区试看| 亚洲一区中文在线| 亚洲成av人影院| 五月天久久比比资源色| 婷婷六月综合网| 青青青伊人色综合久久| 六月婷婷色综合| 韩国三级在线一区| 国产精品99久久久久久宅男| 国产精品18久久久| av影院午夜一区| 91在线视频播放| 日本韩国一区二区三区视频| 91久久精品网| 91麻豆精品国产综合久久久久久| 欧美丰满一区二区免费视频| 日韩三级在线观看| 26uuu国产电影一区二区| 国产日韩欧美一区二区三区综合| 中文字幕欧美三区| 亚洲免费资源在线播放| 午夜亚洲国产au精品一区二区| 五月天一区二区三区| 蜜桃久久久久久久| 国产成人在线电影| 91在线视频免费观看| 欧美日韩www| 欧美精品一区二区三区高清aⅴ| 久久精品在线观看| 一区二区欧美国产| 免费在线观看精品| 成人免费视频app| 欧美性xxxxxxxx| 精品国产乱码久久久久久1区2区| 国产日韩欧美精品综合| 一区二区三区在线播| 精品一区二区三区免费播放| 丁香另类激情小说| 欧美日韩日日摸| 久久久一区二区三区捆绑**| 亚洲欧美一区二区三区孕妇| 日韩精品亚洲一区二区三区免费| 国产成人在线免费| 在线成人免费视频| 国产精品福利一区| 蜜桃久久久久久| 91尤物视频在线观看| 日韩亚洲欧美在线观看| 亚洲人成人一区二区在线观看 | 亚洲小说春色综合另类电影| 九九九久久久精品| 欧美天天综合网| 欧美激情综合网| 美女任你摸久久| 欧美伊人久久大香线蕉综合69| 国产夜色精品一区二区av| 天天色天天操综合| 99热这里都是精品| www国产精品av| 偷拍一区二区三区| 91视频免费播放| 国产午夜精品一区二区三区视频| 日韩精品一卡二卡三卡四卡无卡| av电影在线观看完整版一区二区| 精品久久久久av影院| 亚洲国产精品人人做人人爽| 成人激情免费电影网址| 欧美电影免费观看高清完整版在 | 一本到高清视频免费精品| wwwwxxxxx欧美| 蜜臀av一区二区| 欧美在线一二三四区| 1区2区3区精品视频| 国产成人精品免费看| 日韩天堂在线观看| 视频一区中文字幕| 精品视频在线免费看| 曰韩精品一区二区| eeuss国产一区二区三区| 久久久久久久久久久久电影 | voyeur盗摄精品| 久久视频一区二区| 久久电影网站中文字幕 | 精品视频色一区| 亚洲黄色免费电影| 色婷婷av一区二区三区大白胸| 一区视频在线播放| 99国内精品久久| 亚洲免费视频成人| 91色视频在线| 一级精品视频在线观看宜春院| 99视频精品在线| 亚洲欧美另类在线| 一本到不卡免费一区二区| 亚洲精品中文在线观看| 一本色道综合亚洲| 亚洲午夜免费福利视频| 精品视频色一区| 日本aⅴ亚洲精品中文乱码| 日韩午夜激情视频| 国产在线观看一区二区| 亚洲国产精品t66y| 91在线精品一区二区三区| 亚洲女女做受ⅹxx高潮| 欧美午夜电影在线播放| 天天做天天摸天天爽国产一区| 日韩欧美区一区二| 国产高清精品网站| 中文字幕一区二区三区不卡| 91精彩视频在线观看| 亚洲18色成人| 日韩欧美一级片| 成人三级在线视频| 亚洲专区一二三| 日韩欧美一区在线| 国产激情偷乱视频一区二区三区| 国产精品久久久久久久久动漫| 色综合久久综合网| 日韩av电影一区| 欧美高清在线精品一区| 一本一道综合狠狠老| 日本视频一区二区| 中国av一区二区三区| 91福利在线播放| 国产一区二区三区最好精华液| 国产精品视频线看| 91精品国产91久久久久久最新毛片 | 国产欧美精品一区|