Grok 20.3.2
grk::t1::ojph Namespace Reference

Namespaces

namespace  local

Classes

struct  coded_lists
struct  lifting_buf
class  line_buf
class  mem_elastic_allocator
class  mem_fixed_allocator
class  message_base
 This is the base class from which all messaging levels are derived. More...
class  message_error
 Derived from message_base to handle error messages. More...
class  message_info
 Derived from message_base to handle info messages. More...
class  message_warning
 Derived from message_base to handle warning messages. More...
class  NarrowRoiScaleOJPHFilter16
class  NarrowRoiShiftOJPHFilter
class  NarrowScaleOJPHFilter16
class  NarrowShiftOJPHFilter
class  RoiScaleOJPHFilter
class  RoiShiftOJPHFilter
class  ScaleOJPHFilter
class  ShiftOJPHFilter
class  T1OJPH

Typedefs

typedef uint8_t ui8
typedef int8_t si8
typedef uint16_t ui16
typedef int16_t si16
typedef uint32_t ui32
typedef int32_t si32
typedef uint64_t ui64
typedef int64_t si64

Enumerations

enum  : int {
  X86_CPU_EXT_LEVEL_GENERIC = 0 , X86_CPU_EXT_LEVEL_MMX = 1 , X86_CPU_EXT_LEVEL_SSE = 2 , X86_CPU_EXT_LEVEL_SSE2 = 3 ,
  X86_CPU_EXT_LEVEL_SSE3 = 4 , X86_CPU_EXT_LEVEL_SSSE3 = 5 , X86_CPU_EXT_LEVEL_SSE41 = 6 , X86_CPU_EXT_LEVEL_SSE42 = 7 ,
  X86_CPU_EXT_LEVEL_AVX = 8 , X86_CPU_EXT_LEVEL_AVX2 = 9 , X86_CPU_EXT_LEVEL_AVX2FMA = 10 , X86_CPU_EXT_LEVEL_AVX512 = 11
}
enum  : int {
  ARM_CPU_EXT_LEVEL_GENERIC = 0 , ARM_CPU_EXT_LEVEL_NEON = 1 , ARM_CPU_EXT_LEVEL_ASIMD = 1 , ARM_CPU_EXT_LEVEL_SVE = 2 ,
  ARM_CPU_EXT_LEVEL_SVE2 = 3
}
enum  OJPH_MSG_LEVEL : int {
  OJPH_MSG_ALL_MSG = 0 , OJPH_MSG_INFO = 1 , OJPH_MSG_WARN = 2 , OJPH_MSG_ERROR = 3 ,
  OJPH_MSG_NO_MSG = 4
}
 This enum is use to specify the level of severity of message while processing markers. More...

Functions

OJPH_EXPORT int get_cpu_ext_level ()
static ui32 population_count (ui32 val)
static ui32 count_leading_zeros (ui32 val)
static ui32 count_leading_zeros (ui64 val)
static ui32 count_trailing_zeros (ui32 val)
static si32 ojph_round (float val)
static si32 ojph_trunc (float val)
template<typename T, ui32 N>
size_t calc_aligned_size (size_t size)
template<typename T, ui32 N>
T * align_ptr (T *ptr)
void * ojph_aligned_malloc (size_t alignment, size_t size)
void ojph_aligned_free (void *pointer)
OJPH_EXPORT void set_info_stream (FILE *s)
 Replaces the info output file from the default stdout to user defined output file.
OJPH_EXPORT void configure_info (message_info *info)
 This overrides the default behaviour of handling info messages.
OJPH_EXPORT message_infoget_info ()
 Get the info message object, whose operator() member class is called for info messages – See the macros below.
OJPH_EXPORT void set_warning_stream (FILE *s)
 Replaces the warning output file from the default stdout to user defined output file.
OJPH_EXPORT void configure_warning (message_warning *warn)
 This overrides the default behaviour of handling warning messages.
OJPH_EXPORT message_warningget_warning ()
 Get the warning message object, whose operator() member class is called for warning messages – See the macros below.
OJPH_EXPORT void set_error_stream (FILE *s)
 Replaces the error output file from the default stderr to user defined output file.
OJPH_EXPORT void configure_error (message_error *error)
 This overrides the default behaviour of handling error messages.
