#include <flt.h>
flt::CDecimatorに対する継承グラフ
CDecimatorは、16bit固定小数点によるIIRフィルタのクラスである。VisauDSP++の fir_decima_fr16()関数のラッパーとして働く。
Public メソッド | |
CDecimator (const shortfract h[], int tap, int ratio, shortfract d[]=0) | |
内部変数を初期化 | |
virtual void | run (const shortfract input[], shortfract output[], int count) |
フィルタ実行メソッド |
flt::CDecimator::CDecimator | ( | const shortfract | h[], | |
int | tap, | |||
int | ratio, | |||
shortfract | d[] = 0 | |||
) |
内部変数を初期化
h | 伝達関数H(係数配列)を与える。 | |
tap | フィルタのタップ数を与える | |
ratio | デシメーション比を与える | |
d | 内部ディレイライン |
伝達関数である係数配列とディレイラインには外部から与えられる ポインタhをそのまま使う。ディレイラインの長さはtapである。 ディレイラインを与える引数が省略された場合には、内部で割り付けて使う。
00102 : CFIRFilter( h, tap, d ) 00103 { 00104 state.l = ratio; // decimation比を内部変数に格納 00105 }
void flt::CDecimator::run | ( | const shortfract | input[], | |
shortfract | output[], | |||
int | count | |||
) | [virtual] |
フィルタ実行メソッド
input | shortfract型の入力配列。フィルタへの入力をここに与える。 | |
output | shortfract型の出力配列。フィルタの実行結果がここに格納される。 サイズはcount/デシメーション比。 | |
count | input引数の要素数。この値はCDecimatorCDecimatorで与えたデシメーション比の 整数倍でなければならない |
flt::CFIRFilterを再定義しています。
00111 { 00112 fir_decima_fr16( // VisualDSP++のフィルタ関数 00113 (fract16 *)input, 00114 (fract16 *)output, 00115 count, 00116 &state 00117 ); 00118 }