OpenJPH: ojph Namespace Reference

OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph Namespace Reference

## Namespaces
namespace | net
namespace | thds
namespace | stex
namespace | local

## Classes
class | image_in_base
class | ppm_in
class | dpx_in
class | yuv_in
class | raw_in
class | pfm_in
class | image_out_base
class | ppm_out
class | yuv_out
class | raw_out
class | pfm_out
class | argument
class | cli_interpreter
struct | size
struct | point
struct | rect
class | codestream
| The object represent a codestream. More...
class | outfile_base
class | j2c_outfile
class | mem_outfile
| mem_outfile stores encoded j2k codestreams in memory More...
class | infile_base
class | j2c_infile
class | mem_infile
class | mem_fixed_allocator
class | line_buf
struct | lifting_buf
struct | coded_lists
class | mem_elastic_allocator
class | message_base
| This is the base class from which all messaging levels are derived. 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 | message_error
| Derived from message_base to handle error messages. More...
class | param_siz
class | param_cod
class | param_coc
class | param_qcd
| Quantization parameters object. More...
class | param_nlt
| non-linearity point transformation object (implements NLT marker segment) More...
class | comment_exchange

## Typedefs
typedef void(* | conversion_fun) (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
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 | PROGRESSION_ORDER : si32 { OJPH_PO_LRCP = 0 , OJPH_PO_RLCP = 1 , OJPH_PO_RPCL = 2 , OJPH_PO_PCRL = 3 , OJPH_PO_CPRL = 4 }
enum | OJPH_PROFILE_NUM : si32 { OJPH_PN_UNDEFINED = 0 , OJPH_PN_PROFILE0 = 1 , OJPH_PN_PROFILE1 = 2 , OJPH_PN_CINEMA2K = 3 , OJPH_PN_CINEMA4K = 4 , OJPH_PN_CINEMAS2K = 5 , OJPH_PN_CINEMAS4K = 6 , OJPH_PN_BROADCAST = 7 , OJPH_PN_IMF = 8 }
enum | OJPH_TILEPART_DIVISIONS : ui32 { OJPH_TILEPART_NO_DIVISIONS = 0x0 , OJPH_TILEPART_RESOLUTIONS = 0x1 , OJPH_TILEPART_COMPONENTS = 0x2 , OJPH_TILEPART_LAYERS = 0x4 , OJPH_TILEPART_MASK = 0x3 }
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 | : int { PPC_CPU_EXT_LEVEL_GENERIC = 0 , PPC_CPU_EXT_LEVEL_ARCH_3_00 = 1 , PPC_CPU_EXT_LEVEL_ARCH_3_1 = 2 }
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
void | gen_cvrt_32b1c_to_8ub1c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | gen_cvrt_32b3c_to_8ub3c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | gen_cvrt_32b1c_to_16ub1c_be (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | gen_cvrt_32b3c_to_16ub3c_be (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b1c_to_8ub1c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b3c_to_8ub3c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b1c_to_16ub1c_le (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b3c_to_16ub3c_le (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b1c_to_16ub1c_be (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | sse41_cvrt_32b3c_to_16ub3c_be (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | avx2_cvrt_32b1c_to_8ub1c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | avx2_cvrt_32b3c_to_8ub3c (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | avx2_cvrt_32b1c_to_16ub1c_le (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
void | avx2_cvrt_32b1c_to_16ub1c_be (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)
static ui16 | be2le (const ui16 v)
static ui32 | be2le (const ui32 t)
static void | eat_white_spaces (FILE *fh)
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 ui32 | count_trailing_zeros (ui64 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)
static bool | check_if_machine_is_little_endian ()
static ui16 | swap_bytes_if_be (ui16 t)
static ui16 | swap_bytes_if_le (ui16 t)
static ui32 | swap_bytes_if_be (ui32 t)
static ui32 | swap_bytes_if_le (ui32 t)
static ui64 | swap_bytes_if_le (ui64 t)
static ui32 | load_le_ui32 (const ui8 *p)
static ui32 | load_le_ui16x2 (const ui16 *p)
int | ojph_fseek (FILE *stream, si64 offset, int origin)
si64 | ojph_ftell (FILE *stream)
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_info * | get_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_warning * | get_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_error * | get_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 bool | is_force_pfm_write_as_little_endian_on_disk = true
const char | OJPH_PO_STRING_LRCP [] = "LRCP"
const char | OJPH_PO_STRING_RLCP [] = "RLCP"
const char | OJPH_PO_STRING_RPCL [] = "RPCL"
const char | OJPH_PO_STRING_PCRL [] = "PCRL"
const char | OJPH_PO_STRING_CPRL [] = "CPRL"
const char | OJPH_PN_STRING_PROFILE0 [] = "PROFILE0"
const char | OJPH_PN_STRING_PROFILE1 [] = "PROFILE1"
const char | OJPH_PN_STRING_CINEMA2K [] = "CINEMA2K"
const char | OJPH_PN_STRING_CINEMA4K [] = "CINEMA4K"
const char | OJPH_PN_STRING_CINEMAS2K [] = "CINEMAS2K"
const char | OJPH_PN_STRING_CINEMAS4K [] = "CINEMAS4K"
const char | OJPH_PN_STRING_BROADCAST [] = "BROADCAST"
const char | OJPH_PN_STRING_IMF [] = "IMF"
const ui32 | byte_alignment = 64
const ui32 | log_byte_alignment = 31 - count_leading_zeros(byte_alignment)
const ui32 | object_alignment = 8
const bool | is_machine_little_endian = check_if_machine_is_little_endian()
const int | NUM_FRAC_BITS = 13
static int | cpu_level
static bool | cpu_level_initialized = init_cpu_ext_level(cpu_level)
FILE * | info_stream = stdout
message_info | info
message_info * | local_info = &info
OJPH_MSG_LEVEL | message_level = OJPH_MSG_ALL_MSG
FILE * | warning_stream = stdout
message_warning | warn
message_warning * | local_warn = &warn
FILE * | error_stream = stderr
message_error | error
message_error * | local_error = &error

## Typedef Documentation

## ◆ conversion_fun

typedef void(* ojph::conversion_fun) (const line_buf *ln0, const line_buf *ln1, const line_buf *ln2, void *dp, ui32 bit_depth, ui32 count)

Definition at line 513 of file ojph_img_io.h.

## ◆ si16

typedef int16_t ojph::si16

Definition at line 53 of file ojph_defs.h.

## ◆ si32

typedef int32_t ojph::si32

Definition at line 55 of file ojph_defs.h.

## ◆ si64

typedef int64_t ojph::si64

Definition at line 57 of file ojph_defs.h.

## ◆ si8

typedef int8_t ojph::si8

Definition at line 51 of file ojph_defs.h.

## ◆ ui16

typedef uint16_t ojph::ui16

Definition at line 52 of file ojph_defs.h.

## ◆ ui32

typedef uint32_t ojph::ui32

Definition at line 54 of file ojph_defs.h.

## ◆ ui64

typedef uint64_t ojph::ui64

Definition at line 56 of file ojph_defs.h.

## ◆ ui8

typedef uint8_t ojph::ui8

Definition at line 50 of file ojph_defs.h.

## 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 |

Definition at line 168 of file ojph_arch.h.

## ◆ 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 |

Definition at line 153 of file ojph_arch.h.

## ◆ anonymous enum

anonymous enum : int

Enumerator
PPC_CPU_EXT_LEVEL_GENERIC |
PPC_CPU_EXT_LEVEL_ARCH_3_00 |
PPC_CPU_EXT_LEVEL_ARCH_3_1 |

Definition at line 178 of file ojph_arch.h.

## ◆ OJPH_MSG_LEVEL

enum ojph::OJPH_MSG_LEVEL : int

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 |

Definition at line 52 of file ojph_message.h.

## ◆ OJPH_PROFILE_NUM

enum ojph::OJPH_PROFILE_NUM : si32

Enumerator
OJPH_PN_UNDEFINED |
OJPH_PN_PROFILE0 |
OJPH_PN_PROFILE1 |
OJPH_PN_CINEMA2K |
OJPH_PN_CINEMA4K |
OJPH_PN_CINEMAS2K |
OJPH_PN_CINEMAS4K |
OJPH_PN_BROADCAST |
OJPH_PN_IMF |

Definition at line 74 of file ojph_params_local.h.

## ◆ OJPH_TILEPART_DIVISIONS

enum ojph::OJPH_TILEPART_DIVISIONS : ui32

Enumerator
OJPH_TILEPART_NO_DIVISIONS |
OJPH_TILEPART_RESOLUTIONS |
OJPH_TILEPART_COMPONENTS |
OJPH_TILEPART_LAYERS |
OJPH_TILEPART_MASK |

Definition at line 98 of file ojph_params_local.h.

## ◆ PROGRESSION_ORDER

enum ojph::PROGRESSION_ORDER : si32

Enumerator
OJPH_PO_LRCP |
OJPH_PO_RLCP |
OJPH_PO_RPCL |
OJPH_PO_PCRL |
OJPH_PO_CPRL |

Definition at line 57 of file ojph_params_local.h.

## Function Documentation

## ◆ align_ptr()

template<typename T, ui32 N>

T * ojph::align_ptr | ( | T * | ptr | ) |
| inline

Definition at line 370 of file ojph_arch.h.

References count_leading_zeros().

Referenced by ojph::mem_fixed_allocator::post_alloc_local().

## ◆ avx2_cvrt_32b1c_to_16ub1c_be()

void ojph::avx2_cvrt_32b1c_to_16ub1c_be | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ avx2_cvrt_32b1c_to_16ub1c_le()

void ojph::avx2_cvrt_32b1c_to_16ub1c_le | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

## ◆ avx2_cvrt_32b1c_to_8ub1c()

void ojph::avx2_cvrt_32b1c_to_8ub1c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ avx2_cvrt_32b3c_to_8ub3c()

void ojph::avx2_cvrt_32b3c_to_8ub3c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ be2le() [1/2]

ui16 ojph::be2le | ( | const ui16 | v | ) |
| static

Definition at line 55 of file ojph_img_io.cpp.

Referenced by be2le(), ojph::dpx_in::open(), ojph::dpx_in::read(), ojph::pfm_in::read(), and ojph::pfm_out::write().

## ◆ be2le() [2/2]

ui32 ojph::be2le | ( | const ui32 | t | ) |
| inlinestatic

Definition at line 62 of file ojph_img_io.cpp.

References be2le().

## ◆ calc_aligned_size()

template<typename T, ui32 N>

size_t ojph::calc_aligned_size | ( | size_t | size | ) |

Definition at line 360 of file ojph_arch.h.

References count_leading_zeros().

Referenced by load_ppm(), load_yuv(), ojph::mem_fixed_allocator::post_alloc_local(), and ojph::mem_fixed_allocator::pre_alloc_local().

## ◆ check_if_machine_is_little_endian()

bool ojph::check_if_machine_is_little_endian | ( |  | ) |
| static

Definition at line 394 of file ojph_arch.h.

References is_machine_little_endian.

## ◆ configure_error()

void ojph::configure_error | ( | message_error * | error | ) |

This overrides the default behaviour of handling error messages.

Parameters

  error | An object derived from message_error to implement the desired behaviour. Remember, remember to throw an exception at the end.

Definition at line 138 of file ojph_message.cpp.

References error, and local_error.

## ◆ configure_info()

void ojph::configure_info | ( | message_info * | info | ) |

This overrides the default behaviour of handling info messages.

Parameters

  info | An object derived from message_info to implement the desired behaviour.

Definition at line 56 of file ojph_message.cpp.

References info, and local_info.

## ◆ configure_warning()

void ojph::configure_warning | ( | message_warning * | warn | ) |

This overrides the default behaviour of handling warning messages.

Parameters

  warn | An object derived from message_warning to implement the desired behaviour.

Definition at line 97 of file ojph_message.cpp.

References local_warn, and warn.

## ◆ count_leading_zeros() [1/2]

ui32 ojph::count_leading_zeros | ( | ui32 | val | ) |
| inlinestatic

Definition at line 206 of file ojph_arch.h.

References population_count().

Referenced by align_ptr(), calc_aligned_size(), ojph::local::frwd_read(), ojph::local::log2ceil(), ojph::local::ojph_decode_codeblock32(), ojph::local::ojph_decode_codeblock64(), ojph::local::ojph_encode_codeblock32(), ojph::local::ojph_encode_codeblock64(), ojph::ppm_in::open(), ojph::local::precinct::parse(), ojph::local::precinct::prepare_precinct(), ojph::param_cod::set_block_dims(), and ojph::param_cod::set_precinct_size().

## ◆ count_leading_zeros() [2/2]

ui32 ojph::count_leading_zeros | ( | ui64 | val | ) |
| inlinestatic

Definition at line 234 of file ojph_arch.h.

## ◆ count_trailing_zeros() [1/2]

ui32 ojph::count_trailing_zeros | ( | ui32 | val | ) |
| inlinestatic

Definition at line 269 of file ojph_arch.h.

References population_count().

Referenced by count_trailing_zeros().

## ◆ count_trailing_zeros() [2/2]

ui32 ojph::count_trailing_zeros | ( | ui64 | val | ) |
| inlinestatic

Definition at line 291 of file ojph_arch.h.

References count_trailing_zeros().

## ◆ eat_white_spaces()

void ojph::eat_white_spaces | ( | FILE * | fh | ) |
| static

Definition at line 72 of file ojph_img_io.cpp.

Referenced by ojph::pfm_in::open(), and ojph::ppm_in::open().

## ◆ gen_cvrt_32b1c_to_16ub1c_be()

void ojph::gen_cvrt_32b1c_to_16ub1c_be | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Definition at line 190 of file ojph_img_io.cpp.

References ojph::line_buf::i32, ojph_unused, and swap_bytes_if_le().

Referenced by ojph::ppm_out::configure().

## ◆ gen_cvrt_32b1c_to_8ub1c()

void ojph::gen_cvrt_32b1c_to_8ub1c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Definition at line 99 of file ojph_img_io.cpp.

References ojph::line_buf::i32, and ojph_unused.

Referenced by ojph::ppm_out::configure().

## ◆ gen_cvrt_32b3c_to_16ub3c_be()

void ojph::gen_cvrt_32b3c_to_16ub3c_be | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Definition at line 208 of file ojph_img_io.cpp.

References ojph::line_buf::i32, and swap_bytes_if_le().

Referenced by ojph::ppm_out::configure().

## ◆ gen_cvrt_32b3c_to_8ub3c()

void ojph::gen_cvrt_32b3c_to_8ub3c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Definition at line 118 of file ojph_img_io.cpp.

References ojph::line_buf::i32.

Referenced by ojph::ppm_out::configure().

## ◆ get_cpu_ext_level()

int ojph::get_cpu_ext_level | ( |  | ) |

Definition at line 296 of file ojph_arch.cpp.

References cpu_level, and cpu_level_initialized.

Referenced by ojph::ppm_out::configure(), ojph::local::codeblock_fun::init(), ojph::local::init_colour_transform_functions(), and ojph::local::init_wavelet_transform_functions().

## ◆ get_error()

message_error * 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.

Definition at line 144 of file ojph_message.cpp.

References local_error.

## ◆ get_info()

message_info * 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.

Definition at line 62 of file ojph_message.cpp.

References local_info.

## ◆ get_warning()

message_warning * 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.

Definition at line 103 of file ojph_message.cpp.

References local_warn.

## ◆ init_cpu_ext_level()

bool ojph::init_cpu_ext_level | ( | int & | level | ) |

Definition at line 266 of file ojph_arch.cpp.

## ◆ load_le_ui16x2()

ui32 ojph::load_le_ui16x2 | ( | const ui16 * | p | ) |
| inlinestatic

Definition at line 485 of file ojph_arch.h.

References is_machine_little_endian.

Referenced by ojph::local::ojph_decode_codeblock32(), and ojph::local::ojph_decode_codeblock64().

## ◆ load_le_ui32()

ui32 ojph::load_le_ui32 | ( | const ui8 * | p | ) |
| inlinestatic

Definition at line 469 of file ojph_arch.h.

References is_machine_little_endian.

Referenced by ojph::local::frwd_read(), ojph::local::frwd_read(), ojph::local::mel_read(), ojph::local::rev_read(), and ojph::local::rev_read_mrp().

## ◆ ojph_aligned_free()

void ojph::ojph_aligned_free | ( | void * | pointer | ) |

Referenced by ojph::mem_outfile::expand_storage(), and ojph::mem_outfile::~mem_outfile().

## ◆ ojph_aligned_malloc()

void * ojph::ojph_aligned_malloc | ( | size_t | alignment,
|  | size_t | size )

Referenced by ojph::mem_outfile::expand_storage().

## ◆ ojph_fseek()

int ojph::ojph_fseek | ( | FILE * | stream,
|  | si64 | offset,
|  | int | origin )
| inline

Definition at line 61 of file ojph_file.h.

Referenced by ojph::pfm_in::read(), ojph::ppm_in::read(), ojph::j2c_infile::seek(), and ojph::pfm_out::write().

## ◆ ojph_ftell()

si64 ojph::ojph_ftell | ( | FILE * | stream | ) |
| inline

Definition at line 66 of file ojph_file.h.

Referenced by ojph::pfm_in::open(), ojph::pfm_out::open(), ojph::ppm_in::open(), ojph::j2c_infile::tell(), and ojph::j2c_outfile::tell().

## ◆ ojph_round()

si32 ojph::ojph_round | ( | float | val | ) |
| inlinestatic

Definition at line 317 of file ojph_arch.h.

Referenced by ojph::local::local_gen_irv_convert_to_integer().

## ◆ ojph_trunc()

si32 ojph::ojph_trunc | ( | float | val | ) |
| inlinestatic

Definition at line 329 of file ojph_arch.h.

Referenced by ojph::local::gen_irv_tx_to_cb32().

## ◆ population_count()

ui32 ojph::population_count | ( | ui32 | val | ) |
| inlinestatic

Definition at line 185 of file ojph_arch.h.

Referenced by count_leading_zeros(), count_trailing_zeros(), ojph::local::ojph_decode_codeblock32(), ojph::local::ojph_decode_codeblock64(), ojph::local::param_cap::read(), and ojph::local::vlc_init_tables().

## ◆ set_error_stream()

void ojph::set_error_stream | ( | FILE * | s | ) |

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

Parameters

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

Definition at line 150 of file ojph_message.cpp.

References error_stream.

## ◆ set_info_stream()

void ojph::set_info_stream | ( | FILE * | s | ) |

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

Parameters

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

Definition at line 68 of file ojph_message.cpp.

References info_stream.

## ◆ set_message_level()

void ojph::set_message_level | ( | OJPH_MSG_LEVEL | level | ) |

Sets the minimum severity of the message to be reported.

Parameters

  level | is the level of the message severity; values are defined in OJPH_MSG_LEVEL.

Definition at line 174 of file ojph_message.cpp.

References message_level, OJPH_MSG_ALL_MSG, and OJPH_MSG_NO_MSG.

## ◆ set_warning_stream()

void ojph::set_warning_stream | ( | FILE * | s | ) |

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

Parameters

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

Definition at line 109 of file ojph_message.cpp.

References warning_stream.

## ◆ sse41_cvrt_32b1c_to_16ub1c_be()

void ojph::sse41_cvrt_32b1c_to_16ub1c_be | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ sse41_cvrt_32b1c_to_16ub1c_le()

void ojph::sse41_cvrt_32b1c_to_16ub1c_le | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

## ◆ sse41_cvrt_32b1c_to_8ub1c()

void ojph::sse41_cvrt_32b1c_to_8ub1c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ sse41_cvrt_32b3c_to_16ub3c_be()

void ojph::sse41_cvrt_32b3c_to_16ub3c_be | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ sse41_cvrt_32b3c_to_16ub3c_le()

void ojph::sse41_cvrt_32b3c_to_16ub3c_le | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

## ◆ sse41_cvrt_32b3c_to_8ub3c()

void ojph::sse41_cvrt_32b3c_to_8ub3c | ( | const line_buf * | ln0,
|  | const line_buf * | ln1,
|  | const line_buf * | ln2,
|  | void * | dp,
|  | ui32 | bit_depth,
|  | ui32 | count )

Referenced by ojph::ppm_out::configure().

## ◆ swap_bytes_if_be() [1/2]

ui16 ojph::swap_bytes_if_be | ( | ui16 | t | ) |
| inlinestatic

Definition at line 405 of file ojph_arch.h.

References is_machine_little_endian.

Referenced by load_rawl(), ojph::raw_in::read(), ojph::yuv_in::read(), swap_bytes_if_be(), ojph::raw_out::write(), and ojph::yuv_out::write().

## ◆ swap_bytes_if_be() [2/2]

ui32 ojph::swap_bytes_if_be | ( | ui32 | t | ) |
| inlinestatic

Definition at line 423 of file ojph_arch.h.

References is_machine_little_endian, and swap_bytes_if_be().

## ◆ swap_bytes_if_le() [1/3]

ui16 ojph::swap_bytes_if_le | ( | ui16 | t | ) |
| inlinestatic

Definition at line 414 of file ojph_arch.h.

References is_machine_little_endian.

Referenced by ojph::local::bb_skip_sop(), ojph::local::codestream::flush(), ojph::local::tile::flush(), gen_cvrt_32b1c_to_16ub1c_be(), gen_cvrt_32b3c_to_16ub3c_be(), ojph::local::param_cod::internal_write_coc(), ojph::local::param_qcd::internal_write_qcc(), ojph::local::param_atk::read(), ojph::local::param_cap::read(), ojph::local::param_cod::read(), ojph::local::param_dfs::read(), ojph::local::param_nlt::read(), ojph::local::param_qcd::read(), ojph::local::param_siz::read(), ojph::local::param_sot::read(), ojph::ppm_in::read(), ojph::local::param_cod::read_coc(), ojph::local::param_atk::read_coefficient(), ojph::local::param_atk::read_coefficient(), ojph::local::param_qcd::read_qcc(), ojph::local::skip_marker(), swap_bytes_if_le(), swap_bytes_if_le(), ojph::local::param_cap::write(), ojph::local::param_cod::write(), ojph::local::param_nlt::write(), ojph::local::param_qcd::write(), ojph::local::param_siz::write(), ojph::local::param_sot::write(), ojph::local::param_sot::write(), ojph::local::param_tlm::write(), and ojph::local::codestream::write_headers().

## ◆ swap_bytes_if_le() [2/3]

ui32 ojph::swap_bytes_if_le | ( | ui32 | t | ) |
| inlinestatic

Definition at line 437 of file ojph_arch.h.

References is_machine_little_endian, and swap_bytes_if_le().

## ◆ swap_bytes_if_le() [3/3]

ui64 ojph::swap_bytes_if_le | ( | ui64 | t | ) |
| inlinestatic

Definition at line 451 of file ojph_arch.h.

References is_machine_little_endian, and swap_bytes_if_le().

## Variable Documentation

## ◆ byte_alignment

const ui32 ojph::byte_alignment = 64

Definition at line 344 of file ojph_arch.h.

Referenced by ojph::local::codeblock::finalize_alloc(), and ojph::local::codeblock::pre_alloc().

## ◆ cpu_level

int ojph::cpu_level
| static

Definition at line 292 of file ojph_arch.cpp.

Referenced by get_cpu_ext_level().

## ◆ cpu_level_initialized

bool ojph::cpu_level_initialized = init_cpu_ext_level(cpu_level)
| static

Definition at line 293 of file ojph_arch.cpp.

Referenced by get_cpu_ext_level().

## ◆ error

message_error ojph::error

Definition at line 134 of file ojph_message.cpp.

Referenced by configure_error(), and ojph::local::tile::parse_tile_header().

## ◆ error_stream

FILE* ojph::error_stream = stderr

Definition at line 131 of file ojph_message.cpp.

Referenced by ojph::message_error::operator()(), and set_error_stream().

## ◆ info

message_info ojph::info

Definition at line 51 of file ojph_message.cpp.

Referenced by configure_info().

## ◆ info_stream

FILE* ojph::info_stream = stdout

Definition at line 48 of file ojph_message.cpp.

Referenced by ojph::message_info::operator()(), and set_info_stream().

## ◆ is_force_pfm_write_as_little_endian_on_disk

const bool ojph::is_force_pfm_write_as_little_endian_on_disk = true

Definition at line 730 of file ojph_img_io.cpp.

Referenced by ojph::pfm_out::configure(), and ojph::pfm_out::write().

## ◆ is_machine_little_endian

const bool ojph::is_machine_little_endian = check_if_machine_is_little_endian()

Definition at line 400 of file ojph_arch.h.

Referenced by check_if_machine_is_little_endian(), ojph::pfm_out::configure(), load_le_ui16x2(), load_le_ui32(), ojph::pfm_in::read(), swap_bytes_if_be(), swap_bytes_if_be(), swap_bytes_if_le(), swap_bytes_if_le(), swap_bytes_if_le(), and ojph::pfm_out::write().

## ◆ local_error

message_error* ojph::local_error = &error

Definition at line 135 of file ojph_message.cpp.

Referenced by configure_error(), and get_error().

## ◆ local_info

message_info* ojph::local_info = &info

Definition at line 52 of file ojph_message.cpp.

Referenced by configure_info(), and get_info().

## ◆ local_warn

message_warning* ojph::local_warn = &warn

Definition at line 94 of file ojph_message.cpp.

Referenced by configure_warning(), and get_warning().

## ◆ log_byte_alignment

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

Definition at line 345 of file ojph_arch.h.

## ◆ message_level

OJPH_MSG_LEVEL ojph::message_level = OJPH_MSG_ALL_MSG

Definition at line 53 of file ojph_message.cpp.

Referenced by ojph::message_error::operator()(), ojph::message_info::operator()(), ojph::message_warning::operator()(), and set_message_level().

## ◆ NUM_FRAC_BITS

const int ojph::NUM_FRAC_BITS = 13

Definition at line 67 of file ojph_defs.h.

## ◆ object_alignment

const ui32 ojph::object_alignment = 8

Definition at line 346 of file ojph_arch.h.

## ◆ OJPH_PN_STRING_BROADCAST

const char ojph::OJPH_PN_STRING_BROADCAST[] = "BROADCAST"

Definition at line 94 of file ojph_params_local.h.

Referenced by ojph::local::codestream::set_profile().

## ◆ OJPH_PN_STRING_CINEMA2K

const char ojph::OJPH_PN_STRING_CINEMA2K[] = "CINEMA2K"

Definition at line 90 of file ojph_params_local.h.

## ◆ OJPH_PN_STRING_CINEMA4K

const char ojph::OJPH_PN_STRING_CINEMA4K[] = "CINEMA4K"

Definition at line 91 of file ojph_params_local.h.

## ◆ OJPH_PN_STRING_CINEMAS2K

const char ojph::OJPH_PN_STRING_CINEMAS2K[] = "CINEMAS2K"

Definition at line 92 of file ojph_params_local.h.

## ◆ OJPH_PN_STRING_CINEMAS4K

const char ojph::OJPH_PN_STRING_CINEMAS4K[] = "CINEMAS4K"

Definition at line 93 of file ojph_params_local.h.

## ◆ OJPH_PN_STRING_IMF

const char ojph::OJPH_PN_STRING_IMF[] = "IMF"

Definition at line 95 of file ojph_params_local.h.

Referenced by ojph::local::codestream::set_profile().

## ◆ OJPH_PN_STRING_PROFILE0

const char ojph::OJPH_PN_STRING_PROFILE0[] = "PROFILE0"

Definition at line 88 of file ojph_params_local.h.

## ◆ OJPH_PN_STRING_PROFILE1

const char ojph::OJPH_PN_STRING_PROFILE1[] = "PROFILE1"

Definition at line 89 of file ojph_params_local.h.

## ◆ OJPH_PO_STRING_CPRL

const char ojph::OJPH_PO_STRING_CPRL[] = "CPRL"

Definition at line 71 of file ojph_params_local.h.

Referenced by ojph::param_cod::get_progression_order_as_string(), and ojph::param_cod::set_progression_order().

## ◆ OJPH_PO_STRING_LRCP

const char ojph::OJPH_PO_STRING_LRCP[] = "LRCP"

Definition at line 67 of file ojph_params_local.h.

Referenced by ojph::param_cod::get_progression_order_as_string(), and ojph::param_cod::set_progression_order().

## ◆ OJPH_PO_STRING_PCRL

const char ojph::OJPH_PO_STRING_PCRL[] = "PCRL"

Definition at line 70 of file ojph_params_local.h.

Referenced by ojph::param_cod::get_progression_order_as_string(), and ojph::param_cod::set_progression_order().

## ◆ OJPH_PO_STRING_RLCP

const char ojph::OJPH_PO_STRING_RLCP[] = "RLCP"

Definition at line 68 of file ojph_params_local.h.

Referenced by ojph::param_cod::get_progression_order_as_string(), and ojph::param_cod::set_progression_order().

## ◆ OJPH_PO_STRING_RPCL

const char ojph::OJPH_PO_STRING_RPCL[] = "RPCL"

Definition at line 69 of file ojph_params_local.h.

Referenced by ojph::param_cod::get_progression_order_as_string(), and ojph::param_cod::set_progression_order().

## ◆ warn

message_warning ojph::warn

Definition at line 93 of file ojph_message.cpp.

Referenced by configure_warning().

## ◆ warning_stream

FILE* ojph::warning_stream = stdout

Definition at line 90 of file ojph_message.cpp.

Referenced by ojph::message_warning::operator()(), and set_warning_stream().