OJPH_EXPORT message_errorget_error ()
 Get the error message object, whose operator() member class is called for error messages – See the macros below.
OJPH_EXPORT void set_message_level (OJPH_MSG_LEVEL level)
 Sets the minimum severity of the message to be reported.
bool init_cpu_ext_level (int &level)

Variables

const ui32 byte_alignment = 64
const ui32 log_byte_alignment = 31 - count_leading_zeros(byte_alignment)
const ui32 object_alignment = 8
const int NUM_FRAC_BITS = 13
FILE * info_stream = stdout
message_info info
message_infolocal_info = &info
OJPH_MSG_LEVEL message_level = OJPH_MSG_ALL_MSG
FILE * warning_stream = stdout
message_warning warn
message_warninglocal_warn = &warn
FILE * error_stream = stderr
message_error error
message_errorlocal_error = &error

Typedef Documentation

◆ si16

typedef int16_t grk::t1::ojph::si16

◆ si32

typedef int32_t grk::t1::ojph::si32

◆ si64

typedef int64_t grk::t1::ojph::si64

◆ si8

typedef int8_t grk::t1::ojph::si8

◆ ui16

typedef uint16_t grk::t1::ojph::ui16

◆ ui32

typedef uint32_t grk::t1::ojph::ui32

◆ ui64

typedef uint64_t grk::t1::ojph::ui64

◆ ui8

typedef uint8_t grk::t1::ojph::ui8

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : int
Enumerator
ARM_CPU_EXT_LEVEL_GENERIC 
ARM_CPU_EXT_LEVEL_NEON 
ARM_CPU_EXT_LEVEL_ASIMD 
ARM_CPU_EXT_LEVEL_SVE 
ARM_CPU_EXT_LEVEL_SVE2 

◆ anonymous enum

anonymous enum : int
Enumerator
X86_CPU_EXT_LEVEL_GENERIC 
X86_CPU_EXT_LEVEL_MMX 
X86_CPU_EXT_LEVEL_SSE 
X86_CPU_EXT_LEVEL_SSE2 
X86_CPU_EXT_LEVEL_SSE3 
X86_CPU_EXT_LEVEL_SSSE3 
X86_CPU_EXT_LEVEL_SSE41 
X86_CPU_EXT_LEVEL_SSE42 
X86_CPU_EXT_LEVEL_AVX 
X86_CPU_EXT_LEVEL_AVX2 
X86_CPU_EXT_LEVEL_AVX2FMA 
X86_CPU_EXT_LEVEL_AVX512 

◆ OJPH_MSG_LEVEL

This enum is use to specify the level of severity of message while processing markers.

Enumerator
OJPH_MSG_ALL_MSG 
OJPH_MSG_INFO 
OJPH_MSG_WARN 
OJPH_MSG_ERROR 
OJPH_MSG_NO_MSG 

Function Documentation

◆ align_ptr()

template<typename T, ui32 N>
T * grk::t1::ojph::align_ptr ( T * ptr)
inline

◆ calc_aligned_size()

template<typename T, ui32 N>
size_t grk::t1::ojph::calc_aligned_size ( size_t size)

◆ configure_error()

void grk::t1::ojph::configure_error ( message_error * error)

This overrides the default behaviour of handling error messages.

Parameters
errorAn object derived from message_error to implement the desired behaviour. Remember, remember to throw an exception at the end.

References error, and local_error.

◆ configure_info()

void grk::t1::ojph::configure_info ( message_info * info)

This overrides the default behaviour of handling info messages.

Parameters
infoAn object derived from message_info to implement the desired behaviour.

References info, and local_info.

◆ configure_warning()

void grk::t1::ojph::configure_warning ( message_warning * warn)

This overrides the default behaviour of handling warning messages.

Parameters
warnAn object derived from message_warning to implement the desired behaviour.

References local_warn, and warn.

◆ count_leading_zeros() [1/2]

◆ count_leading_zeros() [2/2]

ui32 grk::t1::ojph::count_leading_zeros ( ui64 val)
inlinestatic

◆ count_trailing_zeros()

ui32 grk::t1::ojph::count_trailing_zeros ( ui32 val)
inlinestatic

