Commit 061d29e3 authored by Andrey Filippov's avatar Andrey Filippov

Fixed bug of NaN-s creeping into 8-bit ML files

parent d9ea7668
......@@ -4660,7 +4660,7 @@ if (debugLevel > -100) return true; // temporarily !
int iv = (int) Math.round(k*(ml_data[nl][i]-soft_mn));
if (iv < 0) iv = 0;
else if (iv > 254) iv = 254;
iml_data[nl][i] = (byte) iv; // (iv - 127); // NaN will stay 0;
iml_data[nl][i] = (byte) (iv + 1); // (iv - 127); // NaN will stay 0;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment