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

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

?? pitch.c

?? ITU-T G.729B標(biāo)準(zhǔn)源代碼編碼端
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*
   ITU-T G.729 Speech Coder ANSI-C Source Code
   Version 3.3    Last modified: December 26, 1995

   Copyright (c) 1996,
   AT&T, France Telecom, NTT, Universite de Sherbrooke, Lucent Technologies
   All rights reserved.
*/

/*---------------------------------------------------------------------------*
 * procedure Pitch_ol                                                        *
 * ~~~~~~~~~~~~~~~~~~                                                        *
 * Compute the open loop pitch lag.                                          *
 *                                                                           *
 *---------------------------------------------------------------------------*/

#include "typedef.h"
#include "basic_op.h"
#include "oper_32b.h"
#include "ld8k.h"
#include "tab_ld8k.h"

/* local function */

static Word16 Lag_max(        /* output: lag found                           */
  Word16 signal[],     /* input : signal used to compute the open loop pitch */
  Word16 L_frame,      /* input : length of frame to compute pitch           */
  Word16 lag_max,      /* input : maximum lag                                */
  Word16 lag_min,      /* input : minimum lag                                */
  Word16 *cor_max);    /* output: normalized correlation of selected lag     */


Word16 Pitch_ol(       /* output: open loop pitch lag                        */
   Word16 signal[],    /* input : signal used to compute the open loop pitch */
                       /*     signal[-pit_max] to signal[-1] should be known */
   Word16   pit_min,   /* input : minimum pitch lag                          */
   Word16   pit_max,   /* input : maximum pitch lag                          */
   Word16   L_frame    /* input : length of frame to compute pitch           */
)
{
  Word16  i, j;
  Word16  max1, max2, max3;
  Word16  p_max1, p_max2, p_max3;
  Word32  t0, L_temp;

  /* Scaled signal */

  Word16 scaled_signal[L_FRAME+PIT_MAX];
  Word16 *scal_sig;

  scal_sig = &scaled_signal[pit_max];

  /*--------------------------------------------------------*
   *  Verification for risk of overflow.                    *
   *--------------------------------------------------------*/

   Overflow = 0;
   t0 = 0;

   for(i= -pit_max; i< L_frame; i++)
     t0 = L_mac(t0, signal[i], signal[i]);

  /*--------------------------------------------------------*
   * Scaling of input signal.                               *
   *                                                        *
   *   if Overflow        -> scal_sig[i] = signal[i]>>3     *
   *   else if t0 < 1^20  -> scal_sig[i] = signal[i]<<3     *
   *   else               -> scal_sig[i] = signal[i]        *
   *--------------------------------------------------------*/

   if(Overflow == 1)
   {
     for(i=-pit_max; i<L_frame; i++)
       scal_sig[i] = shr(signal[i], 3);
   }
   else {
     L_temp = L_sub(t0, (Word32)1048576L);
     if ( L_temp < (Word32)0 )  /* if (t0 < 2^20) */
     {
        for(i=-pit_max; i<L_frame; i++)
          scal_sig[i] = shl(signal[i], 3);
     }
     else
     {
       for(i=-pit_max; i<L_frame; i++)
         scal_sig[i] = signal[i];
     }
   }
  /*--------------------------------------------------------------------*
   *  The pitch lag search is divided in three sections.                *
   *  Each section cannot have a pitch multiple.                        *
   *  We find a maximum for each section.                               *
   *  We compare the maximum of each section by favoring small lag.     *
   *                                                                    *
   *  First section:  lag delay = pit_max     downto 4*pit_min          *
   *  Second section: lag delay = 4*pit_min-1 downto 2*pit_min          *
   *  Third section:  lag delay = 2*pit_min-1 downto pit_min            *
   *--------------------------------------------------------------------*/


   j = shl(pit_min, 2);
   p_max1 = Lag_max(scal_sig, L_frame, pit_max, j, &max1);

   i = sub(j, 1); j = shl(pit_min, 1);
   p_max2 = Lag_max(scal_sig, L_frame, i, j, &max2);

   i = sub(j, 1);
   p_max3 = Lag_max(scal_sig, L_frame, i, pit_min , &max3);

  /*--------------------------------------------------------------------*
   * Compare the 3 sections maximum, and favor small lag.               *
   *--------------------------------------------------------------------*/

  if( sub(mult(max1, THRESHPIT), max2)  < 0)
  {
    max1 = max2;
    p_max1 = p_max2;
  }

  if( sub(mult(max1, THRESHPIT), max3)  < 0)
  {
    p_max1 = p_max3;
  }


  return (p_max1);
}

