fix for amplification in resample filter generation
This commit is contained in:
parent
ca509f4207
commit
a3d5d9325b
2 changed files with 113 additions and 113 deletions
|
@ -18,127 +18,127 @@
|
||||||
|
|
||||||
// Filter for ratio 2
|
// Filter for ratio 2
|
||||||
static float fResTaps2[INTERP_I_2 * DECIM_D_2 * NUM_TAPS_PER_PHASE2] = {
|
static float fResTaps2[INTERP_I_2 * DECIM_D_2 * NUM_TAPS_PER_PHASE2] = {
|
||||||
-0.00384155867856543230f,
|
-0.00543278438387929850f,
|
||||||
-0.03017595170702409800f,
|
-0.04267524016158903000f,
|
||||||
0.14772571242692767000f,
|
0.20891570602538878000f,
|
||||||
0.59363314684855195000f,
|
0.83952404734744124000f,
|
||||||
0.59363314684855195000f,
|
0.83952404734744124000f,
|
||||||
0.14772571242692767000f,
|
0.20891570602538878000f,
|
||||||
-0.03017595170702409800f,
|
-0.04267524016158903000f,
|
||||||
-0.00384155867856543230f
|
-0.00543278438387929850f
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Filter for ratio 16 / 11
|
// Filter for ratio 16 / 11
|
||||||
static float fResTaps16_11[INTERP_I_16_11 * DECIM_D_16_11 * NUM_TAPS_PER_PHASE16_11] = {
|
static float fResTaps16_11[INTERP_I_16_11 * DECIM_D_16_11 * NUM_TAPS_PER_PHASE16_11] = {
|
||||||
-0.00041538398445601011f,
|
-0.00166153593782404040f,
|
||||||
-0.00100091112500674300f,
|
-0.00400364450002697190f,
|
||||||
-0.00188545235900149580f,
|
-0.00754180943600598310f,
|
||||||
-0.00309245271152946720f,
|
-0.01236981084611786900f,
|
||||||
-0.00461648637097546860f,
|
-0.01846594548390187400f,
|
||||||
-0.00641536079120213090f,
|
-0.02566144316480852400f,
|
||||||
-0.00840374276694629340f,
|
-0.03361497106778517400f,
|
||||||
-0.01044911278449296500f,
|
-0.04179645113797186100f,
|
||||||
-0.01237076454632044700f,
|
-0.04948305818528178600f,
|
||||||
-0.01394240453358767100f,
|
-0.05576961813435068300f,
|
||||||
-0.01489867899787415000f,
|
-0.05959471599149660000f,
|
||||||
-0.01494567649453993500f,
|
-0.05978270597815973900f,
|
||||||
-0.01377514228383602500f,
|
-0.05510056913534409900f,
|
||||||
-0.01108182026370746600f,
|
-0.04432728105482986600f,
|
||||||
-0.00658303471198398540f,
|
-0.02633213884793594200f,
|
||||||
-0.00003936453391759546f,
|
-0.00015745813567038185f,
|
||||||
0.00872492845809500280f,
|
0.03489971383238001100f,
|
||||||
0.01980315802304051200f,
|
0.07921263209216204700f,
|
||||||
0.03319059870725740000f,
|
0.13276239482902960000f,
|
||||||
0.04877332727115071100f,
|
0.19509330908460285000f,
|
||||||
0.06632263168859610400f,
|
0.26529052675438441000f,
|
||||||
0.08549578434166034400f,
|
0.34198313736664138000f,
|
||||||
0.10584358400577590000f,
|
0.42337433602310359000f,
|
||||||
0.12682462834108582000f,
|
0.50729851336434328000f,
|
||||||
0.14782581648829729000f,
|
0.59130326595318916000f,
|
||||||
0.16818813437991034000f,
|
0.67275253751964137000f,
|
||||||
0.18723637790984679000f,
|
0.74894551163938716000f,
|
||||||
0.20431115275701389000f,
|
0.81724461102805557000f,
|
||||||
0.21880128059464088000f,
|
0.87520512237856352000f,
|
||||||
0.23017465811007956000f,
|
0.92069863244031824000f,
|
||||||
0.23800566683418956000f,
|
0.95202266733675822000f,
|
||||||
0.24199741710446424000f,
|
0.96798966841785694000f,
|
||||||
0.24199741710446424000f,
|
0.96798966841785694000f,
|
||||||
0.23800566683418956000f,
|
0.95202266733675822000f,
|
||||||
0.23017465811007956000f,
|
0.92069863244031824000f,
|
||||||
0.21880128059464088000f,
|
0.87520512237856352000f,
|
||||||
0.20431115275701389000f,
|
0.81724461102805557000f,
|
||||||
0.18723637790984679000f,
|
0.74894551163938716000f,
|
||||||
0.16818813437991034000f,
|
0.67275253751964137000f,
|
||||||
0.14782581648829729000f,
|
0.59130326595318916000f,
|
||||||
0.12682462834108582000f,
|
0.50729851336434328000f,
|
||||||
0.10584358400577590000f,
|
0.42337433602310359000f,
|
||||||
0.08549578434166034400f,
|
0.34198313736664138000f,
|
||||||
0.06632263168859610400f,
|
0.26529052675438441000f,
|
||||||
0.04877332727115071100f,
|
0.19509330908460285000f,
|
||||||
0.03319059870725740000f,
|
0.13276239482902960000f,
|
||||||
0.01980315802304051200f,
|
0.07921263209216204700f,
|
||||||
0.00872492845809500280f,
|
0.03489971383238001100f,
|
||||||
-0.00003936453391759546f,
|
-0.00015745813567038185f,
|
||||||
-0.00658303471198398540f,
|
-0.02633213884793594200f,
|
||||||
-0.01108182026370746600f,
|
-0.04432728105482986600f,
|
||||||
-0.01377514228383602500f,
|
-0.05510056913534409900f,
|
||||||
-0.01494567649453993500f,
|
-0.05978270597815973900f,
|
||||||
-0.01489867899787415000f,
|
-0.05959471599149660000f,
|
||||||
-0.01394240453358767100f,
|
-0.05576961813435068300f,
|
||||||
-0.01237076454632044700f,
|
-0.04948305818528178600f,
|
||||||
-0.01044911278449296500f,
|
-0.04179645113797186100f,
|
||||||
-0.00840374276694629340f,
|
-0.03361497106778517400f,
|
||||||
-0.00641536079120213090f,
|
-0.02566144316480852400f,
|
||||||
-0.00461648637097546860f,
|
-0.01846594548390187400f,
|
||||||
-0.00309245271152946720f,
|
-0.01236981084611786900f,
|
||||||
-0.00188545235900149580f,
|
-0.00754180943600598310f,
|
||||||
-0.00100091112500674300f,
|
-0.00400364450002697190f,
|
||||||
-0.00041538398445601011f
|
-0.00166153593782404040f
|
||||||
};
|
};
|
||||||
|
|
||||||
// Filter for ratios close to 1
|
// Filter for ratios close to 1
|
||||||
static float fResTaps1[INTERP_DECIM_I_D1 * NUM_TAPS_PER_PHASE1] = {
|
static float fResTaps1[INTERP_DECIM_I_D1 * NUM_TAPS_PER_PHASE1] = {
|
||||||
-0.00063350103055546773f,
|
-0.00200330615661920140f,
|
||||||
-0.00207811696375283240f,
|
-0.00657158284969252320f,
|
||||||
-0.00453573411763965540f,
|
-0.01434325067267541500f,
|
||||||
-0.00795518173768052820f,
|
-0.02515649349164660000f,
|
||||||
-0.01195958959900151800f,
|
-0.03781954301370460400f,
|
||||||
-0.01578413032580285000f,
|
-0.04991380271447259900f,
|
||||||
-0.01827805672784607200f,
|
-0.05780029046175797600f,
|
||||||
-0.01798731887311402800f,
|
-0.05688089663877354800f,
|
||||||
-0.01331999998191969400f,
|
-0.04212153837626786400f,
|
||||||
-0.00277986592730237800f,
|
-0.00879070792017156400f,
|
||||||
0.01476318703973193400f,
|
0.04668529656863164300f,
|
||||||
0.03980944055264415400f,
|
0.12588850452342773000f,
|
||||||
0.07202129369257158400f,
|
0.22775132810044491000f,
|
||||||
0.11011580881166547000f,
|
0.34821676223650200000f,
|
||||||
0.15188968557970114000f,
|
0.48031735951868820000f,
|
||||||
0.19438789094618825000f,
|
0.61470848494637820000f,
|
||||||
0.23420263947953687000f,
|
0.74061377477860824000f,
|
||||||
0.26786549923300679000f,
|
0.84706508415438742000f,
|
||||||
0.29227679134919288000f,
|
0.92426036786924715000f,
|
||||||
0.30510702171820847000f,
|
0.96483311873999922000f,
|
||||||
0.30510702171820847000f,
|
0.96483311873999922000f,
|
||||||
0.29227679134919288000f,
|
0.92426036786924715000f,
|
||||||
0.26786549923300679000f,
|
0.84706508415438742000f,
|
||||||
0.23420263947953687000f,
|
0.74061377477860824000f,
|
||||||
0.19438789094618825000f,
|
0.61470848494637820000f,
|
||||||
0.15188968557970114000f,
|
0.48031735951868820000f,
|
||||||
0.11011580881166547000f,
|
0.34821676223650200000f,
|
||||||
0.07202129369257158400f,
|
0.22775132810044491000f,
|
||||||
0.03980944055264415400f,
|
0.12588850452342773000f,
|
||||||
0.01476318703973193400f,
|
0.04668529656863164300f,
|
||||||
-0.00277986592730237800f,
|
-0.00879070792017156400f,
|
||||||
-0.01331999998191969400f,
|
-0.04212153837626786400f,
|
||||||
-0.01798731887311402800f,
|
-0.05688089663877354800f,
|
||||||
-0.01827805672784607200f,
|
-0.05780029046175797600f,
|
||||||
-0.01578413032580285000f,
|
-0.04991380271447259900f,
|
||||||
-0.01195958959900151800f,
|
-0.03781954301370460400f,
|
||||||
-0.00795518173768052820f,
|
-0.02515649349164660000f,
|
||||||
-0.00453573411763965540f,
|
-0.01434325067267541500f,
|
||||||
-0.00207811696375283240f,
|
-0.00657158284969252320f,
|
||||||
-0.00063350103055546773f
|
-0.00200330615661920140f
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ NoTapsP = NoTapsPIn * I;
|
||||||
fc = 0.97 / I;
|
fc = 0.97 / I;
|
||||||
|
|
||||||
% MMSE filter design with Kaiser window, consider interpolation factor
|
% MMSE filter design with Kaiser window, consider interpolation factor
|
||||||
h = sqrt(I) * firls(NoTapsP - 1, [0 fc fc 1], [1 1 0 0]) .* kaiser(NoTapsP, 5)';
|
h = I * firls(NoTapsP - 1, [0 fc fc 1], [1 1 0 0]) .* kaiser(NoTapsP, 5)';
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue