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

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

?? sp_frm.c

?? GSM半數率源代碼(VSELP) GSM半數率源代碼(VSELP)
?? C
?? 第 1 頁 / 共 5 頁
字號:
 *
 *   DESCRIPTION:
 *
 *
 *   REFERENCE:  Sub-clause 4.1.6 of GSM Recommendation 06.20
 *
 *   Keywords: openlooplagsearch, openloop, lag, pitch
 *
 **************************************************************************/



short  compResidEnergy(Shortword pswSpeech[],
                              Shortword ppswInterpCoef[][NP],
                              Shortword pswPreviousCoef[],
                              Shortword pswCurrentCoef[],
                              struct NormSw psnsSqrtRs[])
{

/*_________________________________________________________________________
 |                                                                         |
 |                            Automatic Variables                          |
 |_________________________________________________________________________|
*/

  short  i,
         j,
         siOverflowPossible,
         siInterpDecision;
  Shortword swMinShift,
         swShiftFactor,
         swSample,
        *pswCoef;
  Shortword pswTempState[NP];
  Shortword pswResidual[S_LEN];
  Longword L_ResidualEng;

/*_________________________________________________________________________
 |                                                                         |
 |                            Executable Code                              |
 |_________________________________________________________________________|
*/

  /* Find minimum shift count of the square-root of residual energy */
  /* estimates over the four subframes.  According to this minimum, */
  /* find a shift count for the residual signal which will be used  */
  /* to avoid overflow when the actual residual energies are        */
  /* calculated over the frame                                      */
  /*----------------------------------------------------------------*/

  swMinShift = SW_MAX;
  for (i = 0; i < N_SUB; i++)
  {

    if (sub(psnsSqrtRs[i].sh, swMinShift) < 0 && psnsSqrtRs[i].man > 0)
      swMinShift = psnsSqrtRs[i].sh;
  }

  if (sub(swMinShift, 1) >= 0)
  {

    siOverflowPossible = 0;
  }

  else if (swMinShift == 0)
  {
    siOverflowPossible = 1;
    swShiftFactor = ONE_HALF;
  }

  else if (sub(swMinShift, -1) == 0)
  {
    siOverflowPossible = 1;
    swShiftFactor = ONE_QUARTER;
  }

  else
  {
    siOverflowPossible = 1;
    swShiftFactor = ONE_EIGHTH;
  }

  /* Copy analysis filter state into temporary buffer */
  /*--------------------------------------------------*/

  for (i = 0; i < NP; i++)
    pswTempState[i] = pswAnalysisState[i];

  /* Send the speech frame, one subframe at a time, through the analysis */
  /* filter which is based on interpolated coefficients.  After each     */
  /* subframe, accumulate the energy in the residual signal, scaling to  */
  /* avoid overflow if necessary.                                        */
  /*---------------------------------------------------------------------*/

  L_ResidualEng = 0;

  for (i = 0; i < N_SUB; i++)
  {

    lpcFir(&pswSpeech[i * S_LEN], ppswInterpCoef[i], pswTempState,
           pswResidual);

    if (siOverflowPossible)
    {

      for (j = 0; j < S_LEN; j++)
      {

        swSample = mult_r(swShiftFactor, pswResidual[j]);
        L_ResidualEng = L_mac(L_ResidualEng, swSample, swSample);
      }
    }

    else
    {

      for (j = 0; j < S_LEN; j++)
      {

        L_ResidualEng = L_mac(L_ResidualEng, pswResidual[j], pswResidual[j]);
      }
    }
  }

  /* Send the speech frame, one subframe at a time, through the analysis */
  /* filter which is based on un-interpolated coefficients.  After each  */
  /* subframe, subtract the energy in the residual signal from the       */
  /* accumulated residual energy due to the interpolated coefficient     */
  /* analysis filter, again scaling to avoid overflow if necessary.      */
  /* Note that the analysis filter state is updated during these         */
  /* filtering operations.                                               */
  /*---------------------------------------------------------------------*/

  for (i = 0; i < N_SUB; i++)
  {

    switch (i)
    {

      case 0:

        pswCoef = pswPreviousCoef;
        break;

      case 1:
      case 2:
      case 3:

        pswCoef = pswCurrentCoef;
        break;
    }

    lpcFir(&pswSpeech[i * S_LEN], pswCoef, pswAnalysisState,
           pswResidual);

    if (siOverflowPossible)
    {

      for (j = 0; j < S_LEN; j++)
      {

        swSample = mult_r(swShiftFactor, pswResidual[j]);
        L_ResidualEng = L_msu(L_ResidualEng, swSample, swSample);
      }
    }

    else
    {

      for (j = 0; j < S_LEN; j++)
      {

        L_ResidualEng = L_msu(L_ResidualEng, pswResidual[j], pswResidual[j]);
      }
    }
  }

