mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-19 10:30:30 +00:00
deeaf69ed4
Original commit message from CVS: new filter subdir for standard audio filters first filter uses code from vorbis to implement an iir filter not optimized yet, iir code uses doubles and plugin uses float
37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
/********************************************************************
|
|
* *
|
|
* THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
|
|
* USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
|
|
* THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
|
|
* PLEASE READ THESE TERMS DISTRIBUTING. *
|
|
* *
|
|
* THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
|
|
* by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
|
|
* http://www.xiph.org/ *
|
|
* *
|
|
********************************************************************
|
|
|
|
function: Direct Form I, II IIR filters, plus some specializations
|
|
last mod: $Id$
|
|
|
|
********************************************************************/
|
|
|
|
#ifndef _V_IIR_H_
|
|
#define _V_IIR_H_
|
|
|
|
typedef struct {
|
|
int stages;
|
|
double *coeff_A;
|
|
double *coeff_B;
|
|
double *z_A;
|
|
double *z_B;
|
|
int ring;
|
|
double gain;
|
|
} IIR_state;
|
|
|
|
void IIR_init(IIR_state *s,int stages,double gain, double *A, double *B);
|
|
void IIR_clear(IIR_state *s);
|
|
double IIR_filter(IIR_state *s,double in);
|
|
double IIR_filter_ChebBand(IIR_state *s,double in);
|
|
|
|
#endif
|