/*---------------------------------------------------------------------------*
 * procedure Lag_max                                                         *
 * ~~~~~~~~~~~~~~~~~                                                         *
 * Find the lag that has maximum correlation with scal_sig[]                 *
 *                                                                           *
 *---------------------------------------------------------------------------*
 * arguments:                                                                *
 *                                                                           *
 *   signal[]   :Signal used to compute the open loop pitch.                 *
 *   L_frame    :Length of frame to compute pitch.                           *
 *   lag_max    :Maximum lag                                                 *
 *   lag_min    :Minimum lag                                                 *
 *   *cor_max   ;Maximum of normalized correlation of lag found.             *
 *                                                                           *
 *   Return lag found.                                                       *
 *--------------------------------------------------------------------------*/

static Word16 Lag_max( /* output: lag found                                  */
  Word16 signal[],     /* input : signal used to compute the open loop pitch */
  Word16 L_frame,      /* input : length of frame to compute pitch           */
  Word16 lag_max,      /* input : maximum lag                                */
  Word16 lag_min,      /* input : minimum lag                                */
  Word16 *cor_max)     /* output: normalized correlation of selected lag     */
{
  Word16  i, j;
  Word16  *p, *p1;
  Word32  max, t0, L_temp;
  Word16  max_h, max_l, ener_h, ener_l;
  Word16  p_max;

  max = MIN_32;

   /* initialization used only to suppress Microsoft Visual C++  warnings */

  p_max = lag_max;

  for (i = lag_max; i >= lag_min; i--)
  {
    p  = signal;
    p1 = &signal[-i];
    t0 = 0;

    for (j=0; j<L_frame; j++, p++, p1++)
      t0 = L_mac(t0, *p, *p1);

    L_temp = L_sub(t0,max);
    if (L_temp >= 0L)
    {
      max    = t0;
      p_max = i;
    }
  }

  /* compute energy */

  t0 = 0;
  p = &signal[-p_max];
  for(i=0; i<L_frame; i++, p++)
    t0 = L_mac(t0, *p, *p);

  /* 1/sqrt(energy),    result in Q30 */

  t0 = Inv_sqrt(t0);

  /* max = max/sqrt(energy)                   */
  /* This result will always be on 16 bits !! */

  L_Extract(max, &max_h, &max_l);
  L_Extract(t0, &ener_h, &ener_l);

  t0 = Mpy_32(max_h, max_l, ener_h, ener_l);
  *cor_max = extract_l(t0);

  return(p_max);
}

/*--------------------------------------------------------------------------*
 * Function  Pitch_fr3()                                                    *
 * ~~~~~~~~~~~~~~~~~~~~~                                                    *
 * Find the pitch period with 1/3 subsample resolution.                     *
 *--------------------------------------------------------------------------*/

        /* Local functions */

static void Norm_Corr(Word16 exc[], Word16 xn[], Word16 h[], Word16 L_subfr,
                      Word16 t_min, Word16 t_max, Word16 corr_norm[]);


