OpenJPEG  2.2.0
opj_intmath.h File Reference

Implementation of operations on integers (INT) More...

Go to the source code of this file.

Functions

Exported functions (see also openjpeg.h)
static INLINE OPJ_INT32 opj_int_min (OPJ_INT32 a, OPJ_INT32 b)
 Get the minimum of two integers. More...
 
static INLINE OPJ_UINT32 opj_uint_min (OPJ_UINT32 a, OPJ_UINT32 b)
 Get the minimum of two integers. More...
 
static INLINE OPJ_INT32 opj_int_max (OPJ_INT32 a, OPJ_INT32 b)
 Get the maximum of two integers. More...
 
static INLINE OPJ_UINT32 opj_uint_max (OPJ_UINT32 a, OPJ_UINT32 b)
 Get the maximum of two integers. More...
 
static INLINE OPJ_UINT32 opj_uint_adds (OPJ_UINT32 a, OPJ_UINT32 b)
 Get the saturated sum of two unsigned integers. More...
 
static INLINE OPJ_INT32 opj_int_clamp (OPJ_INT32 a, OPJ_INT32 min, OPJ_INT32 max)
 Clamp an integer inside an interval. More...
 
static INLINE OPJ_INT32 opj_int_abs (OPJ_INT32 a)
 
static INLINE OPJ_INT32 opj_int_ceildiv (OPJ_INT32 a, OPJ_INT32 b)
 Divide an integer and round upwards. More...
 
static INLINE OPJ_UINT32 opj_uint_ceildiv (OPJ_UINT32 a, OPJ_UINT32 b)
 Divide an integer and round upwards. More...
 
static INLINE OPJ_INT32 opj_int_ceildivpow2 (OPJ_INT32 a, OPJ_INT32 b)
 Divide an integer by a power of 2 and round upwards. More...
 
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. More...
 
static INLINE OPJ_UINT32 opj_uint_ceildivpow2 (OPJ_UINT32 a, OPJ_UINT32 b)
 Divide an integer by a power of 2 and round upwards. More...
 
static INLINE OPJ_INT32 opj_int_floordivpow2 (OPJ_INT32 a, OPJ_INT32 b)
 Divide an integer by a power of 2 and round downwards. More...
 
static INLINE OPJ_INT32 opj_int_floorlog2 (OPJ_INT32 a)
 Get logarithm of an integer and round downwards. More...
 
static INLINE OPJ_UINT32 opj_uint_floorlog2 (OPJ_UINT32 a)
 Get logarithm of an integer and round downwards. More...
 
static INLINE OPJ_INT32 opj_int_fix_mul (OPJ_INT32 a, OPJ_INT32 b)
 Multiply two fixed-precision rational numbers. More...
 
static INLINE OPJ_INT32 opj_int_fix_mul_t1 (OPJ_INT32 a, OPJ_INT32 b)
 

Detailed Description

Implementation of operations on integers (INT)

The functions in OPJ_INTMATH.H have for goal to realize operations on integers.