FunctionBiquadratic filtering
Syntax C/C++#include <VFstd.h>
void VF_biquad( fVector Y, fVector X, ui size, fVector Param );
C++ VecObj#include <OptiVec.h>
void vector<T>::biquad( const vector<T>& X, const vector<T>& Param, );
Pascal/Delphiuses VFstd;
procedure VF_biquad( Y,X:fVector; size:UIntSize; Param:fVector );
CUDA function C/C++#include <cudaVFstd.h>
int cudaVF_biquad( fVector d_Y, fVector d_X, ui size, fVector h_Param );
int cusdVF_biquad( fVector d_Y, fVector d_X, ui size, fVector d_Param );
float VFcu_biquad( fVector h_Y, fVector h_X, ui size, fVector h_Param );
CUDA function Pascal/Delphiuses VFstd;
function cudaVF_biquad( d_Y, d_X:fVector; size:UIntSize; h_Param:fVector ): IntBool;
function cusdVF_biquad( d_Y, d_X:fVector; size:UIntSize; d_Param:fVector ): IntBool;
procedure VFcu_biquad( h_Y, h_X:fVector; size:UIntSize; h_Param:fVector );
DescriptionA bi-quadratic filter, used mostly in audio data processing, calculates output from input values according to the formula:
Y[i] = a0*X[i] + a1*X[i−1] + a2*X[i-2] - b1*Y[i−1] - b2*Y[i-2]
As this is a recursive filter, the function needs not only the filter coefficients themselves, but also the two input and two output values preceding the data passed in the input vector. All these values are passed to VF_biquad in the vector Param, containing nine entries:
Param[0]=a0 Param[1]=a1 Param[2]=a2 Param[3]=b1 Param[4]=b2 Param[5]=X[−1] Param[6]=X[-2] Param[7]=Y[−1] Param[8]=Y[-2]
Error handlingnone
Return valuenone
See alsoVF_filter,   VF_smooth

VectorLib Table of Contents  OptiVec home