summaryrefslogtreecommitdiff
path: root/indra/llkdu
diff options
context:
space:
mode:
authorcallum_linden <none@none>2016-05-06 13:40:29 -0700
committercallum_linden <none@none>2016-05-06 13:40:29 -0700
commitc5d6bfe8ae61e3311c260626b590586d3cde4b6e (patch)
tree4b731e4be618f6b9048bcc7e6dadf663f0baec49 /indra/llkdu
parent811a0b5726ed965f9f21ace2d3ec97bb95a91311 (diff)
parent94559950a2c670990db56bd74e65d26652421b8c (diff)
Merge with viewer-release
Diffstat (limited to 'indra/llkdu')
-rwxr-xr-xindra/llkdu/llimagej2ckdu.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index 4f93d85529..f884b2aa4f 100755
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -1045,7 +1045,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val = (kdu_int32)(sp->fval*scale16);
val = (val+128)>>8; // May be faster than true rounding
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 255);
}
@@ -1063,7 +1063,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val = sp->ival;
val = (val+offset)>>downshift;
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 255);
}
@@ -1086,7 +1086,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val += (1<<(KDU_FIX_POINT-8))>>1;
val >>= (KDU_FIX_POINT-8);
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 255);
}
@@ -1105,7 +1105,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val = (val+offset)>>downshift;
val <<= upshift;
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 256 - (1<<upshift));
}
@@ -1127,7 +1127,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val = sp->ival;
val = (val+offset)>>downshift;
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 255);
}
@@ -1143,7 +1143,7 @@ all necessary level shifting, type conversion, rounding and truncation. */
val = sp->ival;
val <<= upshift;
val += 128;
- if (val & ((-1)<<8))
+ if (val & ((0xffffffffU)<<8))
{
val = (val < 0 ? 0 : 256 - (1<<upshift));
}