[Rawstudio-commit] rawspeed r51 - RawSpeed
Anders Brander
anders at brander.dk
Sun Feb 1 13:51:52 CET 2009
Author: abrander
Date: 2009-02-01 13:51:52 +0100 (Sun, 01 Feb 2009)
New Revision: 51
Modified:
RawSpeed/OrfDecoder.cpp
Log:
- Fixed signed/unisgned differness in OrfDecoder::decodeCompressed().
Modified: RawSpeed/OrfDecoder.cpp
===================================================================
--- RawSpeed/OrfDecoder.cpp 2009-01-31 18:02:08 UTC (rev 50)
+++ RawSpeed/OrfDecoder.cpp 2009-02-01 12:51:52 UTC (rev 51)
@@ -122,11 +122,11 @@
carry[2] = carry[0] > 16 ? 0 : carry[2]+1;
if (y < 2 && x < 2) pred = 0;
else if (y < 2) pred = dest[x-2];
- else if (x < 2) pred = dest[-pitch+x]; // Pitch is in bytes, and dest is in short, so we skip two lines
+ else if (x < 2) pred = dest[-pitch+((gint)x)]; // Pitch is in bytes, and dest is in short, so we skip two lines
else {
wo = dest[x-2];
- n = dest[-pitch+x];
- nw = dest[-pitch+x-2];
+ n = dest[-pitch+((gint)x)];
+ nw = dest[-pitch+((gint)x)-2];
if ((wo < nw && nw < n) || (n < nw && nw < wo)) {
if (abs(wo-nw) > 32 || abs(n-nw) > 32)
pred = wo + n - nw;
@@ -143,4 +143,4 @@
{
mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE);
-}
\ No newline at end of file
+}
More information about the Rawstudio-commit
mailing list