Word16 Pitch_fr3(    /* (o)     : pitch period.                          */
  Word16 exc[],      /* (i)     : excitation buffer                      */
  Word16 xn[],       /* (i)     : target vector                          */
  Word16 h[],        /* (i) Q12 : impulse response of filters.           */
  Word16 L_subfr,    /* (i)     : Length of subframe                     */
  Word16 t0_min,     /* (i)     : minimum value in the searched range.   */
  Word16 t0_max,     /* (i)     : maximum value in the searched range.   */
  Word16 i_subfr,    /* (i)     : indicator for first subframe.          */
  Word16 *pit_frac   /* (o)     : chosen fraction.                       */
)
{
  Word16 i;
  Word16 t_min, t_max;
  Word16 max, lag, frac;
  Word16 *corr;
  Word16 corr_int;
  Word16 corr_v[40];           /* Total length = t0_max-t0_min+1+2*L_INTER */


  /* Find interval to compute normalized correlation */

  t_min = sub(t0_min, L_INTER4);
  t_max = add(t0_max, L_INTER4);

  corr = &corr_v[-t_min];

  /* Compute normalized correlation between target and filtered excitation */

  Norm_Corr(exc, xn, h, L_subfr, t_min, t_max, corr);

  /* Find integer pitch */

  max = corr[t0_min];
  lag = t0_min;

  for(i= t0_min+(Word16)1; i<=t0_max; i++)
  {
    if( sub(corr[i], max) >= 0)
    {
      max = corr[i];
      lag = i;
    }
  }

  /* If first subframe and lag > 84 do not search fractional pitch */

  if( (i_subfr == 0) && (sub(lag, 84) > 0) )
  {
    *pit_frac = 0;
    return(lag);
  }

  /* Test the fractions around T0 and choose the one which maximizes   */
  /* the interpolated normalized correlation.                          */

  max  = Interpol_3(&corr[lag], -2);
  frac = -2;

  for (i = -1; i <= 2; i++)
  {
    corr_int = Interpol_3(&corr[lag], i);
    if (sub(corr_int, max) > 0)
    {
      max = corr_int;
      frac = i;
    }
  }

  /* limit the fraction value between -1 and 1 */

  if (sub(frac, -2) == 0)
  {
    frac = 1;
    lag = sub(lag, 1);
  }
  if (sub(frac, 2) == 0)
  {
    frac = -1;
    lag = add(lag, 1);
  }

  *pit_frac = frac;


  return(lag);
}

