filter.h

Go to the documentation of this file.
00001 
00002    /******************************************************************
00003 
00004        iLBC Speech Coder ANSI-C Source Code
00005 
00006        filter.h
00007 
00008        Copyright (C) The Internet Society (2004).
00009        All Rights Reserved.
00010 
00011    ******************************************************************/
00012 
00013 
00014 
00015 
00016 
00017 
00018    #ifndef __iLBC_FILTER_H
00019    #define __iLBC_FILTER_H
00020 
00021    void AllPoleFilter(
00022        float *InOut,   /* (i/o) on entrance InOut[-orderCoef] to
00023                               InOut[-1] contain the state of the
00024                               filter (delayed samples). InOut[0] to
00025                               InOut[lengthInOut-1] contain the filter
00026                               input, on en exit InOut[-orderCoef] to
00027                               InOut[-1] is unchanged and InOut[0] to
00028                               InOut[lengthInOut-1] contain filtered
00029                               samples */
00030        float *Coef,/* (i) filter coefficients, Coef[0] is assumed
00031                               to be 1.0 */
00032        int lengthInOut,/* (i) number of input/output samples */
00033        int orderCoef   /* (i) number of filter coefficients */
00034    );
00035 
00036    void AllZeroFilter(
00037        float *In,      /* (i) In[0] to In[lengthInOut-1] contain
00038                               filter input samples */
00039        float *Coef,/* (i) filter coefficients (Coef[0] is assumed
00040                               to be 1.0) */
00041        int lengthInOut,/* (i) number of input/output samples */
00042        int orderCoef,  /* (i) number of filter coefficients */
00043        float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
00044                               contain the filter state, on exit Out[0]
00045                               to Out[lengthInOut-1] contain filtered
00046                               samples */
00047    );
00048 
00049    void ZeroPoleFilter(
00050        float *In,      /* (i) In[0] to In[lengthInOut-1] contain filter
00051                               input samples In[-orderCoef] to In[-1]
00052                               contain state of all-zero section */
00053        float *ZeroCoef,/* (i) filter coefficients for all-zero
00054                               section (ZeroCoef[0] is assumed to
00055                               be 1.0) */
00056        float *PoleCoef,/* (i) filter coefficients for all-pole section
00057                               (ZeroCoef[0] is assumed to be 1.0) */
00058        int lengthInOut,/* (i) number of input/output samples */
00059        int orderCoef,  /* (i) number of filter coefficients */
00060        float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
00061                               contain state of all-pole section. On
00062                               exit Out[0] to Out[lengthInOut-1]
00063                               contain filtered samples */
00064    );
00065 
00066 
00067 
00068 
00069 
00070 
00071    void DownSample (
00072        float  *In,     /* (i) input samples */
00073        float  *Coef,   /* (i) filter coefficients */
00074        int lengthIn,   /* (i) number of input samples */
00075        float  *state,  /* (i) filter state */
00076        float  *Out     /* (o) downsampled output */
00077    );
00078 
00079    #endif
00080 

Generated on Thu Apr 16 06:27:34 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6