References population_count().

◆ get_cpu_ext_level()

int grk::t1::ojph::get_cpu_ext_level ( )

◆ get_error()

message_error * grk::t1::ojph::get_error ( )

Get the error message object, whose operator() member class is called for error messages – See the macros below.

Returns
message_error* returns the active message_error object, or an object of the message_error-derived class if one was set. This object handles error messages. This is mainly to be used with the macros below.

References local_error.

◆ get_info()

message_info * grk::t1::ojph::get_info ( )

Get the info message object, whose operator() member class is called for info messages – See the macros below.

Returns
message_info* returns the active message_info object, or an object of the message_info-derived class if one was set. This object handles info messages. This is mainly to be used with the macros below.

References local_info.

◆ get_warning()

message_warning * grk::t1::ojph::get_warning ( )

Get the warning message object, whose operator() member class is called for warning messages – See the macros below.

Returns
message_warning* returns the active message_warning object, or an object of the message_warning-derived class if one was set. This object handles warning messages. This is mainly to be used with the macros below.

References local_warn.

◆ init_cpu_ext_level()

bool grk::t1::ojph::init_cpu_ext_level ( int & level)

Referenced by get_cpu_ext_level().

◆ ojph_aligned_free()

void grk::t1::ojph::ojph_aligned_free ( void * pointer)

◆ ojph_aligned_malloc()

void * grk::t1::ojph::ojph_aligned_malloc ( size_t alignment,
size_t size )

◆ ojph_round()

si32 grk::t1::ojph::ojph_round ( float val)
inlinestatic

◆ ojph_trunc()

si32 grk::t1::ojph::ojph_trunc ( float val)
inlinestatic

◆ population_count()

◆ set_error_stream()

void grk::t1::ojph::set_error_stream ( FILE * s)

Replaces the error output file from the default stderr to user defined output file.

Parameters
sA pointer to the desired output file; it can be stdout, stderr, a log file, or NULL if no error messages are desired.

References error_stream.

◆ set_info_stream()

void grk::t1::ojph::set_info_stream ( FILE * s)

Replaces the info output file from the default stdout to user defined output file.

Parameters
sA pointer to the desired output file; it can be stdout, stderr, a log file, or NULL if no info messages are desired.

References info_stream.

◆ set_message_level()

void grk::t1::ojph::set_message_level ( OJPH_MSG_LEVEL level)

Sets the minimum severity of the message to be reported.

Parameters
levelis the level of the message severity; values are defined in OJPH_MSG_LEVEL.

References message_level, OJPH_MSG_ALL_MSG, and OJPH_MSG_NO_MSG.

◆ set_warning_stream()

void grk::t1::ojph::set_warning_stream ( FILE * s)

Replaces the warning output file from the default stdout to user defined output file.

Parameters
sA pointer to the desired output file; it can be stdout, stderr, a log file, or NULL if no warning messages are desired.

References warning_stream.

Variable Documentation

◆ byte_alignment

const ui32 grk::t1::ojph::byte_alignment = 64

◆ error

message_error grk::t1::ojph::error

Referenced by configure_error().

◆ error_stream

FILE* grk::t1::ojph::error_stream = stderr

◆ info

message_info grk::t1::ojph::info

Referenced by configure_info().

◆ info_stream

FILE* grk::t1::ojph::info_stream = stdout

◆ local_error

message_error* grk::t1::ojph::local_error = &error

Referenced by configure_error(), and get_error().

◆ local_info

message_info* grk::t1::ojph::local_info = &info

Referenced by configure_info(), and get_info().

◆ local_warn

message_warning* grk::t1::ojph::local_warn = &warn

Referenced by configure_warning(), and get_warning().

◆ log_byte_alignment

const ui32 grk::t1::ojph::log_byte_alignment = 31 - count_leading_zeros(byte_alignment)

◆ message_level

◆ NUM_FRAC_BITS

const int grk::t1::ojph::NUM_FRAC_BITS = 13

◆ object_alignment

const ui32 grk::t1::ojph::object_alignment = 8

◆ warn

message_warning grk::t1::ojph::warn

Referenced by configure_warning().

◆ warning_stream

FILE* grk::t1::ojph::warning_stream = stdout