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

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

?? vad.c

?? GSM中半速率語音編解碼源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:

  /*** Test if prediction error is smaller than threshold ***/

  swTemp = sub(swPredErr, 1464);

  if (swTemp < 0)
    *pswTone = 1;

}

/****************************************************************************
 *
 *     FUNCTION:  threshold_adaptation
 *
 *     VERSION:   1.2
 *
 *     PURPOSE:   Evaluates the secondary VAD decision.  If speech is not
 *                present then the noise model rvad and adaptive threshold
 *                thvad are updated.
 *
 *     INPUTS:    swStat        flag to indicate spectral stationarity
 *                swPtch        flag to indicate a periodic signal component
 *                swTone        flag to indicate a tone signal component
 *                pswRav1[0..8] ACF obtained from l_av1
 *                swNormRav1    r_av1 scaling factor
 *                swM_pvad      mantissa of filtered signal energy
 *                swE_pvad      exponent of filtered signal energy
 *                swM_acf0      mantissa of signal frame energy
 *                swE_acf0      exponent of signal frame energy
 *
 *     OUTPUTS:   pswRvad[0..8] autocorrelated adaptive filter coefficients
 *                pswNormRvad   rvad scaling factor
 *                pswM_thvad    mantissa of decision threshold
 *                pswE_thvad    exponent of decision threshold
 *
 ***************************************************************************/

void   threshold_adaptation(Shortword swStat,
                                   Shortword swPtch,
                                   Shortword swTone,
                                   Shortword pswRav1[],
                                   Shortword swNormRav1,
                                   Shortword swM_pvad,
                                   Shortword swE_pvad,
                                   Shortword swM_acf0,
                                   Shortword swE_acf0,
                                   Shortword pswRvad[],
                                   Shortword *pswNormRvad,
                                   Shortword *pswM_thvad,
                                   Shortword *pswE_thvad)
{

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

  Longword
         L_temp;

  Shortword
         swTemp,
         swComp,
         swComp2,
         swM_temp,
         swE_temp;

  int
         i;


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

  swComp = 0;

  /*** Test if acf0 < pth; if yes set thvad to plev ***/

  if (swE_acf0 < E_PTH)
    swComp = 1;
  if ((swE_acf0 == E_PTH) && (swM_acf0 < M_PTH))
    swComp = 1;

  if (swComp == 1)
  {
    *pswE_thvad = E_PLEV;
    *pswM_thvad = M_PLEV;

    return;
  }


  /*** Test if an adaption is required ***/

  if (swPtch == 1)
    swComp = 1;
  if (swStat == 0)
    swComp = 1;
  if (swTone == 1)
    swComp = 1;

  if (swComp == 1)
  {
    swAdaptCount = 0;
    return;
  }


  /*** Increment adaptcount ***/

  swAdaptCount = add(swAdaptCount, 1);
  if (swAdaptCount <= 8)
    return;


  /*** computation of thvad-(thvad/dec) ***/

  *pswM_thvad = sub(*pswM_thvad, shr(*pswM_thvad, 5));

  if (*pswM_thvad < 0x4000)
  {
    *pswM_thvad = shl(*pswM_thvad, 1);
    *pswE_thvad = sub(*pswE_thvad, 1);
  }


  /*** computation of pvad*fac ***/

  L_temp = L_mult(swM_pvad, 20889);
  L_temp = L_shr(L_temp, 15);
  swE_temp = add(swE_pvad, 1);

  if (L_temp > 0x7fffL)
  {
    L_temp = L_shr(L_temp, 1);
    swE_temp = add(swE_temp, 1);
  }
  swM_temp = extract_l(L_temp);


  /*** test if thvad < pavd*fac ***/

  if (*pswE_thvad < swE_temp)
    swComp = 1;

  if ((*pswE_thvad == swE_temp) && (*pswM_thvad < swM_temp))
    swComp = 1;


  /*** compute minimum(thvad+(thvad/inc), pvad*fac) when comp = 1 ***/

  if (swComp == 1)
  {

    /*** compute thvad + (thvad/inc) ***/

    L_temp = L_add(L_deposit_l(*pswM_thvad),L_deposit_l(shr(*pswM_thvad, 4)));

    if (L_temp > 0x7fffL)
    {
      *pswM_thvad = extract_l(L_shr(L_temp, 1));
      *pswE_thvad = add(*pswE_thvad, 1);
    }
    else
      *pswM_thvad = extract_l(L_temp);

    swComp2 = 0;

    if (swE_temp < *pswE_thvad)
      swComp2 = 1;

    if ((swE_temp == *pswE_thvad) && (swM_temp < *pswM_thvad))
      swComp2 = 1;

    if (swComp2 == 1)
    {
      *pswE_thvad = swE_temp;
      *pswM_thvad = swM_temp;
    }
  }


  /*** compute pvad + margin ***/

  if (swE_pvad == E_MARGIN)
  {
    L_temp = L_add(L_deposit_l(swM_pvad), L_deposit_l(M_MARGIN));
    swM_temp = extract_l(L_shr(L_temp, 1));
    swE_temp = add(swE_pvad, 1);
  }
  else
  {
    if (swE_pvad > E_MARGIN)
    {
      swTemp = sub(swE_pvad, E_MARGIN);
      swTemp = shr(M_MARGIN, swTemp);
      L_temp = L_add(L_deposit_l(swM_pvad), L_deposit_l(swTemp));

      if (L_temp > 0x7fffL)
      {
        swE_temp = add(swE_pvad, 1);
        swM_temp = extract_l(L_shr(L_temp, 1));
      }
      else
      {
        swE_temp = swE_pvad;
        swM_temp = extract_l(L_temp);
      }
    }
    else
    {
      swTemp = sub(E_MARGIN, swE_pvad);
      swTemp = shr(swM_pvad, swTemp);
      L_temp = L_add(L_deposit_l(M_MARGIN), L_deposit_l(swTemp));

      if (L_temp > 0x7fffL)
      {
        swE_temp = add(E_MARGIN, 1);
        swM_temp = extract_l(L_shr(L_temp, 1));
      }
      else
      {
        swE_temp = E_MARGIN;
        swM_temp = extract_l(L_temp);
      }
    }
  }

  /*** Test if thvad > pvad + margin ***/

  swComp = 0;

  if (*pswE_thvad > swE_temp)
    swComp = 1;

  if ((*pswE_thvad == swE_temp) && (*pswM_thvad > swM_temp))
    swComp = 1;

  if (swComp == 1)
  {
    *pswE_thvad = swE_temp;
    *pswM_thvad = swM_temp;
  }

  /*** Normalise and retain rvad[0..8] in memory ***/

  *pswNormRvad = swNormRav1;

  for (i = 0; i <= 8; i++)
    pswRvad[i] = pswRav1[i];

  /*** Set adaptcount to adp + 1 ***/

  swAdaptCount = 9;

}

