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

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

?? sp_enc.c

?? FIXPOINT
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):

/*
 * Int_lpc_1and3
 *
 *
 * Parameters:
 *    lsp_old        I: LSP vector at the 4th subfr. of past frame      [M]
 *    lsp_mid        I: LSP vector at the 2nd subframe of present frame [M]
 *    lsp_new        I: LSP vector at the 4th subframe of present frame [M]
 *    az             O: interpolated LP parameters in subframes 1 and 3
 *                                                                [AZ_SIZE]
 *
 * Function:
 *    Interpolates the LSPs and converts to LPC parameters
 *    to get a different LP filter in each subframe.
 *
 *    The 20 ms speech frame is divided into 4 subframes.
 *    The LSPs are quantized and transmitted at the 2nd and
 *    4th subframes (twice per frame) and interpolated at the
 *    1st and 3rd subframe.
 *
 * Returns:
 *    void
 */
static void Int_lpc_1and3( Float32 lsp_old[], Float32 lsp_mid[], Float32 lsp_new
      [], Float32 az[] )
{
   Word32 i;
   Float32 lsp[M];


   for ( i = 0; i < M; i++ ) {
      lsp[i] = ( lsp_mid[i] + lsp_old[i] ) * 0.5F;
   }

   /* Subframe 1 */
   Lsp_Az( lsp, az );
   az += MP1;

   /* Subframe 2 */
   Lsp_Az( lsp_mid, az );
   az += MP1;

   for ( i = 0; i < M; i++ ) {
      lsp[i] = ( lsp_mid[i] + lsp_new[i] ) * 0.5F;
   }

   /* Subframe 3 */
   Lsp_Az( lsp, az );
   az += MP1;

   /* Subframe 4 */
   Lsp_Az( lsp_new, az );
   return;
}


/*
 * Int_lpc_1to3_2
 *
 *
 * Parameters:
 *    lsp_old           I: LSP vector at the 4th subfr. of past frame      [M]
 *    lsp_new           I: LSP vector at the 4th subframe of present frame [M]
 *    az                O: interpolated LP parameters in subframes 1, 2 and 3
 *                                                                   [AZ_SIZE]
 *
 * Function:
 *    Interpolation of the LPC parameters.
 *
 * Returns:
 *    void
 */
static void Int_lpc_1to3_2( Float32 lsp_old[], Float32 lsp_new[], Float32 az[] )
{
   Float32 lsp[M];
   Word32 i;


   for ( i = 0; i < M; i += 2 ) {
      lsp[i] = lsp_new[i] * 0.25F + lsp_old[i] * 0.75F;
      lsp[i + 1] = lsp_new[i + 1] *0.25F + lsp_old[i + 1] *0.75F;
   }

   /* Subframe 1 */
   Lsp_Az( lsp, az );
   az += MP1;

   for ( i = 0; i < M; i += 2 ) {
      lsp[i] = ( lsp_old[i] + lsp_new[i] ) * 0.5F;
      lsp[i + 1] = ( lsp_old[i + 1] +lsp_new[i+1] )*0.5F;
   }

   /* Subframe 2 */
   Lsp_Az( lsp, az );
   az += MP1;

   for ( i = 0; i < M; i += 2 ) {
      lsp[i] = lsp_old[i] * 0.25F + lsp_new[i] * 0.75F;
      lsp[i + 1] = lsp_old[i + 1] *0.25F + lsp_new[i + 1] *0.75F;
   }

   /* Subframe 3 */
   Lsp_Az( lsp, az );
   return;
}


/*
 * Int_lpc_1to3
 *
 *
 * Parameters:
 *    lsp_old           I: LSP vector at the 4th subfr. of past frame      [M]
 *    lsp_new           I: LSP vector at the 4th subframe of present frame [M]
 *    az                O: interpolated LP parameters in all subframes
 *                                                                   [AZ_SIZE]
 *
 * Function:
 *    Interpolates the LSPs and converts to LPC parameters to get a different
 *    LP filter in each subframe.
 *
 *    The 20 ms speech frame is divided into 4 subframes.
 *    The LSPs are quantized and transmitted at the 4th
 *    subframes (once per frame) and interpolated at the
 *    1st, 2nd and 3rd subframe.
 *
 * Returns:
 *    void
 */
