Go to the documentation of this file.
76 return (a > b) ? a : b;
85 return (a > b) ? a : b;
104 return (a >= b) ? a - b : 0;
154 return a < 0 ? -a : a;
228 for (l = 0; a > 1; l++) {
240 for (l = 0; a > 1; ++l) {
254 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86)
260 assert((temp >> 13) <= (
OPJ_INT64)0x7FFFFFFF);
267 #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86)
static INLINE OPJ_INT32 opj_int64_ceildivpow2(OPJ_INT64 a, OPJ_INT32 b)
Divide a 64bits integer by a power of 2 and round upwards.
Definition: opj_intmath.h:189
static INLINE OPJ_INT32 opj_int_abs(OPJ_INT32 a)
Definition: opj_intmath.h:152
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:225
static INLINE OPJ_INT32 opj_int_min(OPJ_INT32 a, OPJ_INT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:56
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:170
int64_t OPJ_INT64
Definition: openjpeg.h:133
static INLINE OPJ_UINT32 opj_uint_floordivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round downwards.
Definition: opj_intmath.h:216
#define INLINE
Definition: openjpeg.h:65
static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b)
Multiply two fixed-precision rational numbers.
Definition: opj_intmath.h:252
static INLINE OPJ_UINT32 opj_uint_adds(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated sum of two unsigned integers.
Definition: opj_intmath.h:92
static INLINE OPJ_INT32 opj_int_fix_mul_t1(OPJ_INT32 a, OPJ_INT32 b)
Definition: opj_intmath.h:265
uint64_t OPJ_UINT64
Definition: openjpeg.h:134
int32_t OPJ_INT32
Definition: openjpeg.h:131
static INLINE OPJ_UINT32 opj_uint_floorlog2(OPJ_UINT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:237
Byte4_t max(Byte4_t n1, Byte4_t n2)
Definition: index_manager.c:774
static INLINE OPJ_INT64 opj_int64_clamp(OPJ_INT64 a, OPJ_INT64 min, OPJ_INT64 max)
Clamp an integer inside an interval.
Definition: opj_intmath.h:137
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
static INLINE OPJ_UINT32 opj_uint_max(OPJ_UINT32 a, OPJ_UINT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:83
static INLINE OPJ_UINT32 opj_uint_subs(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated difference of two unsigned integers.
Definition: opj_intmath.h:102
Byte4_t min(Byte4_t n1, Byte4_t n2)
Definition: index_manager.c:783
#define T1_NMSEDEC_FRACBITS
Definition: t1.h:68
static INLINE OPJ_INT32 opj_int_max(OPJ_INT32 a, OPJ_INT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:74
static INLINE OPJ_INT32 opj_int_clamp(OPJ_INT32 a, OPJ_INT32 min, OPJ_INT32 max)
Clamp an integer inside an interval.
Definition: opj_intmath.h:116
static INLINE OPJ_INT32 opj_int_floordivpow2(OPJ_INT32 a, OPJ_INT32 b)
Divide an integer by a power of 2 and round downwards.
Definition: opj_intmath.h:207
static INLINE OPJ_UINT32 opj_uint_ceildivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:198
static INLINE OPJ_INT32 opj_int_ceildiv(OPJ_INT32 a, OPJ_INT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:160
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
static INLINE OPJ_INT32 opj_int_add_no_overflow(OPJ_INT32 a, OPJ_INT32 b)
Addition two signed integers with a wrap-around behaviour.
Definition: opj_intmath.h:286
static INLINE OPJ_INT32 opj_int_ceildivpow2(OPJ_INT32 a, OPJ_INT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:180
static INLINE OPJ_INT32 opj_int_sub_no_overflow(OPJ_INT32 a, OPJ_INT32 b)
Subtract two signed integers with a wrap-around behaviour.
Definition: opj_intmath.h:305