/****************************************************************************
 *
 *     FUNCTION:  vad_decision
 *
 *     VERSION:   1.2
 *
 *     PURPOSE:   Computes the VAD decision based on the comparison of the
 *                floating point representations of pvad and thvad.
 *
 *     INPUTS:    swM_pvad      mantissa of filtered signal energy
 *                swE_pvad      exponent of filtered signal energy
 *                swM_thvad     mantissa of decision threshold
 *                swE_thvad     exponent of decision threshold
 *
 *     OUTPUTS:   pswVvad       vad decision before hangover is added
 *
 ***************************************************************************/

void   vad_decision(Shortword swM_pvad,
                           Shortword swE_pvad,
                           Shortword swM_thvad,
                           Shortword swE_thvad,
                           Shortword *pswVvad)
{

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

  *pswVvad = 0;

  if (swE_pvad > swE_thvad)
    *pswVvad = 1;
  if ((swE_pvad == swE_thvad) && (swM_pvad > swM_thvad))
    *pswVvad = 1;

}

/****************************************************************************
 *
 *     FUNCTION:  vad_hangover
 *
 *     VERSION:   1.2
 *
 *     PURPOSE:   Computes the final VAD decision for the current frame
 *                being processed.
 *
 *     INPUTS:    swVvad        vad decision before hangover is added
 *
 *     OUTPUTS:   pswVadFlag    vad decision after hangover is added
 *
 ***************************************************************************/

void   vad_hangover(Shortword swVvad,
                           Shortword *pswVadFlag)
{

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

  if (swVvad == 1)
    swBurstCount = add(swBurstCount, 1);
  else
    swBurstCount = 0;

  if (swBurstCount >= 3)
  {
    swHangCount = 5;
    swBurstCount = 3;
  }

  *pswVadFlag = swVvad;

  if (swHangCount >= 0)
  {
    *pswVadFlag = 1;
    swHangCount = sub(swHangCount, 1);
  }

}

