basic_filters.h: Remove unneccessary LP filter calculations in Formantfilter
This commit is contained in:
@@ -315,7 +315,7 @@ public:
|
||||
|
||||
case Formantfilter:
|
||||
{
|
||||
sample_t lp, hp, bp, in;
|
||||
sample_t hp, bp, in;
|
||||
|
||||
out = 0;
|
||||
for(int o=0; o<4; o++)
|
||||
@@ -325,10 +325,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[0] + m_vflp[0][_chnl] * m_vfa[0];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[0] * ( m_vfhp[0][_chnl] + in - m_vflast[0][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -338,7 +334,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[0][_chnl] = in;
|
||||
m_vflp[0][_chnl] = lp;
|
||||
m_vfhp[0][_chnl] = hp;
|
||||
m_vfbp[0][_chnl] = bp;
|
||||
|
||||
@@ -346,10 +341,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[0] + m_vflp[2][_chnl] * m_vfa[0];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[0] * ( m_vfhp[2][_chnl] + in - m_vflast[2][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -359,7 +350,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[2][_chnl] = in;
|
||||
m_vflp[2][_chnl] = lp;
|
||||
m_vfhp[2][_chnl] = hp;
|
||||
m_vfbp[2][_chnl] = bp;
|
||||
|
||||
@@ -367,10 +357,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[0] + m_vflp[4][_chnl] * m_vfa[0];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[0] * ( m_vfhp[4][_chnl] + in - m_vflast[4][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -380,7 +366,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[4][_chnl] = in;
|
||||
m_vflp[4][_chnl] = lp;
|
||||
m_vfhp[4][_chnl] = hp;
|
||||
m_vfbp[4][_chnl] = bp;
|
||||
|
||||
@@ -391,10 +376,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[1] + m_vflp[1][_chnl] * m_vfa[1];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[1] * ( m_vfhp[1][_chnl] + in - m_vflast[1][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -404,7 +385,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[1][_chnl] = in;
|
||||
m_vflp[1][_chnl] = lp;
|
||||
m_vfhp[1][_chnl] = hp;
|
||||
m_vfbp[1][_chnl] = bp;
|
||||
|
||||
@@ -412,10 +392,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[1] + m_vflp[3][_chnl] * m_vfa[1];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[1] * ( m_vfhp[3][_chnl] + in - m_vflast[3][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -425,7 +401,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[3][_chnl] = in;
|
||||
m_vflp[3][_chnl] = lp;
|
||||
m_vfhp[3][_chnl] = hp;
|
||||
m_vfbp[3][_chnl] = bp;
|
||||
|
||||
@@ -433,10 +408,6 @@ public:
|
||||
in = (in > +1.f) ? +1.f : in;
|
||||
in = (in < -1.f) ? -1.f : in;
|
||||
|
||||
lp = in * m_vfb[1] + m_vflp[5][_chnl] * m_vfa[1];
|
||||
lp = (lp > +1.f) ? +1.f : lp;
|
||||
lp = (lp < -1.f) ? -1.f : lp;
|
||||
|
||||
hp = m_vfc[1] * ( m_vfhp[5][_chnl] + in - m_vflast[5][_chnl] );
|
||||
hp = (hp > +1.f) ? +1.f : hp;
|
||||
hp = (hp < -1.f) ? -1.f : hp;
|
||||
@@ -446,7 +417,6 @@ public:
|
||||
bp = (bp < -1.f) ? -1.f : bp;
|
||||
|
||||
m_vflast[5][_chnl] = in;
|
||||
m_vflp[5][_chnl] = lp;
|
||||
m_vfhp[5][_chnl] = hp;
|
||||
m_vfbp[5][_chnl] = bp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user