libavcodec/iirfilter.h File Reference

IIR filter interface. More...

#include "avcodec.h"

Go to the source code of this file.

Enumerations

enum  IIRFilterType { FF_FILTER_TYPE_BESSEL, FF_FILTER_TYPE_BUTTERWORTH, FF_FILTER_TYPE_CHEBYSHEV, FF_FILTER_TYPE_ELLIPTIC }
enum  IIRFilterMode { FF_FILTER_MODE_LOWPASS, FF_FILTER_MODE_HIGHPASS, FF_FILTER_MODE_BANDPASS, FF_FILTER_MODE_BANDSTOP }

Functions

struct FFIIRFilterCoeffsff_iir_filter_init_coeffs (enum IIRFilterType filt_type, enum IIRFilterMode filt_mode, int order, float cutoff_ratio, float stopband, float ripple)
 Initialize filter coefficients.
struct FFIIRFilterStateff_iir_filter_init_state (int order)
 Create new filter state.
void ff_iir_filter_free_coeffs (struct FFIIRFilterCoeffs *coeffs)
 Free filter coefficients.
void ff_iir_filter_free_state (struct FFIIRFilterState *state)
 Free filter state.
void ff_iir_filter (const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterState *state, int size, const int16_t *src, int sstep, int16_t *dst, int dstep)
 Perform lowpass filtering on input samples.


Detailed Description

IIR filter interface.

Definition in file iirfilter.h.


Enumeration Type Documentation

Enumerator:
FF_FILTER_MODE_LOWPASS 
FF_FILTER_MODE_HIGHPASS 
FF_FILTER_MODE_BANDPASS 
FF_FILTER_MODE_BANDSTOP 

Definition at line 42 of file iirfilter.h.

Enumerator:
FF_FILTER_TYPE_BESSEL 
FF_FILTER_TYPE_BUTTERWORTH 
FF_FILTER_TYPE_CHEBYSHEV 
FF_FILTER_TYPE_ELLIPTIC 

Definition at line 35 of file iirfilter.h.


Function Documentation

void ff_iir_filter ( const struct FFIIRFilterCoeffs coeffs,
struct FFIIRFilterState state,
int  size,
const int16_t *  src,
int  sstep,
int16_t *  dst,
int  dstep 
)

Perform lowpass filtering on input samples.

Parameters:
coeffs pointer to filter coefficients
state pointer to filter state
size input length
src source samples
sstep source stride
dst filtered samples (destination may be the same as input)
dstep destination stride

Definition at line 133 of file iirfilter.c.

Referenced by ff_psy_preprocess().

void ff_iir_filter_free_coeffs ( struct FFIIRFilterCoeffs coeffs  ) 

Free filter coefficients.

Parameters:
coeffs pointer allocated with ff_iir_filter_init_coeffs()

Definition at line 171 of file iirfilter.c.

Referenced by ff_psy_preprocess_end().

void ff_iir_filter_free_state ( struct FFIIRFilterState state  ) 

Free filter state.

Parameters:
state pointer allocated with ff_iir_filter_init_state()

Definition at line 166 of file iirfilter.c.

Referenced by ff_psy_preprocess_end().

struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs ( enum IIRFilterType  filt_type,
enum IIRFilterMode  filt_mode,
int  order,
float  cutoff_ratio,
float  stopband,
float  ripple 
) [read]

Initialize filter coefficients.

Parameters:
filt_type filter type (e.g. Butterworth)
filt_mode filter mode (e.g. lowpass)
order filter order
cutoff_ratio cutoff to input frequency ratio
stopband stopband to input frequency ratio (used by bandpass and bandstop filter modes)
ripple ripple factor (used only in Chebyshev filters)
Returns:
pointer to filter coefficients structure or NULL if filter cannot be created

Definition at line 50 of file iirfilter.c.

Referenced by ff_psy_preprocess_init().

struct FFIIRFilterState* ff_iir_filter_init_state ( int  order  )  [read]

Create new filter state.

Parameters:
order filter order
Returns:
pointer to new filter state or NULL if state creation fails

Definition at line 115 of file iirfilter.c.

Referenced by ff_psy_preprocess_init().


Generated on Fri Oct 26 02:36:52 2012 for FFmpeg by  doxygen 1.5.8