View Single Post
Old 11-19-2018, 02:01 PM   #68
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,737
Default

As far as the denormal issue goes -- I assume ext_no_denormal is being set to avoid noise being added to the analyzed input?

Anyway -- the addition of 0.0000001 or whatever helps, but ideally the JSFX code generator should be taking care of this. I'm investigating why it is not. Edit: made some slight tweaks the the denormal-prevention code, which fixes (coming in 5.97 or whatever).

Something I noticed in svf_filter:

Code:
  nlp > 0 ? (
    v3 = v0 - ic2eq0;
    v1 = a1 * ic1eq0 + a2 * v3;
    v2 = ic2eq0 + a2 * ic1eq0 + a3 * v3;

    ic1eq0 = 2 * v1 - ic1eq0;
    ic2eq0 = 2 * v2 - ic2eq0;

    v0 = m0 * v0 + m1 * v1 + m2 * v2;
  );

  nlp > 2 ? (
    v3 = v0 - lp1.ic2eq0;
    v1 = lp1.a1 * lp1.ic1eq0 + lp1.a2 * v3;
    v2 = lp1.ic2eq0 + lp1.a2 * lp1.ic1eq0 + lp1.a3 * v3;

    lp1.ic1eq0 = 2 * v1 - lp1.ic1eq0;
    lp1.ic2eq0 = 2 * v2 - lp1.ic2eq0;

    v0 = lp1.m0 * v0 + lp1.m1 * v1 + lp1.m2 * v2;
  );
These would be better off nested (the optimizer is not smart enough to detect that nlp wouldn't change, and it will still run each comparison in sequence even if the first one fails...)

Last edited by Justin; 11-19-2018 at 02:55 PM.
Justin is offline   Reply With Quote