static void Int_lpc_1to3( Float32 lsp_old[], Float32 lsp_new[], Float32 az[] )
{
   Float32 lsp[M];
   Word32 i;


   for ( i = 0; i < M; i++ ) {
      lsp[i] = lsp_new[i] * 0.25F + lsp_old[i] * 0.75F;
   }

   /* Subframe 1 */
   Lsp_Az( lsp, az );
   az += MP1;

   for ( i = 0; i < M; i++ ) {
      lsp[i] = ( lsp_old[i] + lsp_new[i] ) * 0.5F;
   }

   /* Subframe 2 */
   Lsp_Az( lsp, az );
   az += MP1;

   for ( i = 0; i < M; i++ ) {
      lsp[i] = lsp_old[i] * 0.25F + lsp_new[i] * 0.75F;
   }

   /* Subframe 3 */
   Lsp_Az( lsp, az );
   az += MP1;

   /* Subframe 4 */
   Lsp_Az( lsp_new, az );
   return;
}


/*
 * lsp
 *
 *
 * Parameters:
 *    req_mode          I: requested mode
 *    used_mode         I: used mode
 *    lsp_old           B: old LSP vector
 *    lsp_old_q         B: old quantized LSP vector
 *    past_rq           B: past quantized residual
 *    az                B: interpolated LP parameters
 *    azQ               O: quantization interpol. LP parameters
 *    lsp_new           O: new lsp vector
 *    anap              O: analysis parameters
 *
 * Function:
 *    From A(z) to lsp. LSP quantization and interpolation
 *
 * Returns:
 *    void
 */
static void lsp(int req_mode, int used_mode, Float32 *lsp_old,
      Float32 *lsp_old_q, Float32 *past_rq, Float32 az[], Float32 azQ[], Float32
      lsp_new[], Word16 **anap )
{
   Float32 lsp_new_q[M];   /* LSPs at 4th subframe */
   Float32 lsp_mid[M], lsp_mid_q[M];   /* LSPs at 2nd subframe */
   Word32 pred_init_i;   /* init index for MA prediction in DTX mode */


   if ( req_mode == MR122 ) {
      Az_lsp( &az[MP1], lsp_mid, lsp_old );
      Az_lsp( &az[MP1 * 3], lsp_new, lsp_mid );

      /*
       * Find interpolated LPC parameters in all subframes
       * (both quantized and unquantized).
       * The interpolated parameters are in array A_t[] of size (M+1)*4
       * and the quantized interpolated parameters are in array Aq_t[]
       */
      Int_lpc_1and3_2( lsp_old, lsp_mid, lsp_new, az );

      if ( used_mode != MRDTX ) {
         /* LSP quantization (lsp_mid[] and lsp_new[] jointly quantized) */
         Q_plsf_5( past_rq, lsp_mid, lsp_new, lsp_mid_q, lsp_new_q, *anap );
         Int_lpc_1and3( lsp_old_q, lsp_mid_q, lsp_new_q, azQ );

         /* Advance analysis parameters pointer */
         ( *anap ) += 5;
      }
   }
   else {
      /* From A(z) to lsp */
      Az_lsp( &az[MP1 * 3], lsp_new, lsp_old );

      /*
       * Find interpolated LPC parameters in all subframes
       * (both quantized and unquantized).
       * The interpolated parameters are in array A_t[] of size (M+1)*4
       * and the quantized interpolated parameters are in array Aq_t[]
       */
      Int_lpc_1to3_2( lsp_old, lsp_new, az );

      /* LSP quantization */
      if ( used_mode != MRDTX ) {
         Q_plsf_3( req_mode, past_rq, lsp_new, lsp_new_q, *anap, &pred_init_i );
         Int_lpc_1to3( lsp_old_q, lsp_new_q, azQ );

         /* Advance analysis parameters pointer */
         ( *anap ) += 3;
      }
   }

   /* update the LSPs for the next frame */
   memcpy( lsp_old, lsp_new, M <<2 );
   memcpy( lsp_old_q, lsp_new_q, M <<2 );
}