/****************************************************************************
 *
 *     FUNCTION:  periodicity_update
 *
 *     VERSION:   1.2
 *
 *     PURPOSE:   Computes the ptch flag needed for the threshold
 *                adaptation decision for the next frame.
 *
 *     INPUTS:    pswLags[0..3]    speech encoder long term predictor lags
 *
 *     OUTPUTS:   pswPtch          Boolean voiced / unvoiced decision
 *
 ***************************************************************************/

void   periodicity_update(Shortword pswLags[4],
                                 Shortword *pswPtch)
{

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

  Shortword
         swMinLag,
         swMaxLag,
         swSmallLag,
         swLagCount,
         swTemp;

  int
         i,
         j;

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

  /*** Run loop for No. of sub-segments in the frame ***/

  swLagCount = 0;

  for (i = 0; i <= 3; i++)
  {
    /*** Search the maximum and minimum of consecutive lags ***/

    if (swOldLag > pswLags[i])
    {
      swMinLag = pswLags[i];
      swMaxLag = swOldLag;
    }
    else
    {
      swMinLag = swOldLag;
      swMaxLag = pswLags[i];
    }


    /*** Compute smallag (modulo operation not defined) ***/

    swSmallLag = swMaxLag;

    for (j = 0; j <= 2; j++)
    {
      if (swSmallLag >= swMinLag)
        swSmallLag = sub(swSmallLag, swMinLag);
    }


    /***  Minimum of smallag and minlag - smallag ***/

    swTemp = sub(swMinLag, swSmallLag);

    if (swTemp < swSmallLag)
      swSmallLag = swTemp;

    if (swSmallLag < 2)
      swLagCount = add(swLagCount, 1);


    /*** Save the current LTP lag ***/

    swOldLag = pswLags[i];
  }


  /*** Update the veryoldlagcount and oldlagcount ***/

  swVeryOldLagCount = swOldLagCount;
  swOldLagCount = swLagCount;


  /*** Make ptch decision ready for next frame ***/

  swTemp = add(swOldLagCount, swVeryOldLagCount);

  if (swTemp >= 7)
    *pswPtch = 1;
  else
    *pswPtch = 0;

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
7777精品伊人久久久大香线蕉超级流畅 | 欧美图片一区二区三区| 国产美女主播视频一区| 久久爱www久久做| 日韩和欧美一区二区三区| 午夜日韩在线观看| 性欧美大战久久久久久久久| 亚洲一区在线免费观看| 夜夜嗨av一区二区三区中文字幕| 亚洲男人的天堂网| 亚洲精品国产精品乱码不99| 一区二区三区加勒比av| 亚洲大片精品永久免费| 亚洲成a人片综合在线| 日韩国产欧美三级| 麻豆精品在线视频| 国产精品一区一区三区| 国产99久久久精品| 91麻豆高清视频| 欧美午夜电影网| 欧美一级生活片| 久久久高清一区二区三区| 国产欧美一区二区精品性色超碰| 国产精品免费丝袜| 亚洲伊人色欲综合网| 日本va欧美va瓶| 国产成人aaa| 91色乱码一区二区三区| 欧美久久久一区| 欧美成人精品1314www| 中文字幕精品—区二区四季| 亚洲精品视频一区| 美女被吸乳得到大胸91| 国产成人午夜高潮毛片| 日本精品免费观看高清观看| 亚洲福利一区二区| 激情综合色播激情啊| 成人免费观看av| 欧美日韩一二三| 国产亚洲精品免费| 亚洲一区影音先锋| 久99久精品视频免费观看| 懂色av噜噜一区二区三区av| 日本伦理一区二区| 精品国产免费一区二区三区香蕉| 国产色爱av资源综合区| 亚洲一卡二卡三卡四卡| 国产激情一区二区三区| 欧美三级一区二区| 国产色产综合产在线视频| 亚洲国产精品久久人人爱| 国产精品一区二区你懂的| 色婷婷综合视频在线观看| 久久综合国产精品| 亚洲五码中文字幕| 成人动漫一区二区| 日韩欧美色电影| 亚洲一区二区三区四区中文字幕| 国产综合一区二区| 欧美日韩国产高清一区| 中文字幕高清不卡| 久久精品国内一区二区三区 | 精品福利一区二区三区免费视频| 专区另类欧美日韩| 国产福利一区二区| 日韩一区二区免费在线电影| 亚洲专区一二三| 99综合影院在线| 久久久久久日产精品| 日韩不卡免费视频| 欧美性做爰猛烈叫床潮| 国产精品久久久久久一区二区三区 | 91同城在线观看| 久久午夜羞羞影院免费观看| 亚洲国产一区二区在线播放| 99久久精品情趣| 国产欧美日本一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 在线精品国精品国产尤物884a| 中文字幕免费观看一区| 国产综合成人久久大片91| 制服丝袜日韩国产| 亚洲国产aⅴ天堂久久| 色欧美日韩亚洲| 最新国产成人在线观看| 风间由美一区二区三区在线观看 | 99这里只有久久精品视频| 久久美女艺术照精彩视频福利播放 | 午夜精品福利在线| 色婷婷av一区二区三区大白胸| 久久精品网站免费观看| 国产原创一区二区| 精品国产精品网麻豆系列| 麻豆精品视频在线观看视频| 欧美一区二区不卡视频| 日本免费新一区视频| 欧美丰满少妇xxxxx高潮对白| 亚洲午夜免费视频| 欧美性xxxxxxxx| 亚洲一二三级电影| 欧美日韩亚洲综合在线 | 91网站视频在线观看| 中文字幕亚洲欧美在线不卡| 成人app在线| 国产精品国产精品国产专区不蜜| 国产69精品久久久久毛片| 国产日韩精品一区二区三区在线| 国产精品一卡二卡| 国产欧美久久久精品影院| 成人免费毛片嘿嘿连载视频| 中文字幕中文乱码欧美一区二区| 成人黄色大片在线观看| 中文字幕制服丝袜成人av| 99精品视频一区二区三区| 亚洲精品成人在线| 精品污污网站免费看| 免费一级片91| 精品国产乱码91久久久久久网站| 国产高清精品在线| 自拍偷在线精品自拍偷无码专区 | 中文字幕一区二区三区在线观看| 99精品国产一区二区三区不卡| 亚洲精品视频自拍| 欧美美女bb生活片| 久久国产三级精品| 中文av一区二区| 色婷婷亚洲综合| 日产精品久久久久久久性色| 精品久久国产老人久久综合| 国产a视频精品免费观看| 亚洲欧洲成人精品av97| 欧美日韩午夜精品| 久热成人在线视频| 中文字幕在线不卡| 在线不卡一区二区| 国产成人免费9x9x人网站视频| 国产精品传媒视频| 91精品国产综合久久婷婷香蕉 | 日本道免费精品一区二区三区| 亚洲午夜精品17c| 欧美成人激情免费网| 波多野结衣中文字幕一区二区三区| 一区二区三区欧美亚洲| 日韩美女视频在线| 97久久久精品综合88久久| 日本美女一区二区三区视频| 国产精品午夜免费| 欧美一卡二卡三卡四卡| eeuss鲁一区二区三区| 日韩国产欧美三级| 1000部国产精品成人观看| 911精品国产一区二区在线| 国产a区久久久| 日韩精品乱码av一区二区| 中文字幕av资源一区| 制服丝袜亚洲播放| 97精品久久久久中文字幕| 另类成人小视频在线| 一区二区三区中文字幕| 久久99精品久久久久婷婷| 亚洲桃色在线一区| 2023国产精品自拍| 欧美三级电影一区| 不卡一区二区在线| 久久66热re国产| 午夜国产不卡在线观看视频| 国产精品免费久久| 欧美tickle裸体挠脚心vk| 欧美视频完全免费看| 成人动漫在线一区| 激情久久五月天| 亚洲国产精品久久久久婷婷884| 欧美激情一区二区| 日韩视频在线一区二区| 欧美色区777第一页| a级精品国产片在线观看| 激情综合网av| 男人的天堂亚洲一区| 玉足女爽爽91| 国产精品天美传媒| 精品成人佐山爱一区二区| 91精品午夜视频| 欧美午夜免费电影| 色综合久久久久综合体桃花网| 国产丶欧美丶日本不卡视频| 美女在线观看视频一区二区| 亚洲综合免费观看高清完整版 | 美女免费视频一区| 夜夜嗨av一区二区三区中文字幕 | 久久精品国产在热久久| 午夜精品一区二区三区电影天堂| 中文字幕在线一区| 国产精品久久精品日日| 欧美国产乱子伦| 久久久www免费人成精品| 久久综合狠狠综合久久激情| 精品久久久久久久久久久院品网| 欧美精选午夜久久久乱码6080| 欧美午夜电影网| 欧美日韩综合一区|