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

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

?? iir-lib.c

?? Reference Implementation of G.711 standard and other voice codecs
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*                                                           v3.1 - 22/Feb/1996  =============================================================================                          U    U   GGG    SSSS  TTTTT                          U    U  G       S       T                          U    U  G  GG   SSSS    T                          U    U  G   G       S   T                           UUU     GG     SSS     T                   ========================================                    ITU-T - USER'S GROUP ON SOFTWARE TOOLS                   ========================================       =============================================================       COPYRIGHT NOTE: This source code, and all of its derivations,       is subject to the "ITU-T General Public License". Please have       it  read  in    the  distribution  disk,   or  in  the  ITU-T       Recommendation G.191 on "SOFTWARE TOOLS FOR SPEECH AND  AUDIO       CODING STANDARDS".       =============================================================MODULE:         IIR-LIB.C, IIR FILTER MODULE		Sub-unit with basic filtering routinesORIGINAL BY:          Rudolf Hofmann (Parallel form)	  PHILIPS KOMMUNIKATIONS INDUSTRIE 	  Kommunikationssysteme         Phone : +49 911 526-2603	  Thurn-und-Taxis-Strasse 14    FAX   : +49 911 526-3385	  D-8500 Nuernberg 10 (Germany) EMail : hf@pkinbg.uucp          Simao Ferraz de Campos Neto (Cascade and direct form)	  Comsat Laboratories                  Tel:    +1-301-428-4516	  22300 Comsat Drive                   Fax:    +1-301-428-9287	  Clarksburg MD 20871 - USA            E-mail: simao@ctd.comsat.comDESCRIPTION:        This file contains functions for running an IIR-filter with         coefficients in the parallel or the cascade (bi-quad) form.FUNCTIONS    : - stdpcm_kernel(...)   =  parallel-form IIR filter (kernel)               - stdpcm_reset(...)    =  clear parallel state variables                                         (needed only if another signal                                          should be processed with the                                          same filter)               - stdpcm_free(...)     =  deallocate parallel filter memory	       - cascade_iir_kernel(...) = cascade-form IIR filter (kernel)	       - cascade_iir_free(...) = deallocate cascade filter memory	       - cascade_iir_reset(...) = clear cascade state variables	       - direct_iir_kernel(...) = direct-form IIR filter (kernel)	       - direct_iir_free(...) = deallocate direct filter memory	       - direct_iir_reset(...) = clear direct state variablesHISTORY:    16.Dec.91 v0.1 First beta-version <hf@pkinbg.uucp>    28.Feb.92 v1.0 Release of 1st version to UGST <hf@pkinbg.uucp>    30.Oct.94 v2.0 Broken into sub-units; added cascade-form IIR filtering.                   <simao@ctd.comsat.com>    31.Jul.95 v3.0 Added direct-form IIR filtering <simao@ctd.comsat.com>    22.Feb.96 v3.1 Changed inclusion of stdlib.h to inconditional, as                   suggested by Kirchherr (FI/DBP Telekom) to run under		   OpenVMS/AXP <simao@ctd.comsat.com>  =============================================================================*//* * ......... GENERAL INCLUDES ......... */#include <stdlib.h>		  /* General utility definitions */#include <math.h>		  /* RTL Math Function Declarations *//* Definitions for IIR filters */#include "iirflt.h"		  /* * ......... Local function *smart* prototypes ......... *//* Parallel-form filtering basic function prototypes */static long scd_parallel_form_iir_down_kernel ARGS((long lenx, float *x, 			 float *y, long *k0, long idown, long nblocks,                          double direct_cof, double gain, float (*b)[3],                          float (*c)[2], float (*T)[2]));static long scd_parallel_form_iir_up_kernel ARGS((long lenx, float *x, 			 float *y, long iup, long nblocks, double direct_cof, 			 double gain, float (*b)[3], float (*c)[2], 			 float (*T)[2]));SCD_IIR *scd_stdpcm_init ARGS((long nblocks, float (*b)[3], float (*c)[2],                          double direct_cof, double gain, long idown,                          int hswitch));long cascade_iir_kernel ARGS((long lseg, float *x_ptr, CASCADE_IIR *iir_ptr,                          float *y_ptr));/* Cascade-form filtering basic function prototypes */static long cascade_form_iir_down_kernel ARGS((long lenx, float *x, float *y,                          long *k0, long idown, long nblocks, double gain,                          float (*a)[2], float (*b)[2], float (*T)[4]));static long cascade_form_iir_up_kernel ARGS((long lenx, float *x, float *y,                          long iup, long nblocks, double gain, float (*a)[2],                          float (*b)[2], float (*T)[4]));CASCADE_IIR *cascade_iir_init ARGS((long nblocks, float (*a)[2], float (*b)[2],                         double gain, long idown, int hswitch));/* Direct-form filtering basic function prototypes */long direct_iir_kernel ARGS((long lseg, float *x_ptr, DIRECT_IIR *iir_ptr,                          float *y_ptr));static long direct_form_iir_down_kernel ARGS((long lenx, float *x, float *y,                          long *k0, long idown, long zno, long pno, 			 double gain, float *a, float *b, float (*T)[2]));static long direct_form_iir_up_kernel ARGS((long lenx, float *x, float *y,                          long iup, long zno, long pno, double gain,                          float *a, float *b, float (*T)[2]));DIRECT_IIR *direct_iir_init ARGS((long zno, long pno, float *a, float *b,                         double gain, long idown, int hswitch));/* * ...................... BEGIN OF FUNCTIONS ......................... *//*  ============================================================================        void stdpcm_free (SCD_IIR *iir_ptr);        ~~~~~~~~~~~~~~~~        Description:        ~~~~~~~~~~~~        Deallocate memory, which was allocated by an earlier call to one        of the initilization routines. `SCD_IIR *iir_prt' must not be        NULL.        Parameters:        ~~~~~~~~~~~        SCD_IIR *iir_ptr: ... pointer to struct SCD_IIR previously                              initialized by a call to one of the                              initialization routines.        Return value:        ~~~~~~~~~~~~~        Nothing.        Author: <hf@pkinbg.uucp>        ~~~~~~~        History:        ~~~~~~~~        28.Feb.92 v1.0 Release of 1st version <hf@pkinbg.uucp> ============================================================================*/void            stdpcm_free(iir_ptr)  SCD_IIR        *iir_ptr;{  free(iir_ptr->T);		  /* free state variables */  free(iir_ptr);		  /* free allocated struct */}/* ....................... End of stdpcm_free() ....................... *//*  ============================================================================        void stdpcm_reset (SCD_IIR *iir_ptr);        ~~~~~~~~~~~~~~~~~        Description:        ~~~~~~~~~~~~        Clear state variables in SCD_IIR structure, which have been        initialized by a previous call to one of the init functions.        Parameters:        ~~~~~~~~~~~        SCD_IIR *iir_ptr: ... pointer to struct SCD_IIR previously                              initialized by a call to one of the                              initialization routines.        Return value:        ~~~~~~~~~~~~~        Nothing.        Author: <hf@pkinbg.uucp>        ~~~~~~~        History:        ~~~~~~~~        28.Feb.92 v1.0 Release of 1st version <hf@pkinbg.uucp> ============================================================================*/void            stdpcm_reset(iir_ptr)  SCD_IIR        *iir_ptr;{  long            n;  float           (*T_ptr)[2];  T_ptr = iir_ptr->T;  for (n = 0; n < iir_ptr->nblocks; n++)  {    T_ptr[n][0] = 0.0;    T_ptr[n][1] = 0.0;  }  iir_ptr->k0 = iir_ptr->idown;	  /* modulo counter for down-sampling */}/* ....................... End of stdpcm_reset() ....................... *//*  ============================================================================        SCD_IIR *scd_stdpcm_init (long nblocks, float (*b)[3],        ~~~~~~~~~~~~~~~~~~~~~~~~  float (*c)[2], double direct_cof,                                  double gain, long idwnup,                                  char hswitch);        Description:        ~~~~~~~~~~~~        Allocate&initialize struct for parallel IIR down/up-sampling functions.        Parameters:        ~~~~~~~~~~~        long nblocks: ....... number of 2'nd order blocks        float (*b)[3]: ...... pointer to numerator coeffic.        float (*c)[3]: ...... pointer to denominator coeffic.        double direct_cof: .. direct path gain factor        double gain: ........ gain factor for filter        long idown: ......... Down-sampling factor        char hswitch: ....... to up-/downsampling routine        Return value:        ~~~~~~~~~~~~~        Returns a pointer to struct SCD_IIR;        Author: <hf@pkinbg.uucp>        ~~~~~~~        History:        ~~~~~~~~        28.Feb.92 v1.0 Release of 1st version <hf@pkinbg.uucp>        30.Oct.94 v2.0 Made visible (not static) after module broken into                        several sub-units <simao@ctd.comsat.com> ============================================================================*/SCD_IIR *scd_stdpcm_init(nblocks, b, c, direct_cof, gain, idown, hswitch)  long            nblocks;  float           (*b)[3], (*c)[2];  double          direct_cof, gain;  long            idown;  char            hswitch;{  static SCD_IIR *ptrIIR;	  /* pointer to the new struct */  float           fak;  float           (*T_ptr)[2];  long            n;  /* Allocate memory for a new struct */  if ((ptrIIR = (SCD_IIR *) malloc((long) sizeof(SCD_IIR))) == (SCD_IIR *) 0L)  {    return 0;  }  /* Allocate memory for state variables */  if ((ptrIIR->T = (float (*)[2]) malloc((nblocks * 2) * sizeof(fak)))      == (float (*)[2]) 0)  {    free(ptrIIR);    return 0;  }  /* fill coefficient sets */  ptrIIR->nblocks = nblocks;	  /* store number of 2'nd order blocks */  ptrIIR->b = b;  ptrIIR->c = c;  /* store down-sampling factor/gain/direct-path coefficient */  ptrIIR->idown = idown;  ptrIIR->gain = gain;  ptrIIR->direct_cof = direct_cof;  /* Store switch to IIR-kernel procedure */  ptrIIR->hswitch = hswitch;  /* Clear state variables */  T_ptr = ptrIIR->T;  for (n = 0; n < nblocks; n++)  {    T_ptr[n][0] = 0.0;    T_ptr[n][1] = 0.0;  }  ptrIIR->k0 = idown;		  /* modulo counter for down-sampling */  /* Exit returning pointer to struct */  return (ptrIIR);}/* ....................... End of scd_stdpcm_init() ....................... *//*  ============================================================================        long stdpcm_kernel (long lseg, float *x_ptr, SCD_IIR *iir_ptr,        ~~~~~~~~~~~~~~~~~~  float *y_ptr);        Description:        ~~~~~~~~~~~~        Standard PCM-filter.        Parameters:        ~~~~~~~~~~~        lseg: ...... number of input samples        x_ptr: ..... array with input samples        iir_ptr: ... pointer to IIR-struct (SCD_IIR *)        y_ptr: ..... output samples        Return value:        ~~~~~~~~~~~~~        Returns the number of output samples.        Author: <hf@pkinbg.uucp>        ~~~~~~~        History:        ~~~~~~~~        28.Feb.92 v1.0 Release of 1st version <hf@pkinbg.uucp> ============================================================================*/long            stdpcm_kernel(lseg, x_ptr, iir_ptr, y_ptr)  long            lseg;  float          *x_ptr;  SCD_IIR        *iir_ptr;  float          *y_ptr;{  if (iir_ptr->hswitch == 'U')    return      scd_parallel_form_iir_up_kernel(	/* returns number of output samples */				      lseg,	/* In   : length of input						 * signal */				      x_ptr,	/* In   : array with input						 * samples */				      y_ptr,	/* Out  : array with output						 * samples */				      iir_ptr->idown,	/* In  : downsampling							 * factor */				      iir_ptr->nblocks,	/* In  : number of							 * IIR-coefficients */				      iir_ptr->direct_cof,/* In: direct path							   * coefficient */				      iir_ptr->gain,	/* In  : gain factor */				      iir_ptr->b,	/* In  : direct path							 * coefficient */				      iir_ptr->c,	/* In  : array with							 * IIR-coefficients */				      iir_ptr->T	/* InOut: state							 * variables */      );  else    return      scd_parallel_form_iir_down_kernel(	/* returns number of output						 * samples */					lseg,	/* In   : length of input						 * signal */					x_ptr,	/* In   : array with input						 * samples */					y_ptr,	/* Out  : array with output						 * samples */					&(iir_ptr->k0),	/* InOut:starting index							 * in x-array */					iir_ptr->idown,	/* In   : downsampling							 * factor */					iir_ptr->nblocks,/* In   : number of							  * IIR-coefficients */					iir_ptr->direct_cof,/* In  : direct path							     * coefficient */					iir_ptr->gain,	/* In   : gain factor */					iir_ptr->b,	/* In   : direct path							 * coefficient */					iir_ptr->c,	/* In   : array w/							 * IIR-coefficients */					iir_ptr->T	/* InOut: state							 * variables */      );}/* ....................... End of stdpcm_kernel() ....................... *//*  ============================================================================        long scd_parallel_form_iir_down_kernel(long lenx, float *x,        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ float *y, long *k0,                                               long idown, long nblocks,                                               double direct_cof,                                               double gain, float (*b)[3],                                               float (*c)[2], float (*T)[2]);        Description:        ~~~~~~~~~~~~        Function for filtering a sequence of input samples by a        parallel-form IIR-filter with down-sampling.        Parameters:        ~~~~~~~~~~~        lenx: ........ (In) length of input array x[]        x: ........... (In) array with input samples        y: ........... (Out) array with output samples        k0: .......... (In/Out) pointer to modulo counter        idown: ....... (In) down-sampling factor        nblocks: ..... (In) number of coeff. sets        direct_cof: .. (In) direct path coefficient        gain: ........ (In) gain factor        b: ........... (In) numerator coefficients        c: ........... (In) denominator coefficients        T: ........... (In/Out) state variables        Return value:        ~~~~~~~~~~~~~        Returns the number of samples filtered.        Author: <hf@pkinbg.uucp>        ~~~~~~~        History:        ~~~~~~~~        28.Feb.92 v1.0 Release of 1st version <hf@pkinbg.uucp> ============================================================================*/static long     scd_parallel_form_iir_down_kernel(lenx, x, y, k0, idown,                                          nblocks, direct_cof, gain, b, c, T)  long            lenx;  float          *x, *y;  long           *k0, idown, nblocks;  double          direct_cof, gain;  float           (*b)[3], (*c)[2], (*T)[2];{  long            kx, ky, n;  float           Ttmp;  ky = 0;			  /* starting index in output array (y) */  for (kx = 0; kx < lenx; kx++)	  /* loop over all input samples */  {    if (*k0 % idown == 0)	  /* compute output only every "idown"				   * samples */    {      y[ky] = direct_cof * x[kx]; /* direct path */      for (n = 0; n < nblocks; n++)	/* loop over all second order filter */      {	Ttmp = 2. * (x[kx] - c[n][0] * T[n][0] - c[n][1] * T[n][1]);	y[ky] += b[n][2] * Ttmp + b[n][1] * T[n][1] + b[n][0] * T[n][0];	T[n][0] = T[n][1];	T[n][1] = Ttmp;      }      y[ky] *= gain;      ky++;    }    else    {      for (n = 0; n < nblocks; n++)      {	Ttmp = 2. * (x[kx] - c[n][0] * T[n][0] - c[n][1] * T[n][1]);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄色91视频| 看片的网站亚洲| 久久久久久久久伊人| 日韩亚洲欧美在线观看| 欧美日韩1234| 国产精品免费免费| 欧美精品一区二区三区蜜臀| 精品国产精品一区二区夜夜嗨| 欧美一级在线免费| 欧美一区永久视频免费观看| 日韩丝袜美女视频| 久久久久久久综合日本| 国产欧美一区二区精品性色| 亚洲国产电影在线观看| 亚洲欧洲另类国产综合| 亚洲欧美另类小说| 肉色丝袜一区二区| 久久成人免费日本黄色| 国产99精品在线观看| 成人av网站在线观看| 欧洲亚洲国产日韩| 日韩三级精品电影久久久| 久久久美女毛片| 亚洲日韩欧美一区二区在线| 一区二区成人在线| 久热成人在线视频| av一本久道久久综合久久鬼色| 91九色02白丝porn| 欧美一二三在线| 中文字幕精品三区| 亚洲午夜久久久| 国产精品一区专区| 在线中文字幕一区| 久久日韩精品一区二区五区| 日韩伦理免费电影| 日产欧产美韩系列久久99| 成人黄色网址在线观看| 欧美日韩一区二区在线观看| 欧美mv日韩mv国产| 亚洲美女在线一区| 国产在线日韩欧美| 欧美性猛交xxxx黑人交| 精品免费国产二区三区| 亚洲自拍偷拍图区| 大美女一区二区三区| 欧美一区二区在线观看| 亚洲欧洲精品一区二区三区不卡| 婷婷国产v国产偷v亚洲高清| 成人免费va视频| 337p粉嫩大胆噜噜噜噜噜91av | 日韩国产在线一| 国产乱对白刺激视频不卡| 色哟哟一区二区| 久久精品一区蜜桃臀影院| 日韩精品亚洲专区| 在线看日本不卡| 国产精品久久久久影院色老大| 蜜桃精品在线观看| 欧美日韩一区二区三区在线看| 亚洲国产精品v| 欧美日韩一区 二区 三区 久久精品| 日韩免费观看高清完整版| 夜夜嗨av一区二区三区网页 | 精品日韩一区二区三区| 亚洲中国最大av网站| www.成人在线| 国产精品热久久久久夜色精品三区 | 欧美日韩中文国产| 亚洲精品中文字幕乱码三区| 成人小视频免费在线观看| 日韩小视频在线观看专区| 婷婷一区二区三区| 欧美日韩高清一区| 天天综合网 天天综合色| 欧美日韩一本到| 亚洲成人动漫av| 欧美丰满一区二区免费视频| 午夜私人影院久久久久| 在线电影国产精品| 日本一区中文字幕| 日韩久久免费av| 精品写真视频在线观看| 精品国产91九色蝌蚪| 国产精品一区二区三区乱码| 久久午夜国产精品| 国产成人av资源| 亚洲天堂成人在线观看| 91性感美女视频| 亚洲影院免费观看| 国产精品网友自拍| av福利精品导航| 亚洲欧美经典视频| 欧美日本国产一区| 蜜臀91精品一区二区三区 | 国产女主播在线一区二区| 岛国av在线一区| 亚洲综合另类小说| 911国产精品| 国产一区三区三区| 亚洲视频图片小说| 91精品国产日韩91久久久久久| 国产在线精品一区二区三区不卡 | 欧美日韩你懂的| 免费人成精品欧美精品| 国产亚洲欧美激情| 在线免费不卡视频| 精品一区二区在线视频| 亚洲男同性恋视频| 精品国产乱码久久久久久图片| 成人激情黄色小说| 亚洲一区二区三区四区的| 久久青草国产手机看片福利盒子| 不卡的电影网站| 日韩精品免费视频人成| 亚洲不卡一区二区三区| 欧美sm极限捆绑bd| 色婷婷久久久亚洲一区二区三区| 日本最新不卡在线| 综合久久国产九一剧情麻豆| 欧美一区二区三区思思人| 成人精品鲁一区一区二区| 亚洲国产精品一区二区www在线| 精品伦理精品一区| 亚洲欧美日本韩国| 亚洲18女电影在线观看| 欧洲国内综合视频| 国产aⅴ综合色| 天堂av在线一区| 中文字幕在线视频一区| 欧美不卡一二三| 精品视频在线免费| 色中色一区二区| 成人av集中营| 国产高清不卡二三区| 奇米色777欧美一区二区| 亚洲国产一区二区三区青草影视 | 日本一区二区三级电影在线观看| 制服丝袜亚洲播放| 色综合视频在线观看| 福利一区二区在线| 国产馆精品极品| 精品一区二区在线看| 日韩经典中文字幕一区| 亚洲综合另类小说| 亚洲综合久久久久| 亚洲乱码国产乱码精品精98午夜| 欧美激情一区三区| 国产色爱av资源综合区| 欧美成人一区二区三区在线观看| 欧美日韩aaa| 日韩欧美在线影院| 欧美一级久久久| 日韩三级免费观看| 日韩精品资源二区在线| 日韩午夜中文字幕| 26uuu亚洲综合色欧美| 国产无人区一区二区三区| 精品国产乱码久久久久久蜜臀 | 精品粉嫩超白一线天av| 精品黑人一区二区三区久久 | 91丨九色丨蝌蚪富婆spa| 91色.com| 欧美日韩卡一卡二| 在线不卡a资源高清| 4438x亚洲最大成人网| 精品av综合导航| 国产视频一区二区在线| 中文字幕av不卡| 亚洲精品久久久蜜桃| 午夜亚洲国产au精品一区二区| 日产精品久久久久久久性色| 国产真实乱对白精彩久久| 成人永久免费视频| 色呦呦网站一区| 51久久夜色精品国产麻豆| 精品91自产拍在线观看一区| 中文字幕不卡在线观看| 伊人婷婷欧美激情| 日韩电影在线免费看| 日韩精品欧美精品| 日本免费新一区视频| 激情综合网激情| 国产电影精品久久禁18| 99久久99精品久久久久久| 日本久久精品电影| 欧美日韩1234| 久久久亚洲精品一区二区三区| 国产亚洲一二三区| 亚洲免费观看在线观看| 一区二区三区91| 免费成人结看片| 粉嫩aⅴ一区二区三区四区五区| 91官网在线观看| 亚洲自拍偷拍九九九| 国产精品久久久久四虎| 青青青爽久久午夜综合久久午夜| 国产精品夜夜爽| 欧美精品xxxxbbbb| 亚洲国产岛国毛片在线| 男女男精品网站|