/*
 * check_lsp
 *
 *
 * Parameters:
 *    count          B: counter for resonance
 *    lsp            B: LSP vector
 *
 * Function:
 *    Check the LSP's to detect resonances
 *
 *    Resonances in the LPC filter are monitored to detect possible problem
 *    areas where divergence between the adaptive codebook memories in
 *    the encoder and the decoder could cause unstable filters in areas
 *    with highly correlated continuos signals. Typically, this divergence
 *    is due to channel errors.
 *    The monitoring of resonance signals is performed using unquantized LSPs
 *    q(i), i = 1,...,10. The algorithm utilises the fact that LSPs are
 *    closely located at a peak in the spectrum. First, two distances,
 *    dist 1 and dist 2 ,are calculated in two different regions,
 *    defined as
 *
 *    dist1 = min[q(i) - q(i + 1)],  i = 4,...,8
 *    dist2 = min[q(i) - q(i + 1)],  i = 2,3
 *
 *    Either of these two minimum distance conditions must be fulfilled
 *    to classify the frame as a resonance frame and increase the resonance
 *    counter.
 *
 *    if(dist1 < TH1) || if (dist2 < TH2)
 *       counter++
 *    else
 *       counter = 0
 *
 *    TH1 = 0.046
 *    TH2 = 0.018, q(2) > 0.98
 *    TH2 = 0.024, 0.93 < q(2) <= 0.98
 *    TH2 = 0.018, otherwise
 *
 *    12 consecutive resonance frames are needed to indicate possible
 *    problem conditions, otherwise the LSP_flag is cleared.
 *
 * Returns:
 *    resonance flag
 */
static Word16 check_lsp( Word16 *count, Float32 *lsp )
{
   Float32 dist, dist_min1, dist_min2, dist_th;
   Word32 i;


   /*
    * Check for a resonance:
    * Find minimum distance between lsp[i] and lsp[i+1]
    */
   dist_min1 = FLT_MAX;

   for ( i = 3; i < 8; i++ ) {
      dist = lsp[i] - lsp[i + 1];

      if ( dist < dist_min1 ) {
         dist_min1 = dist;
      }
   }
   dist_min2 = FLT_MAX;

   for ( i = 1; i < 3; i++ ) {
      dist = lsp[i] - lsp[i + 1];

      if ( dist < dist_min2 ) {
         dist_min2 = dist;
      }
   }

   if ( lsp[1] > 0.98F ) {
      dist_th = 0.018F;
   }
   else if ( lsp[1] > 0.93F ) {
      dist_th = 0.024F;
   }
   else {
      dist_th = 0.034F;
   }

   if ( ( dist_min1 < 0.046F ) || ( dist_min2 < dist_th ) ) {
      *count += 1;
   }
   else {
      *count = 0;
   }

   /* Need 12 consecutive frames to set the flag */
   if ( *count >= 12 ) {
      *count = 12;
      return 1;
   }
   else {
      return 0;
   }
}


/*
 * Weight_Ai
 *
 *
 * Parameters:
 *    a                 I: LPC coefficients                    [M+1]
 *    fac               I: Spectral expansion factors.         [M+1]
 *    a_exp             O: Spectral expanded LPC coefficients  [M+1]
 *
 * Function:
 *    Spectral expansion of LP coefficients
 *
 * Returns:
 *    void
 */
static void Weight_Ai( Float32 a[], const Float32 fac[], Float32 a_exp[] )
{
   Word32 i;


   a_exp[0] = a[0];

   for ( i = 1; i <= M; i++ ) {
      a_exp[i] = a[i] * fac[i - 1];
   }
   return;
}


/*
 * Residu
 *
 *
 * Parameters:
 *    a                 I: prediction coefficients
 *    x                 I: speech signal
 *    y                 O: residual signal
 *
 * Function:
 *    Computes the LTP residual signal.
 *
 * Returns:
 *    void
 */
static void Residu( Float32 a[], Float32 x[], Float32 y[] )
{
   Float32 s;
   Word32 i;


   for ( i = 0; i < L_SUBFR; i += 4 ) {
      s = x[i] * a[0];
      s += x[i - 1] *a[1];
      s += x[i - 2] * a[2];
      s += x[i - 3] * a[3];
      s += x[i - 4] * a[4];
      s += x[i - 5] * a[5];
      s += x[i - 6] * a[6];
      s += x[i - 7] * a[7];
      s += x[i - 8] * a[8];
      s += x[i - 9] * a[9];
      s += x[i - 10] * a[10];
      y[i] = s;
      s = x[i + 1] *a[0];
      s += x[i] * a[1];
      s += x[i - 1] *a[2];
      s += x[i - 2] * a[3];
      s += x[i - 3] * a[4];
      s += x[i - 4] * a[5];
      s += x[i - 5] * a[6];
      s += x[i - 6] * a[7];
      s += x[i - 7] * a[8];
      s += x[i - 8] * a[9];
      s += x[i - 9] * a[10];
      y[i + 1] = s;
      s = x[i + 2] * a[0];
      s += x[i + 1] *a[1];
      s += x[i] * a[2];
      s += x[i - 1] *a[3];
      s += x[i - 2] * a[4];
      s += x[i - 3] * a[5];
      s += x[i - 4] * a[6];
      s += x[i - 5] * a[7];
      s += x[i - 6] * a[8];
      s += x[i - 7] * a[9];
      s += x[i - 8] * a[10];
      y[i + 2] = s;
      s = x[i + 3] * a[0];
      s += x[i + 2] * a[1];
      s += x[i + 1] *a[2];
      s += x[i] * a[3];
      s += x[i - 1] *a[4];
      s += x[i - 2] * a[5];
      s += x[i - 3] * a[6];
      s += x[i - 4] * a[7];
      s += x[i - 5] * a[8];
      s += x[i - 6] * a[9];
      s += x[i - 7] * a[10];
      y[i + 3] = s;
   }
   return;
}


/*
 * Syn_filt
 *
 *
 * Parameters:
 *    a                 I: prediction coefficients [M+1]
 *    x                 I: input signal
 *    y                 O: output signal
 *    mem               B: memory associated with this filtering
 *    update            I: 0=no update, 1=update of memory.
 *
 * Function:
 *    Perform synthesis filtering through 1/A(z).
 *
 * Returns:
 *    void
 */
static void Syn_filt( Float32 a[], Float32 x[], Float32 y[], Float32 mem[], Word16 update )
{
#define Fixed_point_mode
#ifdef Fixed_point_mode
   Float32 sum;
   Float32 tmp[50];
   Float32 *yy;
   Word32 i, j;
   Word16 A[11]; //For Fixed_point a[]
   Word32 X[40]; //For Fixed_point x[]
#else
   Float64 tmp[50];
   Float64 sum;
   Float64 *yy;
   Word32 i, j;
#endif

#ifdef Fixed_point_mode
   //======= truncate a[] ========= total 16 bits, 俱計(jì)=3 bits, 

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产中文字幕一区| 久久先锋影音av鲁色资源网| 91免费视频大全| 国产suv精品一区二区883| 国产精品一区在线观看乱码| 国产精品一线二线三线精华| 国产美女一区二区| 懂色av中文字幕一区二区三区| 国产精品性做久久久久久| 国产aⅴ综合色| 成人激情黄色小说| 色哟哟国产精品| 欧美在线|欧美| 欧美日韩国产精品自在自线| 中文字幕av不卡| 一区二区三区四区乱视频| 亚洲一区二区中文在线| 日本亚洲电影天堂| 精品亚洲成a人在线观看 | 色婷婷久久99综合精品jk白丝| 一本大道久久a久久综合婷婷| 色婷婷综合久久久中文字幕| 欧美午夜寂寞影院| 91麻豆精品91久久久久久清纯| 日韩亚洲欧美一区二区三区| 久久久不卡网国产精品二区| 中文字幕一区二| 香蕉成人啪国产精品视频综合网 | 91亚洲大成网污www| 欧美理论电影在线| 日韩精品一区二区三区中文不卡| 久久久国产精品麻豆| 中文字幕在线不卡视频| 亚洲成人黄色小说| 国产精品亚洲视频| 在线观看一区日韩| 精品少妇一区二区三区免费观看| 中文字幕av一区二区三区| 亚洲一区二区三区美女| 国产在线国偷精品产拍免费yy| 成人在线视频一区二区| 欧美性一区二区| 欧美刺激午夜性久久久久久久| 国产精品人成在线观看免费 | 国产成人久久精品77777最新版本| 91天堂素人约啪| 日韩一级片在线播放| 国产精品久久久久久久久免费相片 | 日韩一区二区三区免费观看| 国产午夜精品福利| 亚洲成人激情自拍| 国产成人午夜片在线观看高清观看| 91精品91久久久中77777| 欧美成人午夜电影| 亚洲精品国产一区二区精华液 | 成人久久久精品乱码一区二区三区| 欧美午夜精品一区二区三区| 久久精品欧美日韩精品| 一区二区三区在线观看国产| 精品一区二区三区免费视频| 欧美色视频一区| 中文字幕精品在线不卡| 乱一区二区av| 精品视频在线免费观看| 国产精品国产三级国产a| 久久99久久久久久久久久久| 色系网站成人免费| 国产亚洲综合在线| 免费在线成人网| 欧美色图第一页| 国产精品欧美极品| 国内精品嫩模私拍在线| 91麻豆精品国产自产在线观看一区 | 中文字幕在线不卡视频| 久久精品国产久精国产爱| 欧美日韩免费不卡视频一区二区三区| 中文字幕不卡的av| 国产精品69久久久久水密桃| 日韩一区二区三区在线| 五月天中文字幕一区二区| 一本一本久久a久久精品综合麻豆| 久久久久88色偷偷免费| 蜜臀精品久久久久久蜜臀| 在线观看日韩一区| 亚洲欧美日韩一区| 97超碰欧美中文字幕| 国产精品久久99| 成人免费毛片片v| 久久久久久一级片| 国内精品伊人久久久久影院对白| 欧美一二三四区在线| 日韩精品91亚洲二区在线观看 | 久久久久久久久岛国免费| 久久99久久精品| 精品国产污网站| 免费看欧美女人艹b| 欧美一区二区在线免费观看| 性久久久久久久| 欧美一区二区三区视频免费播放| 午夜电影一区二区| 欧美精品18+| 天天免费综合色| 欧美酷刑日本凌虐凌虐| 亚洲va天堂va国产va久| 9191成人精品久久| 日韩av电影免费观看高清完整版| 4hu四虎永久在线影院成人| 日韩av一区二区三区四区| 日韩视频一区二区在线观看| 免费高清在线一区| 久久综合国产精品| 国产麻豆视频精品| 国产精品电影一区二区| gogogo免费视频观看亚洲一| 自拍偷拍欧美精品| 色一情一伦一子一伦一区| 亚洲国产成人av网| 日韩午夜激情电影| 国产一区二区精品在线观看| 欧美国产激情二区三区| 色又黄又爽网站www久久| 亚洲高清免费在线| 日韩一区二区麻豆国产| 国产成人午夜精品5599| ㊣最新国产の精品bt伙计久久| 91蝌蚪porny九色| 亚洲福利视频一区二区| 欧美mv和日韩mv的网站| 成人短视频下载| 亚洲成人av电影在线| 日韩精品自拍偷拍| 成人黄色国产精品网站大全在线免费观看 | 久久一二三国产| 成人网页在线观看| 亚洲第一av色| 久久嫩草精品久久久精品| 色综合久久综合网欧美综合网| 首页国产欧美久久| 日本一区二区综合亚洲| 日本精品视频一区二区| 久久99久久99精品免视看婷婷| 国产精品网曝门| 欧美色国产精品| 国产精品18久久久久久久网站| 一区二区三区免费网站| 欧美大黄免费观看| 91原创在线视频| 免费成人在线网站| 自拍偷拍欧美精品| 日韩美女天天操| 91视频在线观看免费| 日韩国产成人精品| 国产精品乱码一区二区三区软件| 欧美性色黄大片| 粉嫩av一区二区三区粉嫩| 五月婷婷综合在线| 国产精品水嫩水嫩| 日韩美女一区二区三区| 91美女福利视频| 久久成人羞羞网站| 亚洲曰韩产成在线| 国产精品每日更新在线播放网址| 欧美美女视频在线观看| av成人免费在线观看| 国产最新精品精品你懂的| 亚洲成人精品在线观看| 一区在线观看免费| 久久先锋影音av| 欧美日韩视频在线第一区| av成人老司机| 国产成人av资源| 蜜臀精品一区二区三区在线观看 | 丁香婷婷深情五月亚洲| 日韩电影免费一区| 亚洲中国最大av网站| 国产欧美精品国产国产专区 | 欧美激情资源网| 欧美不卡一区二区| 在线成人免费视频| 欧美性色欧美a在线播放| 99在线精品观看| 国产精品18久久久| 美脚の诱脚舐め脚责91| 日韩在线观看一区二区| 亚洲一线二线三线视频| 亚洲视频一二区| 国产精品久久久久9999吃药| 国产午夜亚洲精品理论片色戒| 777xxx欧美| 欧美日韩精品一区视频| 欧洲av在线精品| 欧美中文字幕一二三区视频| 91在线你懂得| 99久久er热在这里只有精品15 | 亚洲精品在线电影| 欧美一区二区三区白人| 欧美日本一区二区在线观看| 欧美无乱码久久久免费午夜一区| 在线亚洲精品福利网址导航| 99久久综合国产精品|