Hallöchen!

This is about the question of how to deal with return values that
are mathematically undefined.  Such values occur in coordinate
transformations of some fisheye projections and cannot be avoided.

Currently, Lensfun returns a very big float for undefined values,
which happens to be mapped in Darktable and DigiKam (and possibly
also in other programms) to (int)MAX_FLT, which is undefined
according to the C/C++ standard and mapped to MAXINT by the GCC.
This is then clipped by the interpolation routine.

Thus, this approach is fragile, albeit Lensfun is not the only to be
blamed.  Still, Lensfun should return something that can be safely
cast to integer.  Alternatively, one can force the calling programs
to change their checks.  In any case, Lensfun should adopt
well-defined and documented behaviour for such cases.

Tschö,
Torsten.

-- 
Torsten Bronger    Jabber ID: [email protected]
                                  or http://bronger-jmp.appspot.com


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lensfun-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lensfun-users

Reply via email to