File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -390,8 +390,8 @@ namespace ojph {
390390 // using 32 bit integer
391391 const si32 half = (1 << (bit_depth - 1 ));
392392 const si32 shift = half + 1 ;
393- const si32 upper_limit = 0x7FFFFFFF >> (32 - bit_depth);
394- const si32 lower_limit = 0x80000000 >> (32 - bit_depth);
393+ const si32 upper_limit = INT_MAX >> (32 - bit_depth);
394+ const si32 lower_limit = INT_MIN >> (32 - bit_depth);
395395
396396 if (is_signed)
397397 {
@@ -428,8 +428,8 @@ namespace ojph {
428428 // it is either infinity, -infinity, qNan or sNan.
429429 const si32 half = (1 << (bit_depth - 1 ));
430430 const si32 shift = half + 1 ;
431- const si64 upper_limit = 0x7FFFFFFFFFFFFFFFLL >> (64 - bit_depth);
432- const si64 lower_limit = 0x8000000000000000LL >> (64 - bit_depth);
431+ const si64 upper_limit = LLONG_MAX >> (64 - bit_depth);
432+ const si64 lower_limit = LLONG_MIN >> (64 - bit_depth);
433433
434434 if (is_signed)
435435 {
You can’t perform that action at this time.
0 commit comments