Permalink
Browse files

Fixed again the part-2 JLS color transformation. Yuck!

  • Loading branch information...
1 parent 3db9ffa commit ff5be642f9857a530b48f63c09ae6501511b01e6 @thorfdbg committed Dec 4, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 autoconfig.h
  2. +1 −1 automakefile
  3. +3 −3 colortrafo/lslosslesstrafo.cpp
View
4 autoconfig.h
@@ -453,7 +453,7 @@
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
+#define SIZEOF_LONG 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
@@ -462,7 +462,7 @@
#define SIZEOF_SHORT 2
/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 4
+#define SIZEOF_VOID_P 8
/* The size of `__int64', as computed by sizeof. */
#define SIZEOF___INT64 0
View
2 automakefile
@@ -17,7 +17,7 @@ PREFIX = /home/thor/bin/wavelet
PTHREADCFLAGS =
PTHREADLDFLAGS =
PTHREADLIBS =
-HWTYPE = i686
+HWTYPE = x86_64
HAVE_ADDONS =
BITSIZE =
##
View
6 colortrafo/lslosslesstrafo.cpp
@@ -46,7 +46,7 @@ the committee itself.
/*
** This file provides the transformation from RGB to YCbCr
**
-** $Id: lslosslesstrafo.cpp,v 1.4 2012-11-26 11:43:01 thor Exp $
+** $Id: lslosslesstrafo.cpp,v 1.5 2012-12-04 18:47:06 thor Exp $
**
*/
@@ -450,8 +450,8 @@ void LSLosslessTrafo<external,count>::YCbCr2RGB(const RectAngle<LONG> &r,const s
out[2] = m_usMatrix[2][0] * out[0] + m_usMatrix[2][1] * out[1];
out[2] >>= m_ucRightShift[2];
out[2] = (m_bCentered[2])?(src[2] - out[2]):(src[2] + out[2]);
- if (out[2] < 0) out[2] += m_lModulo;
- if (out[2] > m_lModulo) out[2] -= m_lModulo;
+ if (out[2] < 0) out[2] += m_lModulo;
+ if (out[2] >= m_lModulo) out[2] -= m_lModulo;
break;
}
//

0 comments on commit ff5be64

Please sign in to comment.