Bug 1587244 - Allow NaN in IIR filter output. r=karlt

It's perfectly possible to create unstable filter, that can easily go to
infinity, so this assert is not valid.

Differential Revision: https://phabricator.services.mozilla.com/D49608

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paul Adenot 2019-10-20 21:52:31 +00:00
Родитель 517642a768
Коммит 772872cd0e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -106,8 +106,8 @@ void IIRFilter::process(const float* sourceP, float* destP,
// Avoid introducing a stream of subnormals
destP[n] = WebCore::DenormalDisabler::flushDenormalFloatToZero(yn);
MOZ_ASSERT(destP[n] == 0.0 || fabs(destP[n]) > FLT_MIN,
"output should not be subnormal");
MOZ_ASSERT(destP[n] == 0.0 || fabs(destP[n]) > FLT_MIN || IsNaN(destP[n]),
"output should not be subnormal, but can be NaN");
}
}