franck-ohayon-sb / libsquish

Automatically exported from code.google.com/p/libsquish
MIT License
0 stars 0 forks source link

Crash in ComputeWeightedCovariance #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. have a 4x4 block with identical values in all 4 channels
2.
3.

What is the expected output? What do you see instead?

processing crashes in ComputeWeightedCovariance() with a divide by 0.0

What version of the product are you using? On what operating system?

1.10, XP

Please provide any additional information below.

you can fix it with a one liner if check in maths.cpp at line 47,  
if(total > FLT_EPSILON)  or   if(!(total < FLT_EPSILON))

Original issue reported on code.google.com by enderwig...@gmail.com on 24 Mar 2009 at 6:05

GoogleCodeExporter commented 9 years ago

Original comment by sidm...@gmail.com on 1 Apr 2009 at 9:40

GoogleCodeExporter commented 9 years ago
Thanks for the report.  I've added an epsilon check you suggested to the head 
revision.

Original comment by sidm...@gmail.com on 3 Apr 2009 at 9:33