  /* Make soft-interpolation decision based on the difference in residual */
  /* energies                                                             */
  /*----------------------------------------------------------------------*/

  if (L_ResidualEng < 0)
    siInterpDecision = 1;

  else
    siInterpDecision = 0;

  return siInterpDecision;
}

/***************************************************************************
 *
 *    FUNCTION NAME: cov32
 *
 *    PURPOSE: Calculates B, F, and C correlation matrices from which
 *             the reflection coefficients are computed using the FLAT
 *             algorithm. The Spectral Smoothing Technique (SST) is applied
 *             to the correlations. End point correction is employed
 *             in computing the correlations to minimize computation.
 *
 *    INPUT:
 *
 *       pswIn[0:169]
 *                     A sampled speech vector used to compute
 *                     correlations need for generating the optimal
 *                     reflection coefficients via the FLAT algorithm.
 *
 *       CVSHIFT       The number of right shifts by which the normalized
 *                     correlations are to be shifted down prior to being
 *                     rounded into the Shortword output correlation arrays
 *                     B, F, and C.
 *
 *       pL_rFlatSstCoefs[NP]
 *
 *                     A table stored in Rom containing the spectral
 *                     smoothing function coefficients.
 *
 *    OUTPUTS:
 *
 *       pppL_B[0:NP-1][0:NP-1][0:1]
 *                     An output correlation array containing the backward
 *                     correlations of the input signal. It is a square
 *                     matrix symmetric about the diagonal. Only the upper
 *                     right hand triangular region of this matrix is
 *                     initialized, but two dimensional indexing is retained
 *                     to enhance clarity. The third array dimension is used
 *                     by function flat to swap the current and the past
 *                     values of B array, eliminating the need to copy
 *                     the updated B values onto the old B values at the
 *                     end of a given lattice stage. The third dimension
 *                     is similarily employed in arrays F and C.
 *
 *       pppL_F[0:NP-1][0:NP-1][0:1]
 *                     An output correlation array containing the forward
 *                     correlations of the input signal. It is a square
 *                     matrix symmetric about the diagonal. Only the upper
 *                     right hand triangular region of this matrix is
 *                     initialized.
 *
 *       pppL_C[0:NP-1][0:NP-1][0:1]
 *                     An output correlation array containing the cross
 *                     correlations of the input signal. It is a square
 *                     matrix which is not symmetric. All its elements
 *                     are initialized, for the third dimension index = 0.
 *
 *       pL_R0         Average normalized signal power over F_LEN
 *                     samples, given by 0.5*(Phi(0,0)+Phi(NP,NP)), where
 *                     Phi(0,0) and Phi(NP,NP) are normalized signal
 *                     autocorrelations.  The average unnormalized signal
 *                     power over the frame is given by adjusting L_R0 by
 *                     the shift count which is returned. pL_R0 along
 *                     with the returned shift count are the inputs to
 *                     the frame energy quantizer.
 *
 *        Longword pL_VadAcf[4]
 *                     An array with the autocorrelation coefficients to be
 *                     used by the VAD.
 *
 *        Shortword *pswVadScalAuto
 *                     Input scaling factor used by the VAD.
 *
 *    RETURN:
 *
 *       swNormPwr     The shift count to be applied to pL_R0 for
 *                     reconstructing the average unnormalized
 *                     signal power over the frame.
 *                     Negative shift count means that a left shift was
 *                     applied to the correlations to achieve a normalized
 *                     value of pL_R0.
 *
 *   DESCRIPTION:
 *
 *
 *      The input energy of the signal is assumed unknown.  It maximum
 *      can be F_LEN*0.5. The 0.5 factor accounts for scaling down of the
 *      input signal in the high-pass filter.  Therefore the signal is
 *      shifted down by 3 shifts producing an energy reduction of 2^(2*3)=64.
 *      The resulting energy is then normalized.  Based on the shift count,
 *      the correlations F, B, and C are computed using as few shifts as
 *      possible, so a precise result is attained.
 *      This is an implementation of equations: 2.1 through 2.11.
 *
 *   REFERENCE:  Sub-clause 4.1.3 of GSM Recommendation 06.20
 *
 *   keywords: energy, autocorrelation, correlation, cross-correlation
 *   keywords: spectral smoothing, SST, LPC, FLAT, flat
 *
 *************************************************************************/

