projects
/
profile
/
ivi
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ee6040
)
Fix instability of Luv/Lab color conversions
author
Andrey Kamaev
<andrey.kamaev@itseez.com>
Thu, 11 Oct 2012 11:00:43 +0000
(15:00 +0400)
committer
Andrey Kamaev
<andrey.kamaev@itseez.com>
Thu, 11 Oct 2012 11:05:43 +0000
(15:05 +0400)
modules/imgproc/src/color.cpp
patch
|
blob
|
history
diff --git
a/modules/imgproc/src/color.cpp
b/modules/imgproc/src/color.cpp
index
64aa9f0
..
5686204
100644
(file)
--- a/
modules/imgproc/src/color.cpp
+++ b/
modules/imgproc/src/color.cpp
@@
-124,8
+124,8
@@
template<typename _Tp> static void splineBuild(const _Tp* f, int n, _Tp* tab)
// interpolates value of a function at x, 0 <= x <= n using a cubic spline.
template<typename _Tp> static inline _Tp splineInterpolate(_Tp x, const _Tp* tab, int n)
{
- int ix = cvFloor(x);
- i
x = std::min(std::max(ix
, 0), n-1);
+ // don't touch this function without urgent need - some versions of gcc fail to inline it correctly
+ i
nt ix = std::min(std::max(int(x)
, 0), n-1);
x -= ix;
tab += ix*4;
return ((tab[3]*x + tab[2])*x + tab[1])*x + tab[0];