Fattal: added sanity check for the values of alpha and beta

This commit is contained in:
Alberto Griggio
2017-11-04 21:10:26 +01:00
parent f6faccc759
commit 9db14cc521

View File

@@ -1043,6 +1043,11 @@ void rescale_bilinear(const Array2Df &src, Array2Df &dst, bool multithread)
void tmo_fattal02_RT(Imagefloat *rgb, float alpha, float beta, int detail_level, bool multiThread)
{
// sanity check
if (alpha <= 0 || beta <= 0) {
return;
}
int w = rgb->getWidth();
int h = rgb->getHeight();