Shortword cov32(Shortword pswIn[],
                       Longword pppL_B[NP][NP][2],
                       Longword pppL_F[NP][NP][2],
                       Longword pppL_C[NP][NP][2],
                       Longword *pL_R0,
                       Longword pL_VadAcf[],
                       Shortword *pswVadScalAuto)
{

/*_________________________________________________________________________
 |                                                                         |
 |                            Automatic Variables                          |
 |_________________________________________________________________________|
*/

  Longword L_max,
         L_Pwr0,
         L_Pwr,
         L_temp,
         pL_Phi[NP + 1];
  Shortword swTemp,
         swNorm,
         swNormSig,
         swNormPwr,
         pswInScale[A_LEN],
         swPhiNorm;
  short int i,
         k,
         kk,
         n;

/*_________________________________________________________________________
 |                                                                         |
 |                              Executable Code                            |
 |_________________________________________________________________________|
*/

  /* Calculate energy in the frame vector (160 samples) for each   */
  /* of NP frame placements. The energy is reduced by 64. This is  */
  /* accomplished by shifting the input right by 3 bits. An offset */
  /* of 0x117f0b is placed into the accumulator to account for     */
  /* the worst case power gain due to the 3 LSB's of the input     */
  /* signal which were right shifted. The worst case is that the   */
  /* 3 LSB's were all set to 1 for each of the samples. Scaling of */
  /* the input by a half is assumed here.                          */
  /*---------------------------------------------------------------*/

  L_max = 0;
  for (L_Pwr = 0x117f0b, i = 0; i < F_LEN; i++)
  {
    swTemp = shr(pswIn[i], 3);
    L_Pwr = L_mac(L_Pwr, swTemp, swTemp);
  }
  L_max |= L_Pwr;

  /* L_max tracks the maximum power over NP window placements */
  /*----------------------------------------------------------*/

  for (i = 1; i <= NP; i++)
  {

    /* Subtract the power due to 1-st sample from previous window
     * placement. */
    /*-----------------------------------------------------------*/

    swTemp = shr(pswIn[i - 1], 3);
    L_Pwr = L_msu(L_Pwr, swTemp, swTemp);

    /* Add the power due to new sample at the current window placement. */
    /*------------------------------------------------------------------*/

    swTemp = shr(pswIn[F_LEN + i - 1], 3);
    L_Pwr = L_mac(L_Pwr, swTemp, swTemp);

    L_max |= L_Pwr;

  }

  /* Compute the shift count needed to achieve normalized value */
  /* of

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本大道久久a久久精二百| 日韩一区精品视频| 精品日韩在线一区| 91精品国产综合久久久久| 69堂精品视频| 日韩一区二区三区观看| 日韩欧美视频在线| 久久久久久久久久久黄色| 精品国产伦一区二区三区免费 | 久久久亚洲精品石原莉奈| 欧美tk丨vk视频| 久久婷婷国产综合国色天香| 久久网站热最新地址| 国产精品无遮挡| 亚洲一区在线观看免费观看电影高清 | 91九色02白丝porn| 在线日韩国产精品| 欧美欧美欧美欧美首页| 欧美一区国产二区| 久久久亚洲午夜电影| 中文字幕制服丝袜成人av| 亚洲丝袜精品丝袜在线| 亚洲一区二区精品久久av| 青青草97国产精品免费观看| 国产精品一区三区| 色噜噜夜夜夜综合网| 91精品国产一区二区三区香蕉| 久久久久亚洲蜜桃| 一区二区成人在线观看| 奇米影视7777精品一区二区| 国产99精品国产| 欧美三级三级三级| 欧美国产日本韩| 婷婷激情综合网| zzijzzij亚洲日本少妇熟睡| 欧美高清视频www夜色资源网| 久久综合网色—综合色88| 亚洲自拍偷拍网站| 国产精品夜夜嗨| 欧美一级欧美三级| 亚洲夂夂婷婷色拍ww47| 国产电影精品久久禁18| 欧美日韩日日骚| 亚洲欧洲av另类| 国产美女av一区二区三区| 欧美日高清视频| 亚洲欧洲日产国产综合网| 国内精品伊人久久久久av影院| 色哟哟一区二区| 国产精品色哟哟网站| 久久精品99国产精品| 在线欧美小视频| 国产欧美一区二区精品秋霞影院| 午夜在线电影亚洲一区| 99re免费视频精品全部| 久久久久88色偷偷免费| 亚洲.国产.中文慕字在线| 色综合久久久网| 中文字幕一区二区视频| 国产精品资源在线看| 日韩女优制服丝袜电影| 亚洲一区二区四区蜜桃| 99re热视频精品| 中文字幕在线不卡一区二区三区| 国产成人午夜电影网| 精品蜜桃在线看| 久久99国产精品尤物| 日韩欧美在线一区二区三区| 亚洲h在线观看| 欧美美女视频在线观看| 亚洲va欧美va人人爽午夜 | 亚洲福利视频三区| 日本电影欧美片| 亚洲影视在线播放| 欧美日本在线播放| 亚洲高清免费观看| 欧美一区二区女人| 日韩精品亚洲一区| 欧美一区二区三区在线视频| 日精品一区二区| 日韩欧美一级特黄在线播放| 麻豆91免费看| 国产日韩一级二级三级| 不卡欧美aaaaa| 亚洲另类在线视频| 欧美色国产精品| 开心九九激情九九欧美日韩精美视频电影| 欧美精选午夜久久久乱码6080| 日韩影视精彩在线| 久久综合久久综合亚洲| 成人午夜电影小说| 亚洲一区二区美女| 精品免费日韩av| 成人激情黄色小说| 亚洲精品免费视频| 91精品久久久久久久久99蜜臂| 免费人成黄页网站在线一区二区| 亚洲精品在线三区| 91麻豆6部合集magnet| 亚洲午夜久久久久中文字幕久| 91精品国产综合久久久蜜臀图片 | 日日摸夜夜添夜夜添精品视频| 欧美一区二区免费| 99视频一区二区| 免费在线观看一区二区三区| 国产视频一区二区在线| 欧美日韩国产片| 国产一区二区免费在线| 亚洲女与黑人做爰| www国产成人免费观看视频 深夜成人网| 成人性色生活片| 日产国产欧美视频一区精品| 国产精品免费久久| 欧美久久一二区| 91在线视频网址| 精品亚洲成av人在线观看| 一区二区三区在线免费视频| 日韩午夜av电影| 欧美最新大片在线看| 国产一区二区三区黄视频 | 日韩欧美精品三级| 在线亚洲一区二区| 粉嫩高潮美女一区二区三区| 偷拍一区二区三区| 亚洲日本一区二区| 国产欧美日韩在线观看| 欧美一区二区久久久| 日本道色综合久久| www.欧美色图| 国产精品夜夜嗨| 国产精品一二三四| 精品国产精品网麻豆系列| 国产一区二区三区四区五区入口| 中文字幕一区二区5566日韩| 91精品国产全国免费观看| 成人精品免费看| 久久国内精品自在自线400部| 国产一区二区0| 丁香五精品蜜臀久久久久99网站 | av激情成人网| 在线观看中文字幕不卡| 久久久久久久精| 26uuu色噜噜精品一区| 久久久久久久久蜜桃| 国产欧美一区视频| 亚洲少妇最新在线视频| 亚洲综合一二区| 另类小说图片综合网| 国产一区二区精品久久| 色8久久精品久久久久久蜜| 欧美亚洲国产一区二区三区| 日韩欧美视频在线| 亚洲天堂中文字幕| 蜜桃91丨九色丨蝌蚪91桃色| proumb性欧美在线观看| 欧美午夜电影网| wwwwww.欧美系列| 亚洲欧美另类久久久精品2019| 五月天精品一区二区三区| 国产成人精品一区二 | 99视频热这里只有精品免费| 欧美精品一卡两卡| 国产精品久久久久久亚洲毛片 | 国产成人鲁色资源国产91色综| 色狠狠桃花综合| 欧美xxxx老人做受| 亚洲午夜激情av| 91小视频在线免费看| 国产日韩在线不卡| 久久黄色级2电影| 欧美日韩久久不卡| 亚洲免费在线看| 成人一级片网址| 久久只精品国产| 久久99精品视频| 5566中文字幕一区二区电影| 一区二区三区欧美在线观看| 国产激情视频一区二区三区欧美 | 亚洲国产视频一区二区| 成人不卡免费av| 国产婷婷色一区二区三区四区| 五月天视频一区| 一本大道综合伊人精品热热| 国产日韩欧美一区二区三区乱码| 免费在线成人网| 欧美日韩在线免费视频| 亚洲欧美另类小说| 91年精品国产| 国产精品欧美经典| 九九国产精品视频| 欧美日韩精品三区| 亚洲欧洲精品一区二区三区 | 中国av一区二区三区| 国产自产高清不卡| 欧美精品vⅰdeose4hd| 成人欧美一区二区三区小说| 久久99精品久久久久| 精品欧美乱码久久久久久1区2区| 日本亚洲三级在线| 欧美卡1卡2卡|