/*---------------------------------------------------------------------------*
 * Function Norm_Corr()                                                      *
 * ~~~~~~~~~~~~~~~~~~~~                                                      *
 * Find the normalized correlation between the target vector and the         *
 * filtered past excitation.                                                 *
 *---------------------------------------------------------------------------*
 * Input arguments:                                                          *
 *     exc[]    : excitation buffer                                          *
 *     xn[]     : target vector                                              *
 *     h[]      : impulse response of synthesis and weighting filters (Q12)  *
 *     L_subfr  : Length of subframe                                         *

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品噜噜噜噜久久久久久久久试看 | 日韩av一二三| 精品视频在线视频| 亚洲成人一二三| 欧美一区二区三区视频免费| 极品尤物av久久免费看| 国产三级久久久| 99精品视频在线免费观看| 一区二区三区不卡在线观看| 欧美日韩亚洲综合在线| 日欧美一区二区| 久久久久久久久伊人| 99精品视频在线观看免费| 亚洲电影在线免费观看| 日韩女优av电影在线观看| 丁香婷婷深情五月亚洲| 亚洲一级二级在线| 久久影院午夜论| 色综合一区二区| 蜜臀久久99精品久久久久久9| 久久蜜桃一区二区| 色欧美乱欧美15图片| 奇米精品一区二区三区四区| 国产视频一区不卡| 欧美日韩国产电影| 高清久久久久久| 水蜜桃久久夜色精品一区的特点| 久久亚洲一级片| 精品视频在线免费看| 丁香亚洲综合激情啪啪综合| 亚洲国产精品视频| 国产区在线观看成人精品| 在线观看91精品国产入口| 韩国av一区二区三区在线观看| 最新高清无码专区| 精品久久久久久久久久久久久久久久久| 成人动漫一区二区三区| 日韩高清一区二区| 亚洲码国产岛国毛片在线| 精品粉嫩aⅴ一区二区三区四区| 日韩精品一区二区三区中文不卡| 成人中文字幕合集| 水野朝阳av一区二区三区| 亚洲丝袜制服诱惑| 国产日韩欧美精品综合| 欧美一区二区在线视频| 在线视频综合导航| 99久久国产免费看| 国产激情一区二区三区桃花岛亚洲 | 91视频在线看| 国产中文字幕精品| 爽好久久久欧美精品| 亚洲欧美一区二区三区久本道91| 久久综合色8888| 欧美精品日日鲁夜夜添| 色国产精品一区在线观看| 国产成人福利片| 国产一区二区三区免费播放| 日韩一区欧美二区| 午夜精品久久久久影视| 亚洲毛片av在线| 一区二区在线电影| 亚洲免费在线播放| 综合中文字幕亚洲| 国产精品白丝在线| 国产精品久久久久久久久免费樱桃 | 欧美精品第1页| 欧美亚洲日本国产| 在线观看亚洲精品视频| 91亚洲精华国产精华精华液| 99久久综合精品| 99在线精品一区二区三区| 成人黄色综合网站| 不卡av在线网| av午夜精品一区二区三区| 北条麻妃一区二区三区| hitomi一区二区三区精品| 成人av集中营| 91最新地址在线播放| 色婷婷综合久久久久中文一区二区| 成人国产免费视频| 97精品电影院| 91行情网站电视在线观看高清版| 欧美中文字幕一区| 欧美日韩精品欧美日韩精品一| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 色婷婷av一区二区三区大白胸 | 91精品国产色综合久久不卡电影| 欧美日本韩国一区| 欧美一二三在线| 精品国产百合女同互慰| 久久精品视频一区| 国产精品久久久久婷婷| 一区二区成人在线视频| 亚洲国产精品天堂| 久久精品国产一区二区| 国产精品资源在线| 不卡一卡二卡三乱码免费网站| 色婷婷av一区二区三区之一色屋| 欧美久久一二三四区| 精品成人一区二区三区| 国产精品伦一区二区三级视频| 亚洲伦在线观看| 丝袜亚洲精品中文字幕一区| 国产一区二区不卡老阿姨| 成人午夜免费电影| 欧美精品1区2区3区| 国产亚洲一区字幕| 国产伦理精品不卡| eeuss鲁片一区二区三区| 欧美日韩亚洲综合一区| 久久一留热品黄| 亚洲乱码国产乱码精品精可以看 | 日本一区二区三区久久久久久久久不| 国产精品久久看| 日日噜噜夜夜狠狠视频欧美人| 国产成人啪午夜精品网站男同| 色88888久久久久久影院按摩| 日韩午夜在线观看| 中文字幕国产一区| 日韩精品乱码av一区二区| 高清免费成人av| 91精品国产aⅴ一区二区| 日本一区二区动态图| 丝袜亚洲精品中文字幕一区| www.亚洲色图.com| 日韩一区二区免费电影| 亚洲欧美激情小说另类| 精品一区二区国语对白| 欧美亚洲高清一区二区三区不卡| 精品国产乱码久久久久久浪潮 | 日韩一区二区三区av| 亚洲欧美韩国综合色| 国产一区二区不卡| 91精品国产综合久久精品性色| 中文字幕制服丝袜一区二区三区| 久久国产精品99久久人人澡| 一本一道综合狠狠老| 国产日韩综合av| 麻豆国产一区二区| 欧美日韩亚洲综合一区| 亚洲欧美日韩一区| 国产精品1区二区.| 日韩午夜av电影| 亚洲不卡在线观看| 在线视频你懂得一区| 亚洲色大成网站www久久九九| 国产成人a级片| 久久伊人蜜桃av一区二区| 日韩激情av在线| 欧美日韩aaaaa| 亚洲图片有声小说| 欧美最新大片在线看| 亚洲精品成人少妇| 91亚洲永久精品| 亚洲欧美日韩国产成人精品影院| 成人18视频日本| 18成人在线视频| av一区二区三区四区| 国产精品久久久久久久久动漫| 懂色av中文一区二区三区| 久久久国产精华| 国产成人三级在线观看| 国产欧美精品在线观看| 国产寡妇亲子伦一区二区| 久久久精品蜜桃| 国产99久久久国产精品免费看| 欧美国产视频在线| va亚洲va日韩不卡在线观看| 亚洲欧洲综合另类在线| 91蜜桃网址入口| 亚洲一区二区在线视频| 在线观看网站黄不卡| 香蕉成人啪国产精品视频综合网| 欧美日韩国产影片| 麻豆精品视频在线观看视频| 精品久久久久99| 国产精品99久久久久久有的能看| 日本一区二区三区在线不卡| 成人免费毛片aaaaa**| 亚洲欧美二区三区| 欧美三级韩国三级日本一级| 日本人妖一区二区| 精品国内片67194| 不卡免费追剧大全电视剧网站| 亚洲精品成人a在线观看| 69精品人人人人| 国产在线一区二区综合免费视频| 国产欧美视频一区二区| 色天使色偷偷av一区二区| 日本不卡视频在线观看| 国产亚洲制服色| 91国产免费看| 美女性感视频久久| 国产精品少妇自拍| 欧美日韩一区小说| 国产在线不卡一区| 一个色妞综合视频在线观看| 日韩精品自拍偷拍| 波多野结衣视频一区|