grk Namespace Reference

Copyright (C) 2016-2023 Grok Image Compression Inc. More...

## Namespaces

namespace | HWY_NAMESPACE
namespace | t1_part1

## Classes

struct | AllocatorAligned
struct | AllocatorVanilla
struct | AsocBox
| Association box (defined in ITU 15444-2 Annex M 11.1 ) More...
class | BadAsocException
class | BitIO
class | BlockCache
struct | BlockExec
struct | BoxWriteHandler
struct | BufferedStream
class | BufPool
struct | cblk_enc
class | ChronoTimer
struct | Codeblock
struct | CodePass
class | CodeStream
class | CodeStreamCompress
class | CodeStreamDecompress
struct | CodeStreamInfo
struct | CodingParams
| Coding parameters. More...
struct | ComponentInfo
struct | CompressBlockExec
struct | CompressCodeblock
struct | CompressorState
class | CompressScheduler
class | CorruptJP2BoxException
class | CorruptMarkerException
class | CorruptPacketDataException
class | CorruptPacketException
class | CorruptPacketHeaderException
class | CorruptSOTMarkerException
class | CorruptTLMException
class | DecodeUnknownMarkerAtEndOfTileException
struct | DecodingParams
struct | DecompressBlockExec
struct | DecompressCodeblock
struct | DecompressorState
class | DecompressScheduler
class | dwt53
class | dwt97
struct | dwt_data
struct | dwt_line
struct | encode_h_job
struct | encode_v_job
struct | EncodingParams
class | FileFormat
| JPEG 2000 file format reader/writer. More...
struct | FileFormatBox
class | FileFormatCompress
class | FileFormatDecompress
struct | grk_buf
struct | grk_buf2d
struct | grk_buf2d_simple
struct | grk_line
struct | grk_mct_data
| MCT data. More...
struct | grk_plugin_debug_mqc
struct | grk_ppx
struct | grk_pt
struct | grk_rect
struct | grk_simple_mcc_decorrelation_data
| MCC decorrelation data. More...
struct | grk_stepsize
| Quantization stepsize. More...
class | GrkImage
class | GrkImageMeta
struct | GrkIOBuf
class | GrkMatrix
class | GrkObjectWrapper
class | GrkObjectWrapperImpl
class | IBitIO
| Bit input/output. More...
class | ICacheable
struct | ICodeStreamCompress
struct | ICodeStreamDecompress
class | ImageComponentFlow
struct | IncludeTracker
class | InvalidMarkerException
class | ISparseCanvas
struct | j2k_prog_order
struct | Layer
struct | logger
struct | marker_handler
struct | MarkerInfo
class | mct
struct | MemStream
class | MinHeap
struct | MinHeapComparator
class | MinHeapFakeLocker
class | MinHeapLocker
class | MinHeapPtr
struct | MinHeapPtrComparator
struct | minpf_dynamic_library
struct | minpf_object_params
struct | minpf_platform_services
struct | minpf_plugin_api_version
struct | minpf_plugin_manager
struct | minpf_register_params
struct | mqc_state
struct | mqcoder
struct | PacketInfo
struct | PacketInfoCache
struct | PacketIter
| Packet iterator. More...
class | PacketManager
class | PacketParser
struct | PacketTracker
struct | Params97
struct | ParserMap
struct | pass_enc
struct | PiComp
| Packet iterator component. More...
struct | PiResolution
class | PLCache
struct | PLMarkerMgr
struct | plugin_encode_user_callback_info
struct | PluginDecodeCallbackInfo
class | PluginDecodeUnsupportedException
class | PPMMarker
struct | Precinct
struct | PrecinctImpl
struct | PrecinctPacketParsers
class | Profile
struct | Quantizer
class | RateControl
class | RateInfo
struct | ResDecompressBlocks
struct | ResFlow
struct | ResIncludeBuffers
struct | Resolution
struct | ResPrecinctInfo
struct | ResSimple
struct | ResWindow
| ResWindow. More...
class | RoiScaleFilter
class | RoiShiftFilter
class | ScaleFilter
struct | ScheduleInfo
class | Scheduler
struct | Segment
class | SequentialPtrCache
class | ShiftFilter
struct | ShiftInfo
class | SIZMarker
class | SOTMarker
struct | SparseBlock
struct | SparseBuffer
class | SparseBufferOverrunException
class | SparseCache
class | SparseCanvas
struct | Strip
class | StripCache
struct | Subband
struct | T1
class | T1Factory
class | T1Interface
struct | T2Compress
| Tier-2 coding. More...
struct | T2Decompress
| Tier-2 decoding. More...
class | TagTree
| Tag tree. More...
struct | TagTreeNode
| Tag node. More...
struct | TaskInfo
struct | Tile
class | TileCache
struct | TileCacheEntry
struct | TileCodingParams
| Tile coding parameters : this structure is used to store coding/decoding parameters common to all tiles (information like COD, COC in main header) More...
struct | TileComponent
struct | TileComponentCodingParams
| Tile-component coding parameters. More...
struct | TileComponentWindow
struct | TileComponentWindowBase
struct | TileInfo
struct | TileLengthMarkers
struct | TilePartInfo
struct | TilePartLengthInfo
struct | TileProcessor
class | TileSet
class | TruncatedPacketHeaderException
struct | UUIDBox
struct | vec
class | WaveletFwdImpl
class | WaveletReverse

## Typedefs

typedef std::vector< TilePartLengthInfo > | TL_INFO_VEC
typedef std::map< uint16_t, TL_INFO_VEC * > | TL_MAP
typedef std::vector< grk_buf8 * > | PL_MARKER
typedef std::map< uint32_t, PL_MARKER * > | PL_MARKERS
typedef void(* | j2k_mct_function) (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
typedef std::function< bool(void)> | PROCEDURE_FUNC
typedef std::function< bool(uint8_t *headerData, uint16_t header_size)> | MARKER_FUNC
typedef std::function< uint8_t *(uint32_t *len)> | WRITE_FUNC
typedef std::function< bool(uint8_t *headerData, uint32_t header_size)> | BOX_FUNC
typedef struct grk::minpf_object_params | minpf_object_params
typedef struct grk::minpf_plugin_api_version | minpf_plugin_api_version
typedef void *(* | minpf_create_func) (minpf_object_params *)
typedef int32_t(* | minpf_destroy_func) (void *)
typedef struct grk::minpf_register_params | minpf_register_params
typedef int32_t(* | minpf_register_func) (const char *nodeType, const minpf_register_params *params)
typedef int32_t(* | minpf_invoke_service_func) (const char *serviceName, void *serviceParams)
typedef struct grk::minpf_platform_services | minpf_platform_services
typedef int32_t(* | minpf_exit_func) ()
typedef minpf_exit_func(* | minpf_post_load_func) (const char *pluginPath, const minpf_platform_services *)
typedef struct grk::minpf_plugin_manager | minpf_plugin_manager
typedef uint32_t(* | PLUGIN_GET_DEBUG_STATE) (void)
typedef void(* | PLUGIN_DEBUG_MQC_NEXT_CXD) (grk_plugin_debug_mqc *mqc, uint32_t d)
typedef void(* | PLUGIN_DEBUG_MQC_NEXT_PLANE) (grk_plugin_debug_mqc *mqc)
typedef void(* | PLUGIN_ENCODE_USER_CALLBACK) (plugin_encode_user_callback_info *info)
typedef bool(* | PLUGIN_INIT) (grk_plugin_init_info initInfo)
typedef int32_t(* | PLUGIN_ENCODE) (grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK callback)
typedef int32_t(* | PLUGIN_BATCH_ENCODE) (const char *input_dir, const char *output_dir, grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK userCallback)
typedef void(* | PLUGIN_STOP_BATCH_ENCODE) (void)
typedef bool(* | PLUGIN_IS_BATCH_COMPLETE) (void)
typedef int32_t(* | PLUGIN_DECODE_USER_CALLBACK) (PluginDecodeCallbackInfo *info)
typedef int32_t(* | PLUGIN_DECODE) (grk_decompress_parameters *decoding_parameters, PLUGIN_DECODE_USER_CALLBACK userCallback)
typedef int32_t(* | PLUGIN_INIT_BATCH_DECODE) (const char *input_dir, const char *output_dir, grk_decompress_parameters *decoding_parameters, PLUGIN_DECODE_USER_CALLBACK userCallback)
typedef int32_t(* | PLUGIN_BATCH_DECODE) (void)
typedef void(* | PLUGIN_STOP_BATCH_DECODE) (void)
typedef std::vector< ResDecompressBlocks > | ComponentDecompressBlocks
typedef std::vector< ComponentDecompressBlocks > | TileDecompressBlocks
typedef uint32_t | grk_flag
| Flags for 4 consecutive rows of a column.
typedef TagTree< uint8_t > | TagTreeU8
typedef TagTree< uint16_t > | TagTreeU16
using | grk_buf8 = grk_buf< uint8_t, AllocatorVanilla >
using | grk_buf8_aligned = grk_buf< uint8_t, AllocatorAligned >
using | grk_pt32 = grk_pt< uint32_t >
using | grk_pt16 = grk_pt< uint16_t >
using | grk_line32 = grk_line< uint32_t >
using | grk_rect32 = grk_rect< uint32_t >
using | grk_rect16 = grk_rect< uint16_t >
using | grk_rect_single = grk_rect< float >
typedef int32_t | grk_handle
typedef size_t(* | grk_stream_zero_copy_read_fn) (uint8_t **buffer, size_t numBytes, void *user_data)
typedef vec< float, 4 > | vec4f

## Enumerations

enum | GrkCacheState { GRK_CACHE_STATE_CLOSED , GRK_CACHE_STATE_OPEN , GRK_CACHE_STATE_ERROR }
enum | J2K_MCT_ELEMENT_TYPE { MCT_TYPE_INT16 = 0 , MCT_TYPE_INT32 = 1 , MCT_TYPE_FLOAT = 2 , MCT_TYPE_DOUBLE = 3 }
| Type of elements storing in the MCT data. More...
enum | J2K_MCT_ARRAY_TYPE { MCT_TYPE_DEPENDENCY = 0 , MCT_TYPE_DECORRELATION = 1 , MCT_TYPE_OFFSET = 2 }
| Type of MCT array. More...
enum | DECOMPRESS_STATE { DECOMPRESS_STATE_NONE = 0x0000 , DECOMPRESS_STATE_MH_SOC = 0x0001 , DECOMPRESS_STATE_MH_SIZ = 0x0002 , DECOMPRESS_STATE_MH = 0x0004 , DECOMPRESS_STATE_TPH = 0x0008 , DECOMPRESS_STATE_TPH_SOT = 0x0010 , DECOMPRESS_STATE_DATA = 0x0020 , DECOMPRESS_STATE_EOC = 0x0040 , DECOMPRESS_STATE_NO_EOC = 0x0080 }
| Status of decoding process when decoding main header or tile header. More...
enum | JP2_STATE { JP2_STATE_NONE = 0x0 , JP2_STATE_SIGNATURE = 0x1 , JP2_STATE_FILE_TYPE = 0x2 , JP2_STATE_HEADER = 0x4 , JP2_STATE_CODESTREAM = 0x8 , JP2_STATE_END_CODESTREAM = 0x10 , JP2_STATE_UNKNOWN = 0x7fffffff }
enum | J2K_T2_MODE { THRESH_CALC = 0 , FINAL_PASS = 1 }
enum | eBandOrientation { BAND_ORIENT_LL , BAND_ORIENT_HL , BAND_ORIENT_LH , BAND_ORIENT_HH , BAND_NUM_ORIENTATIONS }
enum | eBandIndex { BAND_INDEX_HL , BAND_INDEX_LH , BAND_INDEX_HH , BAND_NUM_INDICES }
enum | eSplitOrientation { SPLIT_L , SPLIT_H , SPLIT_NUM_ORIENTATIONS }

## Functions

uint32_t | grk_make_aligned_width (uint32_t width)
static void * | grk_aligned_alloc_N (size_t alignment, size_t size)
void * | grk_malloc (size_t size)
| Allocate an uninitialized memory block.
void * | grk_calloc (size_t numOfElements, size_t sizeOfElements)
| Allocate a memory block with elements initialized to 0.
void * | grk_aligned_malloc (size_t size)
| Allocate memory aligned to a 16 byte boundary.
void | grk_aligned_free (void *ptr)
void * | grk_realloc (void *m, size_t s)
| Reallocate memory blocks.
void | grk_free (void *m)
| Deallocates or frees a memory block.
static bool | grkReclaimCallback (uint32_t threadId, grk_io_buf buffer, void *io_user_data)
template<typename S , typename D >
void | j2k_write (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_write_float_to_int16 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_write_float_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_write_float_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_write_float_to_float64 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_int16_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_int32_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_float32_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_float64_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_int16_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_int32_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_float32_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
static void | j2k_read_float64_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
void | MycmsLogErrorHandlerFunction (cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)
bool | minpf_get_full_path (const char *path, void *addr, dynamic_handle_t handle, char *fullPath, size_t fullPathLen)
bool | minpf_unload_dynamic_library (minpf_dynamic_library *library)
minpf_dynamic_library * | minpf_load_dynamic_library (const char *path, char *error)
void * | minpf_get_symbol (minpf_dynamic_library *library, const char *symbol)
PLUGIN_API minpf_exit_func | minpf_init_plugin (const char *pluginPath, const minpf_platform_services *params)
static int32_t | minpf_post_load_plugin (const char *pluginPath, minpf_post_load_func initFunc)
static const char * | get_filename_ext (const char *filename)
static int32_t | minpf_load (const char *path)
static uint32_t | minpf_is_valid_plugin (const char *id, const minpf_register_params *params)
int32_t | minpf_register_object (const char *id, const minpf_register_params *params)
const char * | minpf_get_dynamic_library_extension (void)
void | minpf_initialize_plugin_manager (minpf_plugin_manager *manager)
minpf_plugin_manager * | minpf_get_plugin_manager (void)
void | minpf_cleanup_plugin_manager (void)
int32_t | minpf_load_from_path (const char *path, minpf_invoke_service_func func)
int32_t | minpf_load_from_dir (const char *directory_path, minpf_invoke_service_func func)
void | decompress_synch_plugin_with_host (TileProcessor *tcd)
bool | tile_equals (grk_plugin_tile *plugin_tile, Tile *tilePtr)
void | compress_synch_with_plugin (TileProcessor *tcd, uint16_t compno, uint32_t resno, uint32_t bandIndex, uint64_t precinctIndex, uint64_t cblkno, Subband *band, CompressCodeblock *cblk, uint32_t *numPix)
void | set_context_stream (TileProcessor *p_tileProcessor)
void | mqc_next_plane (grk_plugin_debug_mqc *mqc)
void | nextCXD (grk_plugin_debug_mqc *mqc, uint32_t d)
uint32_t | mqc_numbytes_enc (mqcoder *mqc)
void | mqc_resetstates (mqcoder *mqc)
void | mqc_init_enc (mqcoder *mqc, uint8_t *bp)
void | mqc_encode (mqcoder *mqc, uint32_t d)
void | mqc_flush_enc (mqcoder *mqc)
void | mqc_bypass_init_enc (mqcoder *mqc)
uint32_t | mqc_bypass_get_extra_bytes_enc (mqcoder *mqc, bool erterm)
void | mqc_bypass_enc (mqcoder *mqc, uint32_t d)
void | mqc_bypass_flush_enc (mqcoder *mqc, bool erterm)
void | mqc_restart_init_enc (mqcoder *mqc)
void | mqc_erterm_enc (mqcoder *mqc)
void | mqc_segmark_enc (mqcoder *mqc)
void | mqc_init_dec (mqcoder *mqc, uint8_t *bp, uint32_t len)
| Initialize the decoder for MQ decoding.
void | mqc_raw_init_dec (mqcoder *mqc, uint8_t *bp, uint32_t len)
| Initialize the decoder for RAW decoding.
void | mqc_finish_dec (mqcoder *mqc)
| Terminate RAW/MQC decoding.
static void | mqc_init_dec_common (mqcoder *mqc, uint8_t *bp, uint32_t len)
void | mqc_byteout (mqcoder *mqc)
static void | mqc_renorm_enc (mqcoder *mqc)
static void | mqc_codemps_enc (mqcoder *mqc)
static void | mqc_codelps_enc (mqcoder *mqc)
static void | mqc_setbits_enc (mqcoder *mqc)
static INLINE void | update_flags (grk_flag *flagsp, uint32_t ci, uint32_t s, uint32_t stride, uint32_t vsc)
static int16_t | getnmsedec_sig (uint32_t x, uint32_t bitpos)
static int16_t | getnmsedec_ref (uint32_t x, uint32_t bitpos)
static INLINE uint8_t | getctxno_zc (mqcoder *mqc, uint32_t f)
static INLINE uint32_t | getctxno_mag (uint32_t f)
static INLINE uint32_t | getctxtno_sc_or_spb_index (uint32_t fX, uint32_t pfX, uint32_t nfX, uint32_t ci)
static INLINE uint8_t | getspb (uint32_t lu)
static INLINE uint8_t | getctxno_sc (uint32_t lu)
template<typename T >
void | update_maximum (std::atomic< T > &maximum_value, T const &value) noexcept
template<class T >
constexpr T | getFilterPad (bool lossless)
template<typename T >
void | grk_copy_strided (uint32_t w, uint32_t stride, uint32_t h, T *src, int32_t *dest)
| Assume that source stride == source width == destination width.
static void | prepareBlockForFirstLayer (CompressCodeblock *cblk)
template<typename TYPE >
void | grk_write (uint8_t *buffer, TYPE value, uint32_t numBytes)
template<typename TYPE >
void | grk_read (const uint8_t *buffer, TYPE *value, uint32_t numBytes)
template<typename TYPE >
void | grk_write (uint8_t *buffer, TYPE value)
template<typename TYPE >
void | grk_read (const uint8_t *buffer, TYPE *value)
template<typename T >
T | clip (int64_t val)
template<typename T >
T | satAdd (int64_t lhs, int64_t rhs)
template<typename T >
T | satAdd (T lhs, T rhs)
template<typename T >
T | satSub (T lhs, T rhs)
template<typename T >
T | satSub (int64_t lhs, int64_t rhs)
uint8_t | floorlog2 (uint32_t a)
| Get logarithm of an integer and round downwards.
template<typename T >
uint32_t | ceildiv (T a, T b)
| Divide an integer by another integer and round upwards.
template<typename T >
T | ceildivpow2 (T a, uint32_t b)
static uint32_t | floordivpow2 (uint32_t a, uint32_t b)
| Divide an unsigned integer by a power of 2 and round downwards.
static int32_t | fix_mul (int32_t a, int32_t b)
| Multiply two fixed-point numbers.
template<typename T >
void | clip (grk_image_comp *component, uint8_t precision)
static int32_t | get_file_open_mode (const char *mode)
static uint64_t | size_proc (grk_handle fd)
static void * | grk_map (grk_handle fd, size_t len, bool do_read)
static int32_t | unmap (void *ptr, size_t len)
static grk_handle | open_fd (const char *fname, const char *mode)
static int32_t | close_fd (grk_handle fd)
static void | mem_map_free (void *user_data)
grk_stream * | create_mapped_file_read_stream (const char *fname)
grk_stream * | create_mapped_file_write_stream (const char *fname)
template<typename... Args>
void | log (grk_msg_callback msg_handler, void *l_data, char const *const format, Args &... args) noexcept
void | GRK_INFO (const char *fmt,...)
void | GRK_WARN (const char *fmt,...)
void | GRK_ERROR (const char *fmt,...)
static void | free_mem (void *user_data)
static size_t | zero_copy_read_from_mem (uint8_t **buffer, size_t numBytes, void *src)
static size_t | read_from_mem (uint8_t *dest, size_t numBytes, void *src)
static size_t | write_to_mem (const uint8_t *src, size_t numBytes, void *dest)
static bool | seek_from_mem (uint64_t numBytes, void *src)
static void | grk_stream_set_zero_copy_read_function (grk_stream *stream, grk_stream_zero_copy_read_fn func)
| Set the given function to be used as a zero copy read function.
void | set_up_mem_stream (grk_stream *stream, size_t len, bool is_read_stream)
size_t | get_mem_stream_offset (grk_stream *stream)
grk_stream * | create_mem_stream (uint8_t *buf, size_t len, bool ownsBuffer, bool is_read_stream)
| Create stream from buffer.
template<typename T >
void | deinterleave_h (const T *GRK_RESTRICT a, T *GRK_RESTRICT b, int32_t dn, int32_t sn, int32_t parity)
template<typename T , typename DWT >
void | encode_h_func (encode_h_job< T, DWT > *job)
template<typename T , typename DWT >
void | encode_v_func (encode_v_job< T, DWT > *job)
template<typename T >
void | fetch_cols_vertical_pass (const T *array, T *tmp, uint32_t height, uint32_t stride_width, uint32_t cols)
| Fetch up to cols <= NB_ELTS_V8 for each line, and put them in tmpOut.
template<typename T >
void | deinterleave_v_cols (const T *GRK_RESTRICT src, T *GRK_RESTRICT dst, uint32_t dn, uint32_t sn, uint32_t stride_width, uint32_t parity, uint32_t cols)
uint32_t | max_resolution (Resolution *GRK_RESTRICT r, uint32_t i)
template<class T >
constexpr T | getHorizontalPassHeight (bool lossless)

## Variables

const uint32_t | tlm_marker_start_bytes = 6
const size_t | grk_buffer_alignment = 64
const uint16_t | plWriteBufferLen = USHRT_MAX - 4
const uint32_t | default_numbers_segments = 10
const uint32_t | default_header_size = 4096
const uint32_t | default_number_mcc_records = 10
const uint32_t | default_number_mct_records = 10
const uint32_t | sot_marker_segment_len_minus_tile_data_len = 12U
const uint32_t | sot_marker_segment_min_len = 14U
const uint32_t | SPCod_SPCoc_len = 5U
const uint32_t | cod_coc_len = 5U
const uint32_t | tlmMarkerBytesPerTilePart = 6
const uint32_t | GRK_COMP_PARAM_DEFAULT_CBLOCKW = 64
const uint32_t | GRK_COMP_PARAM_DEFAULT_CBLOCKH = 64
const GRK_PROG_ORDER | GRK_COMP_PARAM_DEFAULT_PROG_ORDER = GRK_LRCP
const uint32_t | GRK_COMP_PARAM_DEFAULT_NUMRESOLUTION = 6
const uint16_t | J2K_MS_SOC = 0xff4f
| SOC marker value.
const uint16_t | J2K_MS_SOT = 0xff90
| SOT marker value.
const uint16_t | J2K_MS_SOD = 0xff93
| SOD marker value.
const uint16_t | J2K_MS_EOC = 0xffd9
| EOC marker value.
const uint16_t | J2K_MS_CAP = 0xff50
| CAP marker value.
const uint16_t | J2K_MS_SIZ = 0xff51
| SIZ marker value.
const uint16_t | J2K_MS_COD = 0xff52
| COD marker value.
const uint16_t | J2K_MS_COC = 0xff53
| COC marker value.
const uint16_t | J2K_MS_RGN = 0xff5e
| RGN marker value.
const uint16_t | J2K_MS_QCD = 0xff5c
| QCD marker value.
const uint16_t | J2K_MS_QCC = 0xff5d
| QCC marker value.
const uint16_t | J2K_MS_POC = 0xff5f
| POC marker value.
const uint16_t | J2K_MS_TLM = 0xff55
| TLM marker value.
const uint16_t | J2K_MS_PLM = 0xff57
| PLM marker value.
const uint16_t | J2K_MS_PLT = 0xff58
| PLT marker value.
const uint16_t | J2K_MS_PPM = 0xff60
| PPM marker value.
const uint16_t | J2K_MS_PPT = 0xff61
| PPT marker value.
const uint16_t | J2K_MS_SOP = 0xff91
| SOP marker value.
const uint16_t | J2K_MS_EPH = 0xff92
| EPH marker value.
const uint16_t | J2K_MS_CRG = 0xff63
| CRG marker value.
const uint16_t | J2K_MS_COM = 0xff64
| COM marker value.
const uint16_t | J2K_MS_CBD = 0xff78
| CBD marker value.
const uint16_t | J2K_MS_MCC = 0xff75
| MCC marker value.
const uint16_t | J2K_MS_MCT = 0xff74
| MCT marker value.
const uint16_t | J2K_MS_MCO = 0xff77
| MCO marker value.
const uint16_t | J2K_MS_UNK = 0
| UNKNOWN marker value.
const uint8_t | MARKER_BYTES = 2
const uint8_t | MARKER_LENGTH_BYTES = 2
const uint8_t | MARKER_PLUS_MARKER_LENGTH_BYTES = MARKER_BYTES + MARKER_LENGTH_BYTES
const uint32_t | MCT_ELEMENT_SIZE [] = {2, 4, 4, 8}
static const j2k_mct_function | j2k_mct_write_functions_from_float []
static j2k_prog_order | j2k_prog_order_list []
static const j2k_mct_function | j2k_mct_read_functions_to_float []
static const j2k_mct_function | j2k_mct_read_functions_to_int32 []
const uint16_t | maxNumComponentsJ2K = 16384
const uint8_t | maxPrecisionJ2K = 38
const uint8_t | maxPassesPerSegmentJ2K = (maxPrecisionJ2K - 1) * 3 + 1
const uint16_t | maxNumTilesJ2K = 65535
const uint8_t | maxTilePartsPerTileJ2K = 255
const uint16_t | maxTotalTilePartsJ2K = 65535
const uint32_t | maxTilePartSizeJ2K = UINT_MAX
const uint16_t | maxNumLayersJ2K = 65535
const uint32_t | maxBitPlanesGRK = 31 - T1_NMSEDEC_FRACBITS
const uint16_t | maxCompressLayersGRK = 100
const uint8_t | IPTC_UUID [16]
const uint8_t | XMP_UUID [16]
static const uint16_t | tabMaxSubLevelFromMainLevel []
minpf_plugin_manager * | managerInstance
static const char * | plugin_debug_mqc_next_cxd_method_name = "plugin_debug_mqc_next_cxd"
static const char * | plugin_debug_mqc_next_plane_method_name = "plugin_debug_mqc_next_plane"
const uint8_t | gain_b [4] = {0, 1, 1, 2}
const uint32_t | A_MIN = 0x8000
static const mqc_state | mqc_states [47 *2]
static const mqc_state | mqc_states [47 *2]
static const double | dwt_norms [4][10]
static const double | dwt_norms_real [4][10]
const double | slopeCutoff = pow(2, 64)
const double | scale = 256 / log(2)
const double | invScale = log(2) / 256
const double | shift = 1 << 16
const uint32_t | BAND_RES_ZERO_INDEX_LL = 0
const uint32_t | singleTileRowsPerStrip = 32
const uint32_t | NB_ELTS_V8 = 8
static const float | alpha = -1.586134342f
static const float | beta = -0.052980118f
static const float | gamma = 0.882911075f
static const float | delta = 0.443506852f
static const float | grk_K = 1.230174105f
static const float | grk_invK = (float)(1.0 / 1.230174105)

## Detailed Description

Copyright (C) 2016-2023 Grok Image Compression Inc.

This source code is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation.

This source code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

## Typedef Documentation

## BOX_FUNC

typedef std::function<bool(uint8_t* headerData, uint32_t header_size)> grk::BOX_FUNC

## ComponentDecompressBlocks

typedef std::vector<ResDecompressBlocks> grk::ComponentDecompressBlocks

## grk_buf8

using grk::grk_buf8 = typedef grk_buf<uint8_t, AllocatorVanilla>

## grk_buf8_aligned

using grk::grk_buf8_aligned = typedef grk_buf<uint8_t, AllocatorAligned>

## grk_flag

typedef uint32_t grk::grk_flag

Flags for 4 consecutive rows of a column.

## grk_handle

typedef int32_t grk::grk_handle

## grk_line32

using grk::grk_line32 = typedef grk_line<uint32_t>

## grk_pt16

using grk::grk_pt16 = typedef grk_pt<uint16_t>

## grk_pt32

using grk::grk_pt32 = typedef grk_pt<uint32_t>

## grk_rect16

typedef grk_rect< uint16_t > grk::grk_rect16

## grk_rect32

typedef grk_rect< uint32_t > grk::grk_rect32

## grk_rect_single

using grk::grk_rect_single = typedef grk_rect<float>

## grk_stream_zero_copy_read_fn

typedef size_t(* grk::grk_stream_zero_copy_read_fn) (uint8_t **buffer, size_t numBytes, void *user_data)

## j2k_mct_function

typedef void(* grk::j2k_mct_function) (const void *p_src_data, void *p_dest_data, uint64_t nb_elem)

## MARKER_FUNC

typedef std::function<bool(uint8_t* headerData, uint16_t header_size)> grk::MARKER_FUNC

## minpf_create_func

typedef void *(* grk::minpf_create_func) (minpf_object_params *)

## minpf_destroy_func

typedef int32_t(* grk::minpf_destroy_func) (void *)

## minpf_exit_func

typedef int32_t(* grk::minpf_exit_func) ()

## minpf_invoke_service_func

typedef int32_t(* grk::minpf_invoke_service_func) (const char *serviceName, void *serviceParams)

## minpf_object_params

typedef struct grk::minpf_object_params grk::minpf_object_params

## minpf_platform_services

typedef struct grk::minpf_platform_services grk::minpf_platform_services

## minpf_plugin_api_version

typedef struct grk::minpf_plugin_api_version grk::minpf_plugin_api_version

## minpf_plugin_manager

typedef struct grk::minpf_plugin_manager grk::minpf_plugin_manager

## minpf_post_load_func

typedef minpf_exit_func(* grk::minpf_post_load_func) (const char *pluginPath, const minpf_platform_services *)

## minpf_register_func

typedef int32_t(* grk::minpf_register_func) (const char *nodeType, const minpf_register_params *params)

## minpf_register_params

typedef struct grk::minpf_register_params grk::minpf_register_params

## PL_MARKER

typedef std::vector<grk_buf8*> grk::PL_MARKER

## PL_MARKERS

typedef std::map<uint32_t, PL_MARKER*> grk::PL_MARKERS

## PLUGIN_BATCH_DECODE

typedef int32_t(* grk::PLUGIN_BATCH_DECODE) (void)

## PLUGIN_BATCH_ENCODE

typedef int32_t(* grk::PLUGIN_BATCH_ENCODE) (const char *input_dir, const char *output_dir, grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK userCallback)

## PLUGIN_DEBUG_MQC_NEXT_CXD

typedef void(* grk::PLUGIN_DEBUG_MQC_NEXT_CXD) (grk_plugin_debug_mqc *mqc, uint32_t d)

## PLUGIN_DEBUG_MQC_NEXT_PLANE

typedef void(* grk::PLUGIN_DEBUG_MQC_NEXT_PLANE) (grk_plugin_debug_mqc *mqc)

## PLUGIN_DECODE

typedef int32_t(* grk::PLUGIN_DECODE) (grk_decompress_parameters *decoding_parameters, PLUGIN_DECODE_USER_CALLBACK userCallback)

## PLUGIN_DECODE_USER_CALLBACK

typedef int32_t(* grk::PLUGIN_DECODE_USER_CALLBACK) (PluginDecodeCallbackInfo *info)

## PLUGIN_ENCODE

typedef int32_t(* grk::PLUGIN_ENCODE) (grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK callback)

## PLUGIN_ENCODE_USER_CALLBACK

typedef void(* grk::PLUGIN_ENCODE_USER_CALLBACK) (plugin_encode_user_callback_info *info)

## PLUGIN_GET_DEBUG_STATE

typedef uint32_t(* grk::PLUGIN_GET_DEBUG_STATE) (void)

## PLUGIN_INIT

typedef bool(* grk::PLUGIN_INIT) (grk_plugin_init_info initInfo)

## PLUGIN_INIT_BATCH_DECODE

typedef int32_t(* grk::PLUGIN_INIT_BATCH_DECODE) (const char *input_dir, const char *output_dir, grk_decompress_parameters *decoding_parameters, PLUGIN_DECODE_USER_CALLBACK userCallback)

## PLUGIN_IS_BATCH_COMPLETE

typedef bool(* grk::PLUGIN_IS_BATCH_COMPLETE) (void)

## PLUGIN_STOP_BATCH_DECODE

typedef void(* grk::PLUGIN_STOP_BATCH_DECODE) (void)

## PLUGIN_STOP_BATCH_ENCODE

typedef void(* grk::PLUGIN_STOP_BATCH_ENCODE) (void)

## PROCEDURE_FUNC

typedef std::function<bool(void)> grk::PROCEDURE_FUNC

## TagTreeU16

typedef TagTree<uint16_t> grk::TagTreeU16

## TagTreeU8

typedef TagTree<uint8_t> grk::TagTreeU8

## TileDecompressBlocks

typedef std::vector<ComponentDecompressBlocks> grk::TileDecompressBlocks

## TL_INFO_VEC

typedef std::vector<TilePartLengthInfo> grk::TL_INFO_VEC

## TL_MAP

typedef std::map<uint16_t, TL_INFO_VEC*> grk::TL_MAP

## vec4f

typedef vec<float, 4> grk::vec4f

## WRITE_FUNC

typedef std::function<uint8_t*(uint32_t* len)> grk::WRITE_FUNC

## Enumeration Type Documentation

## DECOMPRESS_STATE

enum grk::DECOMPRESS_STATE

Status of decoding process when decoding main header or tile header.

These values may be combined with the | operator.

Enumerator
DECOMPRESS_STATE_NONE | no decompress state
DECOMPRESS_STATE_MH_SOC | a SOC marker is expected
DECOMPRESS_STATE_MH_SIZ | a SIZ marker is expected
DECOMPRESS_STATE_MH | the decoding process is in the main header
DECOMPRESS_STATE_TPH | the decoding process is in a tile part header
DECOMPRESS_STATE_TPH_SOT | the decoding process is in a tile part header and expects a SOT marker
DECOMPRESS_STATE_DATA | the decoding process is expecting to read tile data from the code stream
DECOMPRESS_STATE_EOC | the decoding process has encountered the EOC marker
DECOMPRESS_STATE_NO_EOC | the decoding process must not expect a EOC marker because the code stream is truncated

## eBandIndex

enum grk::eBandIndex

Enumerator
BAND_INDEX_HL |
BAND_INDEX_LH |
BAND_INDEX_HH |
BAND_NUM_INDICES |

## eBandOrientation

enum grk::eBandOrientation

Enumerator
BAND_ORIENT_LL |
BAND_ORIENT_HL |
BAND_ORIENT_LH |
BAND_ORIENT_HH |
BAND_NUM_ORIENTATIONS |

## eSplitOrientation

enum grk::eSplitOrientation

Enumerator
SPLIT_L |
SPLIT_H |
SPLIT_NUM_ORIENTATIONS |

## GrkCacheState

enum grk::GrkCacheState

Enumerator
GRK_CACHE_STATE_CLOSED |
GRK_CACHE_STATE_OPEN |
GRK_CACHE_STATE_ERROR |

## J2K_MCT_ARRAY_TYPE

enum grk::J2K_MCT_ARRAY_TYPE

Type of MCT array.

Enumerator
MCT_TYPE_DEPENDENCY |
MCT_TYPE_DECORRELATION |
MCT_TYPE_OFFSET |

## J2K_MCT_ELEMENT_TYPE

enum grk::J2K_MCT_ELEMENT_TYPE

Type of elements storing in the MCT data.

Enumerator
MCT_TYPE_INT16 |
MCT_TYPE_INT32 | MCT data is stored as signed shorts.
MCT_TYPE_FLOAT | MCT data is stored as signed integers.
MCT_TYPE_DOUBLE | MCT data is stored as floats.

## J2K_T2_MODE

enum grk::J2K_T2_MODE

Enumerator
THRESH_CALC |
FINAL_PASS | Function called in rate allocation process.

## JP2_STATE

enum grk::JP2_STATE

Enumerator
JP2_STATE_NONE |
JP2_STATE_SIGNATURE |
JP2_STATE_FILE_TYPE |
JP2_STATE_HEADER |
JP2_STATE_CODESTREAM |
JP2_STATE_END_CODESTREAM |
JP2_STATE_UNKNOWN |

## Function Documentation

## ceildiv()

template<typename T >

uint32_t grk::ceildiv | ( | T | a,
|  | T | b
| ) |  |

Divide an integer by another integer and round upwards.

Parameters

  a | integer of type T
  b | integer of type T

Returns
  a divided by b

References grk_read().

Referenced by grk::PacketIter::genPrecinctX0Grid(), grk::PacketIter::genPrecinctY0Grid(), and grk::grk_rect< T >::scaleDownCeil().

## ceildivpow2()

template<typename T >

T grk::ceildivpow2 | ( | T | a,
|  | uint32_t | b
| ) |  |

References grk_read().

Referenced by grk::PacketIter::genPrecinctX0GridPCRL_OPT(), grk::PacketIter::genPrecinctX0GridRPCL_OPT(), grk::PacketIter::genPrecinctY0GridPCRL_OPT(), grk::PacketIter::genPrecinctY0GridRPCL_OPT(), grk::GrkImage::postReadHeader(), and grk::grk_rect< T >::scaleDownCeilPow2().

## clip() [1/2]

template<typename T >

void grk::clip | ( | grk_image_comp * | component,
|  | uint8_t | precision
| ) |  |

References GRK_MAX_SUPPORTED_IMAGE_PRECISION, grk_read(), and _grk_image_comp::stride.

## clip() [2/2]

template<typename T >

T grk::clip | ( | int64_t | val | ) |

## close_fd()

static int32_t grk::close_fd | ( | grk_handle | fd | ) |

static

Referenced by mem_map_free().

## compress_synch_with_plugin()

void grk::compress_synch_with_plugin | ( | TileProcessor * | tcd,
|  | uint16_t | compno,
|  | uint32_t | resno,
|  | uint32_t | bandIndex,
|  | uint64_t | precinctIndex,
|  | uint64_t | cblkno,
|  | Subband * | band,
|  | CompressCodeblock * | cblk,
|  | uint32_t * | numPix
| ) |  |

References grk::grk_rect< T >::area(), grk::Codeblock::compressedStream, GRK_ERROR(), grk_plugin_get_debug_state(), GRK_PLUGIN_STATE_DEBUG, grk_read(), GRK_WARN(), grk::grk_buf< T, A >::len, grk::Codeblock::numbps, grk::CompressCodeblock::numPassesTotal, grk::grk_buf< T, A >::owns_data, grk::CompressCodeblock::paddedCompressedStream, grk::CompressCodeblock::passes, grk::Subband::stepsize, grk::grk_rect< T >::x0, grk::grk_rect< T >::x1, grk::grk_rect< T >::y0, and grk::grk_rect< T >::y1.

Referenced by grk::TileProcessor::pcrdBisectFeasible(), and grk::TileProcessor::pcrdBisectSimple().

## create_mapped_file_read_stream()

grk_stream * grk::create_mapped_file_read_stream | ( | const char * | fname | ) |

References grk_decompress_buffer_detect_format(), GRK_ERROR(), grk_map(), grk_read(), grk_stream_set_user_data(), mem_map_free(), open_fd(), set_up_mem_stream(), and size_proc().

Referenced by grk_decompress_create_from_file().

## create_mapped_file_write_stream()

grk_stream * grk::create_mapped_file_write_stream | ( | const char * | fname | ) |

References GRK_ERROR(), grk_map(), grk_read(), grk_stream_set_user_data(), mem_map_free(), open_fd(), and set_up_mem_stream().

## create_mem_stream()

grk_stream * grk::create_mem_stream | ( | uint8_t * | buf,
|  | size_t | len,
|  | bool | ownsBuffer,
|  | bool | is_read_stream
| ) |  |

Create stream from buffer.

Parameters

  buf | buffer
  buffer_len | length of buffer
  ownsBuffer | if true, library will delete[] buffer. Otherwise, it is the caller's responsibility to delete the buffer
  is_read_stream | whether the stream is a read stream (true) or not (false)

References free_mem(), grk_decompress_buffer_detect_format(), GRK_ERROR(), grk_read(), grk_stream_set_user_data(), and set_up_mem_stream().

Referenced by grk_compress_init(), and grk_decompress_create_from_buffer().

## decompress_synch_plugin_with_host()

void grk::decompress_synch_plugin_with_host | ( | TileProcessor * | tcd | ) |

!!! plugin still uses stepsize/2

References BIBO_EXTRA_BITS, GRK_INFO(), and grk_read().

## deinterleave_h()

template<typename T >

void grk::deinterleave_h | ( | const T *GRK_RESTRICT | a,
|  | T *GRK_RESTRICT | b,
|  | int32_t | dn,
|  | int32_t | sn,
|  | int32_t | parity
| ) |  |

References grk_read(), and GRK_RESTRICT.

Referenced by grk::dwt97::encode_and_deinterleave_h_one_row().

## deinterleave_v_cols()

template<typename T >

void grk::deinterleave_v_cols | ( | const T *GRK_RESTRICT | src,
|  | T *GRK_RESTRICT | dst,
|  | uint32_t | dn,
|  | uint32_t | sn,
|  | uint32_t | stride_width,
|  | uint32_t | parity,
|  | uint32_t | cols
| ) |  |

References grk_read(), GRK_RESTRICT, and NB_ELTS_V8.

Referenced by grk::dwt97::encode_and_deinterleave_v(), and grk::dwt53::encode_and_deinterleave_v().

## encode_h_func()

template<typename T , typename DWT >

void grk::encode_h_func | ( | encode_h_job< T, DWT > * | job | ) |

References grk_aligned_free(), grk_read(), and GRK_RESTRICT.

## encode_v_func()

template<typename T , typename DWT >

void grk::encode_v_func | ( | encode_v_job< T, DWT > * | job | ) |

References grk_aligned_free(), grk_read(), and NB_ELTS_V8.

## fetch_cols_vertical_pass()

template<typename T >

void grk::fetch_cols_vertical_pass | ( | const T * | array,
|  | T * | tmp,
|  | uint32_t | height,
|  | uint32_t | stride_width,
|  | uint32_t | cols
| ) |  |

Fetch up to cols <= NB_ELTS_V8 for each line, and put them in tmpOut.

References grk_read(), and NB_ELTS_V8.

Referenced by grk::dwt97::encode_and_deinterleave_v().

## fix_mul()

static int32_t grk::fix_mul | ( | int32_t | a,
|  | int32_t | b
| ) |  |

inline static

Multiply two fixed-point numbers.

Parameters

  a | N-bit precision fixed point number
  b | 13-bit precision fixed point number

Returns
  a * b in N-bit precision fixed point

References grk_read().

## floordivpow2()

static uint32_t grk::floordivpow2 | ( | uint32_t | a,
|  | uint32_t | b
| ) |  |

inline static

Divide an unsigned integer by a power of 2 and round downwards.

Returns
  a divided by 2^b

References grk_read().

Referenced by grk::PacketIter::genPrecinctX0Grid(), grk::PacketIter::genPrecinctY0Grid(), grk::PacketManager::getParams(), grk::TileComponent::init(), grk::Resolution::init(), grk::ResPrecinctInfo::init(), and grk::PrecinctImpl::PrecinctImpl().

## floorlog2()

uint8_t grk::floorlog2 | ( | uint32_t | a | ) |

Get logarithm of an integer and round downwards.

Parameters

  a | 32 bit integer

Returns
  log2(a)

References grk_read().

Referenced by grk::T1::compress_cblk(), grk::T2Compress::compressHeader(), grk::Quantizer::generate(), grk::CodeStreamCompress::init(), grk::PLMarkerMgr::pushPL(), and grk::PacketParser::readHeader().

## free_mem()

static void grk::free_mem | ( | void * | user_data | ) |

static

Referenced by create_mem_stream().

## get_file_open_mode()

static int32_t grk::get_file_open_mode | ( | const char * | mode | ) |

static

References grk_read().

Referenced by open_fd().

## get_filename_ext()

static const char * grk::get_filename_ext | ( | const char * | filename | ) |

static

References grk_read().

Referenced by minpf_load_from_dir().

## get_mem_stream_offset()

size_t grk::get_mem_stream_offset | ( | grk_stream * | stream | ) |

References grk::BufferedStream::getImpl(), and grk_read().

## getctxno_mag()

static INLINE uint32_t grk::getctxno_mag | ( | uint32_t | f | ) |

static

References grk_read(), T1_CTXNO_MAG, T1_MU_0, and T1_SIGMA_NEIGHBOURS.

## getctxno_sc()

static INLINE uint8_t grk::getctxno_sc | ( | uint32_t | lu | ) |

static

References grk_read(), and lut_ctxno_sc.

Referenced by grk::T1::enc_clnpass().

## getctxno_zc()

static INLINE uint8_t grk::getctxno_zc | ( | mqcoder * | mqc,
|  | uint32_t | f
| ) |  |

static

References grk_read(), and T1_SIGMA_NEIGHBOURS.

Referenced by grk::T1::enc_clnpass().

## getctxtno_sc_or_spb_index()

static INLINE uint32_t grk::getctxtno_sc_or_spb_index | ( | uint32_t | fX,
|  | uint32_t | pfX,
|  | uint32_t | nfX,
|  | uint32_t | ci
| ) |  |

static

References grk_read(), T1_CHI_0_I, T1_CHI_1_I, T1_CHI_2_I, T1_CHI_THIS_I, T1_SIGMA_1, T1_SIGMA_3, T1_SIGMA_5, and T1_SIGMA_7.

Referenced by grk::T1::enc_clnpass().

## getFilterPad()

template<class T >

constexpr T grk::getFilterPad | ( | bool | lossless | ) |

constexpr

References grk_read().

## getHorizontalPassHeight()

template<class T >

constexpr T grk::getHorizontalPassHeight | ( | bool | lossless | ) |

constexpr

References grk_read(), and grk::vec< T, N >::NUM_ELTS.

## getnmsedec_ref()

static int16_t grk::getnmsedec_ref | ( | uint32_t | x,
|  | uint32_t | bitpos
| ) |  |

static

References grk_read(), lut_nmsedec_ref, lut_nmsedec_ref0, and T1_NMSEDEC_BITS.

## getnmsedec_sig()

static int16_t grk::getnmsedec_sig | ( | uint32_t | x,
|  | uint32_t | bitpos
| ) |  |

static

References grk_read(), lut_nmsedec_sig, lut_nmsedec_sig0, and T1_NMSEDEC_BITS.

Referenced by grk::T1::enc_clnpass().

## getspb()

static INLINE uint8_t grk::getspb | ( | uint32_t | lu | ) |

static

References grk_read(), and lut_spb.

Referenced by grk::T1::enc_clnpass().

## grk_aligned_alloc_N()

static void * grk::grk_aligned_alloc_N | ( | size_t | alignment,
|  | size_t | size
| ) |  |

inline static

References grk_read().

Referenced by grk_aligned_malloc().

## grk_aligned_free()

void grk::grk_aligned_free | ( | void * | ptr | ) |

References grk_read().

Referenced by grk::T1::alloc(), grk::GrkImage::apply_palette_clr(), grk::GrkIOBuf::dealloc(), grk::AllocatorAligned< T >::dealloc(), grk::T1::deallocUncompressedData(), encode_h_func(), grk::WaveletFwdImpl::encode_procedure(), encode_v_func(), grk::dwt_data< T >::release(), grk::GrkImage::single_component_data_free(), grk::GrkImage::~GrkImage(), and grk::T1::~T1().

## grk_aligned_malloc()

void * grk::grk_aligned_malloc | ( | size_t | size | ) |

Allocate memory aligned to a 16 byte boundary.

Parameters

  size | Bytes to allocate

Returns
  a void pointer to the allocated space, or nullptr if there is insufficient memory available

References grk_aligned_alloc_N(), and grk_buffer_alignment.

Referenced by grk::GrkIOBuf::alloc(), grk::dwt_data< T >::alloc(), grk::AllocatorAligned< T >::alloc(), grk::T1::alloc(), grk::GrkImage::allocData(), grk::T1::allocUncompressedData(), and grk::WaveletFwdImpl::encode_procedure().

## grk_calloc()

void * grk::grk_calloc | ( | size_t | numOfElements,
|  | size_t | sizeOfElements
| ) |  |

Allocate a memory block with elements initialized to 0.

Parameters

  numOfElements | Blocks to allocate
  sizeOfElements | Bytes per block to allocate

Returns
  a void pointer to the allocated space, or nullptr if there is insufficient memory available

References grk_read().

Referenced by grk::GrkImage::check_color(), grk::T1::code_block_enc_allocate(), grk::CompressCodeblock::init(), grk::SIZMarker::read(), grk::PPMMarker::read(), grk::FileFormatDecompress::read_ftyp(), grk::CodeStreamDecompress::read_ppt(), grk::FileFormatDecompress::readHeaderProcedureImpl(), grk::TileInfo::TileInfo(), grk::FileFormatCompress::write_bpc(), grk::FileFormatCompress::write_buffer(), grk::FileFormatCompress::write_colr(), grk::FileFormatCompress::write_ihdr(), and grk::FileFormatCompress::write_res().

## grk_copy_strided()

template<typename T >

void grk::grk_copy_strided | ( | uint32_t | w,
|  | uint32_t | stride,
|  | uint32_t | h,
|  | T * | src,
|  | int32_t * | dest
| ) |  |

Assume that source stride == source width == destination width.

References grk_read().

## GRK_ERROR()

void grk::GRK_ERROR | ( | const char * | fmt,
|  |  | ...
| ) |  |

References grk_read(), log(), and grk::logger::logger_.

Referenced by grk::TileCodingParams::advanceTilePartCounter(), grk::GrkImage::allComponentsSanityCheck(), grk::dwt_data< T >::alloc(), grk::T1::alloc(), grk::grk_buf2d< T, A >::alloc2d(), grk::GrkImage::allocCompositeData(), grk::GrkImage::allocData(), grk::T1::allocUncompressedData(), grk::GrkImage::apply_palette_clr(), grk::GrkImage::applyColourManagement(), grk::TileProcessor::cacheTilePartPackets(), grk::TileComponent::canCreateWindow(), grk::GrkImage::check_color(), grk::TileInfo::checkResize(), grk::CodeStreamCompress::compress(), compress_synch_with_plugin(), grk::T2Compress::compressHeader(), grk::T2Compress::compressPacket(), grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketSimulate(), grk::T2Compress::compressPacketsSimulate(), grk::CodeStreamCompress::compressValidation(), grk::GrkImage::convertToRGB(), grk::GrkImage::create(), create_mapped_file_read_stream(), create_mapped_file_write_stream(), create_mem_stream(), grk::Subband::createPrecinct(), ojph::T1OJPH::decompress(), grk::FileFormatDecompress::decompress(), grk::T1::decompress_cblk(), grk::DecompressScheduler::decompressBlock(), grk::TileProcessor::decompressT2T1(), grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTile(), grk::FileFormatDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), grk::WaveletFwdImpl::encode_procedure(), grk::GrkImage::execUpsample(), grk::PLMarkerMgr::findMarker(), grk::CodeStreamDecompress::findNextSOT(), grk::BufferedStream::flush(), grk::CodeStreamCompress::getNumTileParts(), grk_compress_init(), grk_decompress_buffer_detect_format(), grk_decompress_create(), grk_decompress_create_from_buffer(), grk_decompress_create_from_file(), grk_stream_create_file_stream(), grk::CodeStreamCompress::init(), grk::FileFormatCompress::init(), grk::TileComponent::init(), grk::TileProcessor::init(), ojph::local::mel_emit_bit(), mem_map_free(), grk::PPMMarker::merge(), grk::CodeStreamDecompress::merge_ppt(), ojph::local::ms_encode(), ojph::local::ms_terminate(), grk::TileLengthMarkers::next(), grk::PLCache::next(), open_fd(), grk::CodeStreamDecompress::parseTileParts(), grk::PLMarkerMgr::pop(), grk::PrecinctImpl::PrecinctImpl(), grk::t1_part1::T1Part1::preCompress(), grk::TileProcessor::preCompressTile(), grk::CodeStreamDecompress::process_marker(), grk::SIZMarker::read(), grk::SOTMarker::read(), grk::SOTMarker::read(), grk::BufferedStream::read(), grk::TileLengthMarkers::read(), grk::PPMMarker::read(), grk::FileFormatDecompress::read_asoc(), grk::FileFormatDecompress::read_asoc(), grk::FileFormatDecompress::read_box(), grk::FileFormatDecompress::read_box_hdr(), grk::FileFormatDecompress::read_bpc(), grk::CodeStreamDecompress::read_cap(), grk::CodeStreamDecompress::read_cbd(), grk::FileFormatDecompress::read_channel_definition(), grk::CodeStreamDecompress::read_coc(), grk::CodeStreamDecompress::read_cod(), grk::FileFormatDecompress::read_colr(), grk::CodeStreamDecompress::read_com(), grk::FileFormatDecompress::read_component_mapping(), grk::CodeStreamDecompress::read_crg(), grk::FileFormatDecompress::read_ftyp(), grk::FileFormatDecompress::read_ihdr(), grk::FileFormatDecompress::read_jp(), grk::FileFormatDecompress::read_jp2h(), grk::CodeStreamDecompress::read_mcc(), grk::CodeStreamDecompress::read_mco(), grk::CodeStreamDecompress::read_mct(), grk::FileFormatDecompress::read_palette_clr(), grk::CodeStreamDecompress::read_poc(), grk::CodeStreamDecompress::read_ppt(), grk::CodeStreamDecompress::read_qcc(), grk::CodeStreamDecompress::read_qcd(), grk::FileFormatDecompress::read_res(), grk::CodeStreamDecompress::read_rgn(), grk::CodeStreamDecompress::read_SPCod_SPCoc(), grk::CodeStreamDecompress::read_SQcd_SQcc(), grk::CodeStreamDecompress::read_unk(), grk::CodeStreamDecompress::readCurrentMarkerBody(), grk::PacketParser::readData(), grk::FileFormatDecompress::readHeader(), grk::PacketParser::readHeader(), grk::CodeStreamDecompress::readHeaderProcedure(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), grk::FileFormatDecompress::readHeaderProcedureImpl(), grk::PLMarkerMgr::readPLM(), grk::PLMarkerMgr::readPLT(), grk::SparseCanvas< LBW, LBH >::readWrite(), grk::TileLengthMarkers::seek(), grk::CodeStreamInfo::seekFirstTilePart(), grk::CodeStreamDecompress::setDecompressRegion(), grk::TileProcessor::setTilePartDataLength(), grk::PacketIter::skipPackets(), grk::GrkImage::subsampleAndReduce(), grk::TileProcessor::subtractMarkerSegmentLength(), grk::TagTree< T >::TagTree(), ojph::local::terminate_mel_vlc(), grk::CodeStreamCompress::validateProgressionOrders(), ojph::local::vlc_encode(), grk::CodeStreamCompress::write_cod(), grk::FileFormatCompress::write_ftyp(), grk::FileFormatCompress::write_jp2c(), grk::FileFormatCompress::write_jp2h(), grk::CodeStreamCompress::write_qcd(), grk::CodeStreamCompress::writeTilePart(), and grk::CodeStreamCompress::writeTileParts().

## grk_free()

void grk::grk_free | ( | void * | m | ) |

Deallocates or frees a memory block.

Parameters

  m | Previously allocated memory block to be freed

References grk_read().

Referenced by grk::CodeStreamDecompress::add_mct(), grk::GrkImage::check_color(), grk::TileInfo::checkResize(), grk::T1::code_block_enc_deallocate(), grk::CodeStreamCompress::init(), grk::CodeStreamCompress::init_mct_encoding(), grk::GrkMatrix::matrix_inversion_f(), grk::PPMMarker::merge(), grk::CodeStreamDecompress::merge_ppt(), grk::CodeStreamDecompress::read_mcc(), grk::CodeStreamDecompress::read_mco(), grk::CodeStreamDecompress::read_mct(), grk::FileFormatDecompress::readHeaderProcedureImpl(), grk::FileFormatCompress::write_jp2h(), grk::CompressCodeblock::~CompressCodeblock(), grk::FileFormat::~FileFormat(), grk::PPMMarker::~PPMMarker(), grk::TileCodingParams::~TileCodingParams(), and grk::TileInfo::~TileInfo().

## GRK_INFO()

void grk::GRK_INFO | ( | const char * | fmt,
|  |  | ...
| ) |  |

References grk_read(), log(), and grk::logger::logger_.

Referenced by decompress_synch_plugin_with_host(), grk::ChronoTimer::finish(), grk::ResPrecinctInfo::print(), grk::grk_rect< T >::print(), grk::GrkImage::print(), grk::PacketIter::printDynamicState(), grk::PacketIter::printStaticState(), grk::PLMarkerMgr::readPLT(), and grk::CodeStreamDecompress::setDecompressRegion().

## grk_make_aligned_width()

uint32_t grk::grk_make_aligned_width | ( | uint32_t | width | ) |

References grk_buffer_alignment, and grk_read().

Referenced by grk::dwt_data< T >::alloc(), grk::grk_buf2d< T, A >::alloc2d(), and grk::GrkImage::allocData().

## grk_malloc()

void * grk::grk_malloc | ( | size_t | size | ) |

Allocate an uninitialized memory block.

Parameters

  size | Bytes to allocate

Returns
  a void pointer to the allocated space, or nullptr if there is insufficient memory available

References grk_read().

Referenced by grk::CodeStreamDecompress::add_mct(), grk::TileCodingParams::copy(), grk_set_MCT(), grk::CodeStreamCompress::init(), grk::FileFormatCompress::init(), grk::CodeStreamCompress::init_mct_encoding(), grk::GrkMatrix::matrix_inversion_f(), grk::PPMMarker::read(), grk::CodeStreamDecompress::read_mct(), grk::CodeStreamDecompress::read_ppt(), grk::FileFormatCompress::write_channel_definition(), grk::FileFormatCompress::write_component_mapping(), and grk::FileFormatCompress::write_palette_clr().

## grk_map()

static void * grk::grk_map | ( | grk_handle | fd,
|  | size_t | len,
|  | bool | do_read
| ) |  |

static

References grk_read().

Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().

## grk_read() [1/2]

template<typename TYPE >

void grk::grk_read | ( | const uint8_t * | buffer,
|  | TYPE * | value
| ) |  |

References grk_read().

## grk_read() [2/2]

template<typename TYPE >

void grk::grk_read | ( | const uint8_t * | buffer,
|  | TYPE * | value,
|  | uint32_t | numBytes
| ) |  |

References grk_read().

Referenced by grk::grk_buf2d< T, A >::acquire(), grk::CodeStreamDecompress::add_mct(), grk::PLMarkerMgr::addNewMarker(), grk::grk_buf2d< T, A >::address(), grk::TileLengthMarkers::addTileMarkerInfo(), grk::ResFlow::addTo(), grk::ImageComponentFlow::addTo(), grk::TileCodingParams::advanceTilePartCounter(), grk::GrkImage::all_components_data_free(), grk::GrkImage::allComponentsSanityCheck(), grk::TileComponentWindowBase< T >::alloc(), grk::ResWindow< T >::alloc(), grk::SparseCanvas< LBW, LBH >::alloc(), grk::GrkIOBuf::alloc(), grk::dwt_data< T >::alloc(), grk::SparseBlock::alloc(), grk::T1::alloc(), grk::grk_buf2d< T, A >::alloc2d(), grk::CodeStreamDecompress::allocateProcessor(), grk::GrkImage::allocCompositeData(), grk::T1::allocCompressedData(), grk::GrkImage::allocData(), grk::GrkImage::allocData(), grk::CompressCodeblock::allocData(), grk::Strip::allocInterleavedLocked(), grk::GrkImageMeta::allocPalette(), grk::TileComponent::allocRegionWindow(), grk::T1::allocUncompressedData(), grk::DecompressorState::andState(), grk::GrkImage::apply_channel_definition(), grk::GrkImage::apply_palette_clr(), grk::GrkImage::applyColourManagement(), grk::GrkImage::applyICC(), grk::grk_rect< T >::area(), grk::grk_buf2d< T, A >::attach(), grk::grk_buf2d< T, A >::attach(), grk::grk_buf2d< T, A >::attach(), grk::grk_buf2d< T, A >::attach(), grk::grk_buf2d< T, A >::attach(), grk::BitIO::BitIO(), grk::grk_rect< T >::boundsString(), grk::BufferedStream::BufferedStream(), grk::BitIO::bytein(), grk::TileProcessor::cacheTilePartPackets(), grk::FileFormatDecompress::calc_res(), grk::TileComponent::canCreateWindow(), grk::TileProcessor::canWritePocMarker(), ceildiv(), ceildivpow2(), grk::GrkImage::check_color(), grk::CodeStreamDecompress::checkForIllegalTilePart(), grk::PacketIter::checkForRemainingValidProgression(), grk::GrkImage::cieLabToRGB(), grk::SparseBuffer::cleanup(), grk::DecompressCodeblock::cleanUpSegBuffers(), grk::IncludeTracker::clear(), grk::PacketTracker::clear(), grk::PLMarkerMgr::clearMarkers(), grk::grk_rect< T >::clip(), grk::grk_rect< T >::clip(), clip(), grk::grk_rect< T >::clip_IN_PLACE(), grk::T1::code_block_enc_allocate(), grk::T1::code_block_enc_deallocate(), grk::Codeblock::Codeblock(), grk::Codeblock::Codeblock(), grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodingParams::CodingParams(), grk::GrkImage::color_cmyk_to_rgb(), grk::GrkImage::color_esycc_to_rgb(), grk::GrkImage::color_sycc_to_rgb(), grk::CodeStreamCompress::compare_coc(), grk::CodeStreamCompress::compare_qcc(), grk::CodeStreamCompress::compare_SPCod_SPCoc(), grk::CodeStreamCompress::compare_SQcd_SQcc(), grk::GrkImage::componentsEqual(), grk::GrkImage::componentsEqual(), grk::GrkImage::componentsEqual(), grk::GrkImage::composite(), grk::GrkImage::compositeInterleaved(), grk::GrkImage::compositeInterleaved(), grk::GrkImage::compositePlanar(), grk::TagTree< T >::compress(), grk::t1_part1::T1Part1::compress(), grk::CodeStreamCompress::compress(), grk::FileFormatCompress::compress(), grk::CompressScheduler::compress(), grk::CompressScheduler::compress(), grk::CompressScheduler::compress(), grk::WaveletFwdImpl::compress(), grk::T1::compress_cblk(), compress_synch_with_plugin(), grk::T2Compress::compressHeader(), grk::T2Compress::compressPacket(), grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketSimulate(), grk::T2Compress::compressPacketsSimulate(), grk::CompressScheduler::CompressScheduler(), grk::grk_rect< T >::contains(), grk::GrkImage::convertPrecision(), grk::CodeStreamCompress::convertProgressionOrder(), grk::GrkImage::convertToRGB(), grk::RateControl::convexHull(), grk::TileCodingParams::copy(), grk::RoiShiftFilter< T >::copy(), grk::ShiftFilter< T >::copy(), grk::RoiScaleFilter< T >::copy(), grk::ScaleFilter< T >::copy(), grk::grk_buf2d< T, A >::memcpy_from::copy(), grk::CodeStreamDecompress::copy_default_tcp(), grk::GrkImage::copyComponent(), grk::grk_buf2d< T, A >::copyFrom(), grk::grk_buf2d< T, A >::copyFrom(), grk::grk_buf2d< T, A >::copyFrom(), grk::GrkImage::copyHeader(), grk::DecompressCodeblock::copyToContiguousBuffer(), grk::SparseBuffer::copyToContiguousBuffer(), grk::GrkImage::create(), grk::BlockCache< T, P >::create(), grk::SequentialPtrCache< T >::create(), create_mapped_file_read_stream(), create_mapped_file_write_stream(), create_mem_stream(), grk::PLCache::createMarkers(), grk::Subband::createPrecinct(), grk::GrkImage::createRGB(), grk::TileComponent::createWindow(), grk::TileProcessor::createWindowBuffers(), grk::TileProcessor::dcLevelShiftCompress(), grk::AsocBox::dealloc(), grk::TileProcessor::deallocBuffers(), grk::T1::dec_clnpass(), grk::T1::dec_clnpass(), grk::T1::dec_clnpass_check_segsym(), grk::T1::dec_refpass_mqc(), grk::T1::dec_refpass_raw(), grk::T1::dec_refpass_step_raw(), grk::T1::dec_sigpass_mqc(), grk::T1::dec_sigpass_raw(), grk::T1::dec_sigpass_step_raw(), grk::TagTree< T >::decodeValue(), grk::t1_part1::T1Part1::decompress(), grk::T1::decompress_cblk(), decompress_synch_plugin_with_host(), grk::DecompressScheduler::decompressBlock(), grk::T2Decompress::decompressPacket(), grk::T2Decompress::decompressPackets(), grk::DecompressScheduler::DecompressScheduler(), grk::TileProcessor::decompressT2T1(), grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), grk::FileFormatCompress::default_validation(), deinterleave_h(), deinterleave_v_cols(), grk::grk_rect< T >::dimX(), grk::grk_rect< T >::dimY(), grk::TileProcessor::doCompress(), grk::CodeStreamDecompress::dump(), grk::FileFormatDecompress::dump(), grk::CodeStreamDecompress::dump_image_comp_header(), grk::CodeStreamDecompress::dump_image_header(), grk::CodeStreamDecompress::dump_MH_info(), grk::CodeStreamDecompress::dump_tile_info(), grk::GrkImage::duplicate(), grk::TileProcessor::dwt_encode(), grk::PacketIter::enableTilePartGeneration(), grk::PacketManager::enableTilePartGeneration(), grk::T1::enc_clnpass(), grk::T1::enc_is_term_pass(), grk::T1::enc_refpass(), grk::T1::enc_sigpass(), grk::dwt97::encode_1_real(), grk::dwt97::encode_and_deinterleave_h_one_row(), grk::dwt53::encode_and_deinterleave_h_one_row(), grk::dwt97::encode_and_deinterleave_v(), grk::dwt53::encode_and_deinterleave_v(), encode_h_func(), grk::WaveletFwdImpl::encode_procedure(), grk::dwt97::encode_step1_combined(), grk::dwt97::encode_step2(), encode_v_func(), grk::TileProcessor::encodeT2(), grk::CodeStream::exec(), grk::FileFormat::exec(), grk::GrkImage::execUpsample(), fetch_cols_vertical_pass(), grk::FileFormat::FileFormat(), grk::FileFormatDecompress::FileFormatDecompress(), grk::FileFormatCompress::find_cf(), grk::FileFormatDecompress::find_handler(), grk::PLMarkerMgr::findMarker(), grk::DecompressorState::findNextSOT(), grk::CodeStreamDecompress::findNextSOT(), grk::ChronoTimer::finish(), fix_mul(), floordivpow2(), floorlog2(), grk::BufferedStream::flush(), grk::ImageComponentFlow::genBlockFlowTaskName(), grk::Quantizer::generate(), grk::GrkImage::generateCompositeBounds(), grk::GrkImage::generateCompositeBounds(), grk::TileProcessor::generateImage(), grk::Subband::generatePrecinctBounds(), grk::PacketIter::generatePrecinctIndex(), grk::PacketIter::genPrecinctInfo(), grk::PacketIter::genPrecinctInfo(), grk::PacketIter::genPrecinctInfoOPT(), grk::PacketIter::genPrecinctX0Grid(), grk::PacketIter::genPrecinctX0GridPCRL_OPT(), grk::PacketIter::genPrecinctX0GridRPCL_OPT(), grk::PacketIter::genPrecinctY0Grid(), grk::PacketIter::genPrecinctY0GridPCRL_OPT(), grk::PacketIter::genPrecinctY0GridRPCL_OPT(), grk::Resolution::genResSimple(), grk::ResWindow< T >::genSplitWindowBuffers(), grk::SequentialPtrCache< T >::get(), grk::BufPool::get(), grk::SparseCache< T >::get(), grk::Profile::get_broadcast_max_NL(), grk::PacketTracker::get_buffer_len(), get_file_open_mode(), get_filename_ext(), grk::Profile::get_imf_max_NL(), grk::PacketIter::get_include(), grk::IncludeTracker::get_include(), grk::CodeStreamDecompress::get_marker_handler(), get_mem_stream_offset(), grk::Quantizer::get_num_guard_bits(), grk::CodeStreamCompress::get_SPCod_SPCoc_size(), grk::CodeStreamCompress::get_SQcd_SQcc_size(), grk::TileCache::getAllImages(), grk::TileComponentWindow< T >::getBandIndex(), grk::ResSimple::getBandWindow(), grk::TileComponentWindow< T >::getBandWindowBufferPaddedREL(), grk::TileComponentWindow< T >::getBandWindowBufferPaddedSimple(), grk::TileComponentWindow< T >::getBandWindowBufferPaddedSimpleF(), grk::BitIO::getbit(), grk::BitIO::getbit(), grk::SparseCanvas< LBW, LBH >::getBlock(), grk::PrecinctImpl::getCodeBlockBounds(), grk::GrkImage::getColourSpaceString(), grk::BitIO::getcommacode(), getctxno_mag(), getctxno_sc(), getctxno_zc(), getctxtno_sc_or_spb_index(), grk::SparseBuffer::getCurrentChunkLength(), grk::SparseBuffer::getCurrentChunkOffset(), grk::SparseBuffer::getCurrentChunkPtr(), getFilterPad(), grk::SparseBuffer::getGlobalOffset(), getHorizontalPassHeight(), grk::GrkImage::getICCColourSpaceString(), grk::CodeStreamDecompress::getImage(), grk::PrecinctImpl::getIMsbTagTree(), grk::PrecinctImpl::getIncludeTagTree(), grk::TileProcessor::getMaxNumDecompressResolutions(), getnmsedec_ref(), getnmsedec_sig(), grk::T1::getnorm(), grk::BitIO::getnumpasses(), grk::Codeblock::getNumPassesInPacket(), grk::CodeStreamCompress::getNumTileParts(), grk::CodeStreamCompress::getNumTilePartsForProgression(), grk::PacketManager::getPacketIter(), grk::ResWindow< T >::getPaddedBandWindow(), grk::PacketManager::getParams(), grk::CodeStreamCompress::getPocSize(), grk::Subband::getPrecinct(), grk::ImageComponentFlow::getPrePostProc(), grk::ImageComponentFlow::getResFlow(), grk::TileComponentWindow< T >::getResWindowBufferSplitREL(), grk::DecompressCodeblock::getSegBuffersLen(), grk::DecompressCodeblock::getSegment(), getspb(), grk::CodingParams::getTileBounds(), grk::TileCache::getTileImages(), grk::T1::getwmsedec(), grk::GrkObjectWrapperImpl< T >::getWrappee(), grk::Scheduler::graph(), grk::ImageComponentFlow::graph(), grk::GrkImage::greyToRGB(), grk_aligned_alloc_N(), grk_aligned_free(), grk_calloc(), grk_compress(), grk_compress_create(), grk_compress_init(), grk_compress_set_default_params(), grk_compress_start(), grk_copy_strided(), grk_decompress(), grk_decompress_buffer_detect_format(), grk_decompress_create(), grk_decompress_create_from_file(), grk_decompress_detect_format(), grk_decompress_get_composited_image(), grk_decompress_get_tile_image(), grk_decompress_init(), grk_decompress_read_header(), grk_decompress_set_default_params(), grk_decompress_set_window(), grk_decompress_tile(), grk_dump_codec(), GRK_ERROR(), grk_free(), grk_get_data_length_from_file(), grk_image_new(), GRK_INFO(), grk_initialize(), grk_make_aligned_width(), grk_malloc(), grk_map(), grk_plugin_batch_compress(), grk_plugin_batch_decompress(), grk_plugin_compress(), grk_plugin_decompress(), grk_plugin_get_debug_state(), grk_plugin_init(), grk_plugin_init_batch_decompress(), grk_plugin_internal_decode_callback(), grk_plugin_internal_encode_callback(), grk_plugin_is_batch_complete(), grk_plugin_load(), grk_plugin_stop_batch_compress(), grk_plugin_stop_batch_decompress(), grk_read(), grk_read(), grk_read_from_file(), grk_realloc(), grk::grk_rect< T >::grk_rect(), grk_seek_in_file(), grk_set_MCT(), grk_set_msg_handlers(), grk_stream_create_file_stream(), grk_stream_new(), grk_stream_set_read_function(), grk_stream_set_seek_function(), grk_stream_set_user_data(), grk_stream_set_user_data_length(), grk_stream_set_write_function(), grk_stream_set_zero_copy_read_function(), grk::dwt97::grk_v8dwt_encode_step1(), grk::dwt97::grk_v8dwt_encode_step2(), grk_version(), GRK_WARN(), grk_write(), grk_write(), grk_write_to_file(), GrkCodec::GrkCodec(), grkFree_file(), grk::GrkImage::GrkImage(), grk::GrkImageMeta::GrkImageMeta(), grk::GrkIOBuf::GrkIOBuf(), grk::GrkIOBuf::GrkIOBuf(), grkReclaimCallback(), grk::grk_rect< T >::grow_IN_PLACE(), grk::grk_rect< T >::grow_IN_PLACE(), grk::grk_rect< T >::grow_IN_PLACE(), grk::grk_rect< T >::grow_IN_PLACE(), grk::grk_rect< T >::grow_IN_PLACE(), grk::grk_rect< T >::grow_IN_PLACE(), grk::HWY_NAMESPACE::hwy_compress_irrev(), grk::HWY_NAMESPACE::hwy_compress_rev(), grk::HWY_NAMESPACE::hwy_decompress_dc_shift_irrev(), grk::HWY_NAMESPACE::hwy_decompress_dc_shift_rev(), grk::HWY_NAMESPACE::hwy_decompress_irrev(), grk::HWY_NAMESPACE::hwy_decompress_rev(), grk::HWY_NAMESPACE::hwy_decompress_v_final_memcpy_53(), grk::HWY_NAMESPACE::hwy_decompress_v_parity_even_mcols_53(), grk::HWY_NAMESPACE::hwy_decompress_v_parity_odd_mcols_53(), grk::HWY_NAMESPACE::hwy_num_lanes(), grk::ImageComponentFlow::ImageComponentFlow(), grk::FileFormatDecompress::img_find_handler(), grk::IncludeTracker::IncludeTracker(), grk::Codeblock::incNumPassesInPacket(), grk::TileProcessor::incNumProcessedPackets(), grk::SparseBuffer::increment(), grk::SparseBuffer::incrementCurrentChunkOffset(), grk::grk_buf< T, A >::incrementOffset(), grk::grk_buf2d_simple< T >::incX_IN_PLACE(), grk::grk_buf2d_simple< T >::incY_IN_PLACE(), grk::TileSet::index(), grk::TileSet::index(), grk::PacketTracker::index(), grk::TileProcessor::ingestImage(), grk::StripCache::ingestStrip(), grk::StripCache::ingestTile(), grk::StripCache::ingestTile(), grk::TileProcessor::ingestUncompressedData(), grk::CodeStreamCompress::init(), grk::FileFormatCompress::init(), grk::CodeStreamDecompress::init(), grk::FileFormatDecompress::init(), grk::TileSet::init(), grk::PacketIter::init(), grk::TileComponent::init(), grk::Resolution::init(), grk::StripCache::init(), grk::PacketTracker::init(), grk::ResPrecinctInfo::init(), grk::TileProcessor::init(), grk::CodeStreamCompress::init_mct_encoding(), grk::PrecinctImpl::initCodeBlock(), grk::PrecinctImpl::initCodeBlocks(), grk::Profile::initialise_4K_poc(), grk::PacketParser::initSegment(), grk::grk_rect< T >::intersection(), grk::grk_rect< T >::intersection(), grk::Profile::is_broadcast_compliant(), grk::Profile::is_cinema_compliant(), grk::Profile::is_imf_compliant(), grk::PacketTracker::is_packet_encoded(), grk::grk_rect< T >::isContainedIn(), grk::GrkImage::isOpacity(), grk::GrkImage::isSubsampled(), grk::GrkImage::isValidICCColourSpace(), grk::TileProcessor::isWholeTileDecompress(), grk::SparseCanvas< LBW, LBH >::isWindowValid(), grk::grk_buf2d< T, A >::isWindowValid(), j2k_read_float32_to_float(), j2k_read_float32_to_int32(), j2k_read_float64_to_float(), j2k_read_float64_to_int32(), j2k_read_int16_to_float(), j2k_read_int16_to_int32(), j2k_read_int32_to_float(), j2k_read_int32_to_int32(), j2k_write(), j2k_write_float_to_float(), j2k_write_float_to_float64(), j2k_write_float_to_int16(), j2k_write_float_to_int32(), grk::TileProcessor::layerNeedsRateControl(), grk::grk_line< T >::length(), log(), grk::GrkMatrix::lupDecompose(), grk::GrkMatrix::lupInvert(), grk::GrkMatrix::lupSolve(), grk::TileProcessor::makeLayerFeasible(), grk::TileProcessor::makeLayerFinal(), grk::TileProcessor::makeLayerSimple(), grk::T1Factory::makeQuantizer(), grk::T1Factory::makeT1(), grk::GrkMatrix::matrix_inversion_f(), grk::TileProcessor::mct_encode(), grk::CodeStreamCompress::mct_validation(), grk::TileProcessor::mctDecompress(), mem_map_free(), grk::PPMMarker::merge(), grk::CodeStreamDecompress::merge_ppm(), grk::CodeStreamDecompress::merge_ppt(), minpf_cleanup_plugin_manager(), minpf_get_full_path(), minpf_get_plugin_manager(), minpf_get_symbol(), minpf_initialize_plugin_manager(), minpf_is_valid_plugin(), minpf_load(), minpf_load_dynamic_library(), minpf_load_from_dir(), minpf_load_from_path(), minpf_post_load_plugin(), minpf_register_object(), minpf_unload_dynamic_library(), mqc_bypass_flush_enc(), mqc_bypass_get_extra_bytes_enc(), mqc_bypass_init_enc(), mqc_byteout(), mqc_codelps_enc(), mqc_codemps_enc(), mqc_encode(), mqc_erterm_enc(), mqc_finish_dec(), mqc_flush_enc(), mqc_init_dec(), mqc_init_dec_common(), mqc_init_enc(), mqc_next_plane(), mqc_numbytes_enc(), mqc_raw_init_dec(), mqc_renorm_enc(), mqc_resetstates(), mqc_restart_init_enc(), mqc_segmark_enc(), mqc_setbits_enc(), MycmsLogErrorHandlerFunction(), grk::TileProcessor::needsRateControl(), grk::TileLengthMarkers::next(), grk::PLCache::next(), grk::PacketIter::next(), grk::PacketIter::next_cprl(), grk::PacketIter::next_cprlOPT(), grk::PacketIter::next_lrcp(), grk::PacketIter::next_lrcpOPT(), grk::PacketIter::next_pcrl(), grk::PacketIter::next_pcrlOPT(), grk::PacketIter::next_rlcp(), grk::PacketIter::next_rlcpOPT(), grk::PacketIter::next_rpcl(), grk::PacketIter::next_rpclOPT(), nextCXD(), grk::CodeStreamDecompress::nextTLM(), grk::grk_rect< T >::nonEmptyIntersection(), grk::BufferedStream::numBytesLeft(), grk::TileSet::numScheduled(), open_fd(), grk::MinHeapPtrComparator< T >::operator()(), grk::MinHeapComparator< T >::operator()(), grk::vec< T, N >::operator+(), grk::vec< T, N >::operator+=(), grk::vec< T, N >::operator-(), grk::vec< T, N >::operator-=(), grk::Codeblock::operator=(), grk::grk_buf< T, A >::operator=(), grk::grk_buf< T, A >::operator=(), grk::grk_buf2d< T, A >::operator=(), grk::grk_buf2d< T, A >::operator=(), grk::grk_rect< T >::operator=(), grk::grk_rect< T >::operator=(), grk::Subband::operator=(), grk::grk_rect< T >::operator==(), grk::DecompressorState::orState(), grk::PacketTracker::packet_encoded(), grk::PacketIter::PacketIter(), grk::PacketManager::PacketManager(), grk::grk_rect< T >::pan(), grk::grk_rect< T >::pan_IN_PLACE(), grk::CodeStreamDecompress::parseTileParts(), grk::TileProcessor::pcrdBisectFeasible(), grk::TileProcessor::pcrdBisectSimple(), grk::PLMarkerMgr::PLMarkerMgr(), grk::PluginDecodeCallbackInfo::PluginDecodeCallbackInfo(), grk::PLMarkerMgr::pop(), grk::PLMarkerMgr::pop(), grk::MinHeap< T, IT, L >::pop(), grk::MinHeapPtr< T, IT, L >::pop(), grk::TileComponent::postDecompressImpl(), grk::TileComponentWindow< T >::postProcess(), grk::TileComponent::postProcess(), grk::CodeStreamDecompress::postProcess(), grk::TileComponent::postProcessHT(), grk::GrkImage::postReadHeader(), grk::ResFlow::precede(), grk::ResFlow::precede(), grk::PrecinctImpl::PrecinctImpl(), grk::PrecinctPacketParsers::PrecinctPacketParsers(), grk::PacketIter::precInfoCheck(), grk::t1_part1::T1Part1::preCompress(), grk::TileProcessor::preCompressTile(), grk::FileFormatDecompress::preProcess(), grk::Resolution::print(), grk::GrkImage::print(), grk::PacketIter::printDynamicState(), grk::PacketIter::printStaticState(), grk::CodeStreamDecompress::process_marker(), grk::T2Decompress::processPacket(), grk::Quantizer::pull(), grk::Quantizer::push(), grk::MinHeapPtr< T, IT, L >::push(), grk::MinHeap< T, IT, L >::push(), grk::TileLengthMarkers::push(), grk::TileLengthMarkers::push(), grk::SparseBuffer::pushBack(), grk::SparseBuffer::pushBack(), grk::PLMarkerMgr::pushInit(), grk::PrecinctPacketParsers::pushParser(), grk::ParserMap::pushParser(), grk::PLMarkerMgr::pushPL(), grk::BufPool::put(), grk::TileCache::put(), grk::BitIO::putbit(), grk::BitIO::putcommacode(), grk::BitIO::putnumpasses(), grk::Quantizer::Quantizer(), grk::TileProcessor::rateAllocate(), grk::SIZMarker::read(), grk::SOTMarker::read(), grk::SOTMarker::read(), grk::BitIO::read(), grk::BufferedStream::read(), grk::TileLengthMarkers::read(), grk::PPMMarker::read(), grk::SparseCanvas< LBW, LBH >::read(), grk::SparseBuffer::read(), grk::FileFormatDecompress::read_asoc(), grk::FileFormatDecompress::read_asoc(), grk::FileFormatDecompress::read_box(), grk::FileFormatDecompress::read_box_hdr(), grk::FileFormatDecompress::read_bpc(), grk::CodeStreamDecompress::read_cap(), grk::CodeStreamDecompress::read_cbd(), grk::FileFormatDecompress::read_channel_definition(), grk::CodeStreamDecompress::read_coc(), grk::CodeStreamDecompress::read_cod(), grk::FileFormatDecompress::read_colr(), grk::CodeStreamDecompress::read_com(), grk::FileFormatDecompress::read_component_mapping(), grk::CodeStreamDecompress::read_crg(), read_from_mem(), grk::FileFormatDecompress::read_ftyp(), grk::FileFormatDecompress::read_ihdr(), grk::FileFormatDecompress::read_jp(), grk::FileFormatDecompress::read_jp2h(), grk::CodeStreamDecompress::read_mcc(), grk::CodeStreamDecompress::read_mco(), grk::CodeStreamDecompress::read_mct(), grk::FileFormatDecompress::read_palette_clr(), grk::CodeStreamDecompress::read_plm(), grk::CodeStreamDecompress::read_plt(), grk::CodeStreamDecompress::read_poc(), grk::CodeStreamDecompress::read_ppm(), grk::CodeStreamDecompress::read_ppt(), grk::CodeStreamDecompress::read_qcc(), grk::CodeStreamDecompress::read_qcd(), grk::FileFormatDecompress::read_res(), grk::FileFormatDecompress::read_res_box(), grk::CodeStreamDecompress::read_rgn(), grk::BufferedStream::read_seek(), grk::CodeStreamDecompress::read_short(), grk::CodeStreamDecompress::read_siz(), grk::BufferedStream::read_skip(), grk::CodeStreamDecompress::read_soc(), grk::CodeStreamDecompress::read_sot(), grk::CodeStreamDecompress::read_SPCod_SPCoc(), grk::CodeStreamDecompress::read_SQcd_SQcc(), grk::CodeStreamDecompress::read_tlm(), grk::CodeStreamDecompress::read_unk(), grk::FileFormatDecompress::read_uuid(), grk::FileFormatDecompress::read_xml(), grk::CodeStreamDecompress::readCurrentMarkerBody(), grk::PacketParser::readData(), grk::PacketParser::readDataFinalize(), grk::CodeStreamDecompress::readHeader(), grk::FileFormatDecompress::readHeader(), grk::PacketParser::readHeader(), grk::CodeStreamDecompress::readHeaderProcedure(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), grk::FileFormatDecompress::readHeaderProcedureImpl(), grk::CodeStreamDecompress::readMarker(), grk::PLMarkerMgr::readNextByte(), grk::T2Decompress::readPacketData(), grk::PLMarkerMgr::readPLM(), grk::PLMarkerMgr::readPLT(), grk::CodeStreamDecompress::readSOTorEOC(), grk::SparseCanvas< LBW, LBH >::readWrite(), grk::grk_rect< T >::rectUnion(), grk::grk_rect< T >::rectUnion(), grk::Strip::reduceDim(), grk::TileProcessor::release(), grk::ResDecompressBlocks::release(), grk::GrkObjectWrapperImpl< T >::release(), grk::DecompressScheduler::releaseBlocks(), grk::TagTree< T >::reset(), grk::ResIncludeBuffers::ResIncludeBuffers(), grk::ResSimple::ResSimple(), grk::ResSimple::ResSimple(), grk::ResWindow< T >::ResWindow(), grk::StripCache::returnBufferToPool(), grk::SparseBuffer::rewind(), satAdd(), satAdd(), satSub(), satSub(), grk::grk_rect< T >::scale(), grk::GrkImage::scaleComponent(), grk::grk_rect< T >::scaleDown(), grk::grk_rect< T >::scaleDownCeil(), grk::grk_rect< T >::scaleDownCeil(), grk::grk_rect< T >::scaleDownCeilPow2(), grk::grk_rect< T >::scaleDownCeilPow2(), grk::grk_rect< T >::scaleDownPow2(), grk::grk_rect< T >::scaleDownPow2(), grk::TileSet::schedule(), grk::DecompressScheduler::schedule(), grk::CompressScheduler::scheduleBlocks(), grk::DecompressScheduler::scheduleBlocks(), grk::Scheduler::Scheduler(), grk::DecompressScheduler::scheduleWavelet(), grk::TileLengthMarkers::seek(), seek_from_mem(), grk::StripCache::serialize(), grk::FileFormatDecompress::serializeAsoc(), grk::Profile::set_broadcast_parameters(), grk::Profile::set_cinema_parameters(), set_context_stream(), grk::Profile::set_imf_parameters(), set_up_mem_stream(), grk::CodeStreamDecompress::setDecompressRegion(), grk::FileFormatDecompress::setDecompressRegion(), grk::TileCodingParams::setIsHT(), grk::Codeblock::setNumPassesInPacket(), grk::grk_rect< T >::setOrigin(), grk::grk_rect< T >::setOrigin(), grk::grk_rect< T >::setOrigin(), grk::BufferedStream::setReadFunction(), grk::Codeblock::setRect(), grk::grk_rect< T >::setRect(), grk::grk_rect< T >::setRect(), grk::BufferedStream::setSeekFunction(), grk::DecompressorState::setState(), grk::TileCache::setStrategy(), grk::TileProcessor::setTilePartDataLength(), grk::BufferedStream::setUserData(), grk::TagTree< T >::setvalue(), grk::BufferedStream::setWriteFunction(), grk::BufferedStream::setZeroCopyReadFunction(), grk::grk_buf2d< T, A >::simple(), grk::grk_buf2d< T, A >::simpleF(), grk::GrkImage::single_component_data_free(), size_proc(), grk::BufferedStream::skip(), grk::SparseBuffer::skip(), grk::FileFormatCompress::skip_jp2c(), grk::PacketIter::skipPackets(), grk::RateControl::slopeFromLog(), grk::RateControl::slopeToLog(), grk::SparseCanvas< LBW, LBH >::SparseCanvas(), grk::FileFormatCompress::start(), grk::TileComponentWindow< T >::stridedArea(), grk::Strip::Strip(), grk::TileComponent::subbandIntersectsAOI(), grk::GrkImage::subsampleAndReduce(), grk::SIZMarker::subsampleAndReduceHeaderImageComponents(), grk::TileProcessor::subtractMarkerSegmentLength(), grk::GrkImage::supportsStripCache(), grk::GrkImage::sycc420_to_rgb(), grk::GrkImage::sycc422_to_rgb(), grk::GrkImage::sycc444_to_rgb(), grk::GrkImage::sycc_to_rgb(), grk::RateInfo::synch(), grk::T1::T1(), grk::TileProcessor::t1_encode(), grk::t1_part1::T1Part1::T1Part1(), grk::TagTree< T >::TagTree(), grk::Tile::Tile(), grk::Tile::Tile(), tile_equals(), grk::TileCodingParams::TileCodingParams(), grk::TileComponentCodingParams::TileComponentCodingParams(), grk::TileComponentWindowBase< T >::TileComponentWindowBase(), grk::grk_rect< T >::toRelative(), grk::TileComponentWindow< T >::toRelativeCoordinates(), grk::grk_buf< T, A >::transfer(), grk::grk_buf2d< T, A >::transfer(), grk::GrkImage::transferDataFrom(), grk::GrkImage::transferDataTo(), grk::HWY_NAMESPACE::DecompressDcShiftIrrev::transform(), grk::HWY_NAMESPACE::DecompressDcShiftRev::transform(), grk::HWY_NAMESPACE::DecompressRev::transform(), grk::HWY_NAMESPACE::DecompressIrrev::transform(), grk::HWY_NAMESPACE::CompressRev::transform(), grk::HWY_NAMESPACE::CompressIrrev::transform(), grk::SparseCache< T >::tryGet(), unmap(), grk::IncludeTracker::update(), grk::PacketIter::update_dxy(), grk::PacketIter::update_dxy_for_comp(), update_flags(), update_maximum(), grk::PacketManager::updateCompressParams(), grk::PacketManager::updateCompressTcpProgressions(), grk::CodeStreamCompress::updateRates(), grk::UUIDBox::UUIDBox(), grk::UUIDBox::UUIDBox(), grk::GrkImage::validateICC(), grk::PacketIter::validatePrecinct(), grk::CodeStreamCompress::validateProgressionOrders(), grk::GrkImage::validateZeroed(), grk::vec< T, N >::vec(), grk::HWY_NAMESPACE::vscheduler(), grk::SIZMarker::write(), grk::grk_buf< T, A >::write(), grk::SOTMarker::write(), grk::BufferedStream::write(), grk::BitIO::write(), grk::SparseCanvas< LBW, LBH >::write(), grk::PLMarkerMgr::write(), grk::BufferedStream::write24(), grk::BufferedStream::write64(), grk::CodeStreamCompress::write_all_coc(), grk::CodeStreamCompress::write_all_qcc(), grk::FileFormatCompress::write_bpc(), grk::FileFormatCompress::write_buffer(), grk::CodeStreamCompress::write_cbd(), grk::FileFormatCompress::write_channel_definition(), grk::CodeStreamCompress::write_coc(), grk::CodeStreamCompress::write_cod(), grk::FileFormatCompress::write_colr(), grk::CodeStreamCompress::write_com(), grk::FileFormatCompress::write_component_mapping(), grk::FileFormatCompress::write_ftyp(), grk::FileFormatCompress::write_ihdr(), grk::FileFormatCompress::write_jp(), grk::FileFormatCompress::write_jp2c(), grk::FileFormatCompress::write_jp2h(), grk::CodeStreamCompress::write_mcc_record(), grk::CodeStreamCompress::write_mco(), grk::CodeStreamCompress::write_mct_data_group(), grk::CodeStreamCompress::write_mct_record(), grk::FileFormatCompress::write_palette_clr(), grk::SOTMarker::write_psot(), grk::CodeStreamCompress::write_qcc(), grk::CodeStreamCompress::write_qcd(), grk::CodeStreamCompress::write_regions(), grk::FileFormatCompress::write_res(), grk::FileFormatCompress::write_res_box(), grk::CodeStreamCompress::write_rgn(), grk::CodeStreamCompress::write_siz(), grk::BufferedStream::write_skip(), grk::CodeStreamCompress::write_SPCod_SPCoc(), grk::CodeStreamCompress::write_SQcd_SQcc(), write_to_mem(), grk::FileFormatCompress::write_uuids(), grk::FileFormatCompress::write_xml(), grk::TileLengthMarkers::writeBegin(), grk::BufferedStream::writeBytes(), grk::TileLengthMarkers::writeEnd(), grk::BufferedStream::writeIncrement(), grk::BufferedStream::writeInt(), grk::CodeStreamCompress::writePoc(), grk::BufferedStream::writeShort(), grk::CodeStreamCompress::writeTilePart(), grk::CodeStreamCompress::writeTileParts(), grk::TileProcessor::writeTilePartT2(), zero_copy_read_from_mem(), grk::BufPool::~BufPool(), grk::CodingParams::~CodingParams(), grk::DecompressScheduler::~DecompressScheduler(), grk::FileFormat::~FileFormat(), grk::PacketInfoCache::~PacketInfoCache(), grk::ParserMap::~ParserMap(), grk::PPMMarker::~PPMMarker(), grk::PrecinctPacketParsers::~PrecinctPacketParsers(), grk::ResIncludeBuffers::~ResIncludeBuffers(), grk::ResWindow< T >::~ResWindow(), grk::Scheduler::~Scheduler(), grk::SequentialPtrCache< T >::~SequentialPtrCache(), grk::SparseCache< T >::~SparseCache(), grk::SparseCanvas< LBW, LBH >::~SparseCanvas(), grk::StripCache::~StripCache(), grk::TileCache::~TileCache(), grk::TileCodingParams::~TileCodingParams(), grk::TileComponent::~TileComponent(), and grk::TileComponentWindowBase< T >::~TileComponentWindowBase().

## grk_realloc()

void * grk::grk_realloc | ( | void * | m,
|  | size_t | s
| ) |  |

Reallocate memory blocks.

Parameters

  m | Pointer to previously allocated memory block
  s | New size in bytes

Returns
  a void pointer to the reallocated (and possibly moved) memory block

References grk_read().

Referenced by grk::TileInfo::checkResize(), grk::CodeStreamCompress::init_mct_encoding(), grk::PPMMarker::read(), grk::CodeStreamDecompress::read_mcc(), grk::CodeStreamDecompress::read_mct(), grk::CodeStreamDecompress::read_ppt(), and grk::FileFormatDecompress::readHeaderProcedureImpl().

## grk_stream_set_zero_copy_read_function()

static void grk::grk_stream_set_zero_copy_read_function | ( | grk_stream * | stream,
|  | grk_stream_zero_copy_read_fn | func
| ) |  |

static

Set the given function to be used as a zero copy read function.

NOTE: this feature is only available for memory mapped and buffer backed streams, not file streams

Parameters

  stream | stream to modify
  p_function | function to use as read function.

References grk::BufferedStream::getImpl(), grk_read(), and GROK_STREAM_STATUS_INPUT.

Referenced by set_up_mem_stream().

## GRK_WARN()

void grk::GRK_WARN | ( | const char * | fmt,
|  |  | ...
| ) |  |

References grk_read(), log(), and grk::logger::logger_.

Referenced by grk::GrkImage::allComponentsSanityCheck(), grk::SparseCanvas< LBW, LBH >::alloc(), grk::GrkImage::apply_channel_definition(), grk::GrkImage::applyColourManagement(), grk::GrkImage::applyICC(), grk::BitIO::bytein(), grk::TileProcessor::cacheTilePartPackets(), grk::GrkImage::check_color(), grk::GrkImage::cieLabToRGB(), grk::GrkImage::color_sycc_to_rgb(), grk::GrkImage::compositeInterleaved(), grk::GrkImage::compositeInterleaved(), grk::GrkImage::compositePlanar(), compress_synch_with_plugin(), grk::T2Compress::compressHeader(), grk::GrkImage::convertPrecision(), grk::GrkImage::convertToRGB(), grk::GrkImage::createRGB(), grk::T1::dec_clnpass_check_segsym(), grk::T1::decompress_cblk(), grk::T2Decompress::decompressPackets(), grk::TileProcessor::decompressT2T1(), grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), grk::DecompressorState::findNextSOT(), grk::CodeStreamDecompress::get_marker_handler(), grk::PrecinctImpl::getIMsbTagTree(), grk::PrecinctImpl::getIncludeTagTree(), grk::grk_buf< T, A >::incrementOffset(), grk::CodeStreamCompress::init(), grk::FileFormatCompress::init(), grk::TileProcessor::init(), grk::Profile::is_broadcast_compliant(), grk::Profile::is_cinema_compliant(), grk::Profile::is_imf_compliant(), MycmsLogErrorHandlerFunction(), grk::TileProcessor::needsMctDecompress(), grk::TileLengthMarkers::next(), grk::CodeStreamDecompress::nextTLM(), ojph::local::ojph_decode_codeblock(), ojph::local::ojph_decode_codeblock_ssse3(), grk::FileFormatDecompress::preProcess(), grk::PrecinctPacketParsers::pushParser(), grk::SIZMarker::read(), grk::TileLengthMarkers::read(), grk::SparseBuffer::read(), grk::FileFormatDecompress::read_bpc(), grk::CodeStreamDecompress::read_cod(), grk::FileFormatDecompress::read_colr(), grk::CodeStreamDecompress::read_com(), grk::FileFormatDecompress::read_ihdr(), grk::CodeStreamDecompress::read_mcc(), grk::CodeStreamDecompress::read_mco(), grk::CodeStreamDecompress::read_mct(), grk::CodeStreamDecompress::read_SQcd_SQcc(), grk::FileFormatDecompress::read_uuid(), grk::PacketParser::readData(), grk::FileFormatDecompress::readHeader(), grk::PacketParser::readHeader(), grk::FileFormatDecompress::readHeaderProcedureImpl(), grk::CodeStreamDecompress::readMarker(), grk::CodeStreamDecompress::readSOTorEOC(), grk::SparseCanvas< LBW, LBH >::readWrite(), grk::FileFormatDecompress::serializeAsoc(), grk::Profile::set_cinema_parameters(), grk::CodeStreamDecompress::setDecompressRegion(), grk::TileProcessor::setTilePartDataLength(), grk::SparseBuffer::skip(), grk::GrkImage::sycc420_to_rgb(), grk::GrkImage::sycc422_to_rgb(), grk::TagTree< T >::TagTree(), grk::GrkObjectWrapper::unref(), grk::GrkImage::validateICC(), and grk::CodeStreamCompress::write_com().

## grk_write() [1/2]

template<typename TYPE >

void grk::grk_write | ( | uint8_t * | buffer,
|  | TYPE | value
| ) |  |

References grk_read().

## grk_write() [2/2]

template<typename TYPE >

void grk::grk_write | ( | uint8_t * | buffer,
|  | TYPE | value,
|  | uint32_t | numBytes
| ) |  |

References grk_read().

Referenced by grk::BufferedStream::write(), and grk::FileFormatCompress::write_bpc().

## grkReclaimCallback()

static bool grk::grkReclaimCallback | ( | uint32_t | threadId,
|  | grk_io_buf | buffer,
|  | void * | io_user_data
| ) |  |

static

References grk_read().

Referenced by grk::StripCache::init().

## j2k_read_float32_to_float()

static void grk::j2k_read_float32_to_float | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_float32_to_int32()

static void grk::j2k_read_float32_to_int32 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_float64_to_float()

static void grk::j2k_read_float64_to_float | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_float64_to_int32()

static void grk::j2k_read_float64_to_int32 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_int16_to_float()

static void grk::j2k_read_int16_to_float | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_int16_to_int32()

static void grk::j2k_read_int16_to_int32 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_int32_to_float()

static void grk::j2k_read_int32_to_float | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_read_int32_to_int32()

static void grk::j2k_read_int32_to_int32 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_write()

template<typename S , typename D >

void grk::j2k_write | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

References grk_read().

## j2k_write_float_to_float()

static void grk::j2k_write_float_to_float | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_write_float_to_float64()

static void grk::j2k_write_float_to_float64 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_write_float_to_int16()

static void grk::j2k_write_float_to_int16 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## j2k_write_float_to_int32()

static void grk::j2k_write_float_to_int32 | ( | const void * | p_src_data,
|  | void * | p_dest_data,
|  | uint64_t | nb_elem
| ) |  |

static

References grk_read().

## log()

template<typename... Args>

void grk::log | ( | grk_msg_callback | msg_handler,
|  | void * | l_data,
|  | char const *const | format,
|  | Args &... | args
| ) |  |

noexcept

References grk_read().

Referenced by GRK_ERROR(), GRK_INFO(), GRK_WARN(), grk::RateControl::slopeFromLog(), and grk::RateControl::slopeToLog().

## max_resolution()

uint32_t grk::max_resolution | ( | Resolution *GRK_RESTRICT | r,
|  | uint32_t | i
| ) |  |

Referenced by grk::WaveletFwdImpl::encode_procedure().

## mem_map_free()

static void grk::mem_map_free | ( | void * | user_data | ) |

static

References close_fd(), GRK_ERROR(), grk_read(), and unmap().

Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().

## minpf_cleanup_plugin_manager()

void grk::minpf_cleanup_plugin_manager | ( | void |  | ) |

References grk::minpf_plugin_manager::dynamic_libraries, grk::minpf_plugin_manager::exit_functions, grk_read(), managerInstance, minpf_unload_dynamic_library(), grk::minpf_plugin_manager::num_exit_functions, grk::minpf_plugin_manager::num_libraries, and grk::minpf_plugin_manager::plugins.

Referenced by grk_plugin_cleanup(), and grk_plugin_load().

## minpf_get_dynamic_library_extension()

const char * grk::minpf_get_dynamic_library_extension | ( | void |  | ) |

Referenced by grk_plugin_load(), and minpf_load_from_dir().

## minpf_get_full_path()

bool grk::minpf_get_full_path | ( | const char * | path,
|  | void * | addr,
|  | dynamic_handle_t | handle,
|  | char * | fullPath,
|  | size_t | fullPathLen
| ) |  |

References grk_read().

Referenced by minpf_load().

## minpf_get_plugin_manager()

minpf_plugin_manager * grk::minpf_get_plugin_manager | ( | void |  | ) |

References grk_read(), managerInstance, and minpf_initialize_plugin_manager().

Referenced by grk_plugin_batch_compress(), grk_plugin_batch_decompress(), grk_plugin_compress(), grk_plugin_decompress(), grk_plugin_get_debug_state(), grk_plugin_init(), grk_plugin_init_batch_decompress(), grk_plugin_is_batch_complete(), grk_plugin_stop_batch_compress(), grk_plugin_stop_batch_decompress(), minpf_load(), minpf_load_from_dir(), minpf_load_from_path(), minpf_post_load_plugin(), minpf_register_object(), mqc_next_plane(), and nextCXD().

## minpf_get_symbol()

void * grk::minpf_get_symbol | ( | minpf_dynamic_library * | library,
|  | const char * | symbol
| ) |  |

References grk_read().

Referenced by grk_plugin_batch_compress(), grk_plugin_batch_decompress(), grk_plugin_compress(), grk_plugin_decompress(), grk_plugin_get_debug_state(), grk_plugin_init(), grk_plugin_init_batch_decompress(), grk_plugin_is_batch_complete(), grk_plugin_stop_batch_compress(), grk_plugin_stop_batch_decompress(), minpf_load(), mqc_next_plane(), and nextCXD().

## minpf_init_plugin()

PLUGIN_API minpf_exit_func grk::minpf_init_plugin | ( | const char * | pluginPath,
|  | const minpf_platform_services * | params
| ) |  |

## minpf_initialize_plugin_manager()

void grk::minpf_initialize_plugin_manager | ( | minpf_plugin_manager * | manager | ) |

References grk_read(), and minpf_register_object().

Referenced by minpf_get_plugin_manager().

## minpf_is_valid_plugin()

static uint32_t grk::minpf_is_valid_plugin | ( | const char * | id,
|  | const minpf_register_params * | params
| ) |  |

static

References grk_read().

Referenced by minpf_register_object().

## minpf_load()

static int32_t grk::minpf_load | ( | const char * | path | ) |

static

References grk_read(), minpf_get_full_path(), minpf_get_plugin_manager(), minpf_get_symbol(), minpf_load_dynamic_library(), MINPF_MAX_PLUGINS, minpf_post_load_plugin(), and minpf_unload_dynamic_library().

Referenced by minpf_load_from_dir(), and minpf_load_from_path().

## minpf_load_dynamic_library()

minpf_dynamic_library * grk::minpf_load_dynamic_library | ( | const char * | path,
|  | char * | error
| ) |  |

References grk_read().

Referenced by minpf_load().

## minpf_load_from_dir()

int32_t grk::minpf_load_from_dir | ( | const char * | directory_path,
|  | minpf_invoke_service_func | func
| ) |  |

References get_filename_ext(), grk_read(), MINPF_FILE_SEPARATOR, minpf_get_dynamic_library_extension(), minpf_get_plugin_manager(), minpf_load(), and MINPF_MAX_PATH_LEN.

## minpf_load_from_path()

int32_t grk::minpf_load_from_path | ( | const char * | path,
|  | minpf_invoke_service_func | func
| ) |  |

References grk_read(), minpf_get_plugin_manager(), and minpf_load().

Referenced by grk_plugin_load().

## minpf_post_load_plugin()

static int32_t grk::minpf_post_load_plugin | ( | const char * | pluginPath,
|  | minpf_post_load_func | initFunc
| ) |  |

static

References grk_read(), and minpf_get_plugin_manager().

Referenced by minpf_load().

## minpf_register_object()

int32_t grk::minpf_register_object | ( | const char * | id,
|  | const minpf_register_params * | params
| ) |  |

References grk_read(), minpf_get_plugin_manager(), and minpf_is_valid_plugin().

Referenced by minpf_initialize_plugin_manager().

## minpf_unload_dynamic_library()

bool grk::minpf_unload_dynamic_library | ( | minpf_dynamic_library * | library | ) |

References grk_read().

Referenced by minpf_cleanup_plugin_manager(), and minpf_load().

## mqc_bypass_enc()

void grk::mqc_bypass_enc | ( | mqcoder * | mqc,
|  | uint32_t | d
| ) |  |

## mqc_bypass_flush_enc()

void grk::mqc_bypass_flush_enc | ( | mqcoder * | mqc,
|  | bool | erterm
| ) |  |

References grk_read().

Referenced by grk::T1::compress_cblk().

## mqc_bypass_get_extra_bytes_enc()

uint32_t grk::mqc_bypass_get_extra_bytes_enc | ( | mqcoder * | mqc,
|  | bool | erterm
| ) |  |

References grk_read().

Referenced by grk::T1::compress_cblk().

## mqc_bypass_init_enc()

void grk::mqc_bypass_init_enc | ( | mqcoder * | mqc | ) |

References BYPASS_CT_INIT, and grk_read().

Referenced by grk::T1::compress_cblk().

## mqc_byteout()

void grk::mqc_byteout | ( | mqcoder * | mqc | ) |

References grk_read().

Referenced by mqc_erterm_enc(), mqc_flush_enc(), and mqc_renorm_enc().

## mqc_codelps_enc()

static void grk::mqc_codelps_enc | ( | mqcoder * | mqc | ) |

static

References grk_read(), and mqc_renorm_enc().

Referenced by mqc_encode().

## mqc_codemps_enc()

static void grk::mqc_codemps_enc | ( | mqcoder * | mqc | ) |

static

References grk_read(), and mqc_renorm_enc().

Referenced by mqc_encode().

## mqc_encode()

void grk::mqc_encode | ( | mqcoder * | mqc,
|  | uint32_t | d
| ) |  |

References grk_read(), mqc_codelps_enc(), and mqc_codemps_enc().

Referenced by mqc_segmark_enc().

## mqc_erterm_enc()

void grk::mqc_erterm_enc | ( | mqcoder * | mqc | ) |

References grk_read(), and mqc_byteout().

Referenced by grk::T1::compress_cblk().

## mqc_finish_dec()

void grk::mqc_finish_dec | ( | mqcoder * | mqc | ) |

Terminate RAW/MQC decoding.

This restores the bytes temporarily overwritten by mqc_init_dec()/ mqc_raw_init_dec()

Parameters

  mqc | MQC handle

References grk_cblk_dec_compressed_data_pad_right, and grk_read().

Referenced by grk::T1::decompress_cblk().

## mqc_flush_enc()

void grk::mqc_flush_enc | ( | mqcoder * | mqc | ) |

References grk_read(), mqc_byteout(), and mqc_setbits_enc().

Referenced by grk::T1::compress_cblk().

## mqc_init_dec()

void grk::mqc_init_dec | ( | mqcoder * | mqc,
|  | uint8_t * | bp,
|  | uint32_t | len
| ) |  |

Initialize the decoder for MQ decoding.

mqc_finish_dec() must be absolutely called after finishing the decoding passes, so as to restore the bytes temporarily overwritten.

Parameters

  mqc | MQC handle
  bp | Pointer to the start of the buffer from which the bytes will be read Note that OPJ_COMMON_CBLK_DATA_EXTRA bytes at the end of the buffer will be temporarily overwritten with an artificial 0xFF 0xFF marker. (they will be backuped in the mqc structure to be restored later) So bp must be at least len + OPJ_COMMON_CBLK_DATA_EXTRA large, and writable.
  len | Length of the input buffer

References A_MIN, grk_read(), mqc_bytein(), mqc_init_dec_common(), and mqc_setcurctx.

Referenced by grk::T1::decompress_cblk().

## mqc_init_dec_common()

static void grk::mqc_init_dec_common | ( | mqcoder * | mqc,
|  | uint8_t * | bp,
|  | uint32_t | len
| ) |  |

static

References grk_cblk_dec_compressed_data_pad_right, and grk_read().

Referenced by mqc_init_dec(), and mqc_raw_init_dec().

## mqc_init_enc()

void grk::mqc_init_enc | ( | mqcoder * | mqc,
|  | uint8_t * | bp
| ) |  |

References grk_read(), and mqc_setcurctx.

Referenced by grk::T1::compress_cblk().

## mqc_next_plane()

void grk::mqc_next_plane | ( | grk_plugin_debug_mqc * | mqc | ) |

References grk_read(), minpf_get_plugin_manager(), minpf_get_symbol(), and plugin_debug_mqc_next_plane_method_name.

## mqc_numbytes_enc()

uint32_t grk::mqc_numbytes_enc | ( | mqcoder * | mqc | ) |

References grk_read().

Referenced by grk::T1::compress_cblk().

## mqc_raw_init_dec()

void grk::mqc_raw_init_dec | ( | mqcoder * | mqc,
|  | uint8_t * | bp,
|  | uint32_t | len
| ) |  |

Initialize the decoder for RAW decoding.

mqc_finish_dec() must be absolutely called after finishing the decoding passes, so as to restore the bytes temporarily overwritten.

Parameters

  mqc | MQC handle
  bp | Pointer to the start of the buffer from which the bytes will be read Note that OPJ_COMMON_CBLK_DATA_EXTRA bytes at the end of the buffer will be temporarily overwritten with an artificial 0xFF 0xFF marker. (they will be backuped in the mqc structure to be restored later) So bp must be at least len + OPJ_COMMON_CBLK_DATA_EXTRA large, and writable.
  len | Length of the input buffer

References grk_read(), and mqc_init_dec_common().

Referenced by grk::T1::decompress_cblk().

## mqc_renorm_enc()

static void grk::mqc_renorm_enc | ( | mqcoder * | mqc | ) |

static

References grk_read(), and mqc_byteout().

Referenced by mqc_codelps_enc(), and mqc_codemps_enc().

## mqc_resetstates()

void grk::mqc_resetstates | ( | mqcoder * | mqc | ) |

References grk_read(), MQC_NUMCTXS, mqc_states, T1_CTXNO_AGG, T1_CTXNO_UNI, and T1_CTXNO_ZC.

Referenced by grk::T1::compress_cblk(), and grk::T1::decompress_cblk().

## mqc_restart_init_enc()

void grk::mqc_restart_init_enc | ( | mqcoder * | mqc | ) |

References grk_read().

Referenced by grk::T1::compress_cblk().

## mqc_segmark_enc()

void grk::mqc_segmark_enc | ( | mqcoder * | mqc | ) |

References grk_read(), mqc_encode(), and mqc_setcurctx.

Referenced by grk::T1::compress_cblk().

## mqc_setbits_enc()

static void grk::mqc_setbits_enc | ( | mqcoder * | mqc | ) |

static

References grk_read().

Referenced by mqc_flush_enc().

## MycmsLogErrorHandlerFunction()

void grk::MycmsLogErrorHandlerFunction | ( | cmsContext | ContextID,
|  | cmsUInt32Number | ErrorCode,
|  | const char * | Text
| ) |  |

References grk_read(), and GRK_WARN().

Referenced by grk::FileFormatCompress::init().

## nextCXD()

void grk::nextCXD | ( | grk_plugin_debug_mqc * | mqc,
|  | uint32_t | d
| ) |  |

References grk_read(), minpf_get_plugin_manager(), minpf_get_symbol(), and plugin_debug_mqc_next_cxd_method_name.

## open_fd()

static grk_handle grk::open_fd | ( | const char * | fname,
|  | const char * | mode
| ) |  |

static

References get_file_open_mode(), GRK_ERROR(), and grk_read().

Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().

## prepareBlockForFirstLayer()

static void grk::prepareBlockForFirstLayer | ( | CompressCodeblock * | cblk | ) |

static

References grk::Codeblock::numlenbits, grk::CompressCodeblock::numPassesInPreviousPackets, and grk::Codeblock::setNumPassesInPacket().

Referenced by grk::TileProcessor::makeLayerFinal(), and grk::TileProcessor::makeLayerSimple().

## read_from_mem()

static size_t grk::read_from_mem | ( | uint8_t * | dest,
|  | size_t | numBytes,
|  | void * | src
| ) |  |

static

References grk_read().

Referenced by set_up_mem_stream().

## satAdd() [1/2]

template<typename T >

T grk::satAdd | ( | int64_t | lhs,
|  | int64_t | rhs
| ) |  |

References grk_read().

## satAdd() [2/2]

template<typename T >

T grk::satAdd | ( | T | lhs,
|  | T | rhs
| ) |  |

References grk_read().

## satSub() [1/2]

template<typename T >

T grk::satSub | ( | int64_t | lhs,
|  | int64_t | rhs
| ) |  |

References grk_read().

## satSub() [2/2]

template<typename T >

T grk::satSub | ( | T | lhs,
|  | T | rhs
| ) |  |

References grk_read().

## seek_from_mem()

static bool grk::seek_from_mem | ( | uint64_t | numBytes,
|  | void * | src
| ) |  |

static

References grk_read().

Referenced by set_up_mem_stream().

## set_context_stream()

void grk::set_context_stream | ( | TileProcessor * | p_tileProcessor | ) |

References grk_read().

Referenced by grk::TileProcessor::doCompress().

## set_up_mem_stream()

void grk::set_up_mem_stream | ( | grk_stream * | stream,
|  | size_t | len,
|  | bool | is_read_stream
| ) |  |

References grk_read(), grk_stream_set_read_function(), grk_stream_set_seek_function(), grk_stream_set_user_data_length(), grk_stream_set_write_function(), grk_stream_set_zero_copy_read_function(), read_from_mem(), seek_from_mem(), write_to_mem(), and zero_copy_read_from_mem().

Referenced by create_mapped_file_read_stream(), create_mapped_file_write_stream(), and create_mem_stream().

## size_proc()

static uint64_t grk::size_proc | ( | grk_handle | fd | ) |

static

References grk_read().

Referenced by create_mapped_file_read_stream().

## tile_equals()

bool grk::tile_equals | ( | grk_plugin_tile * | plugin_tile,
|  | Tile * | tilePtr
| ) |  |

References grk_plugin_get_debug_state(), GRK_PLUGIN_STATE_DEBUG, and grk_read().

Referenced by grk::TileProcessor::init().

## unmap()

static int32_t grk::unmap | ( | void * | ptr,
|  | size_t | len
| ) |  |

static

References grk_read().

Referenced by mem_map_free().

## update_flags()

static INLINE void grk::update_flags | ( | grk_flag * | flagsp,
|  | uint32_t | ci,
|  | uint32_t | s,
|  | uint32_t | stride,
|  | uint32_t | vsc
| ) |  |

static

References grk_read(), and update_flags_macro.

Referenced by grk::T1::dec_sigpass_step_raw(), and grk::T1::enc_clnpass().

## update_maximum()

template<typename T >

void grk::update_maximum | ( | std::atomic< T > & | maximum_value,
|  | T const & | value
| ) |  |

noexcept

References grk_read().

## write_to_mem()

static size_t grk::write_to_mem | ( | const uint8_t * | src,
|  | size_t | numBytes,
|  | void * | dest
| ) |  |

static

References grk_read().

Referenced by set_up_mem_stream().

## zero_copy_read_from_mem()

static size_t grk::zero_copy_read_from_mem | ( | uint8_t ** | buffer,
|  | size_t | numBytes,
|  | void * | src
| ) |  |

static

References grk::MemStream::buf, and grk_read().

Referenced by set_up_mem_stream().

## Variable Documentation

## A_MIN

const uint32_t grk::A_MIN = 0x8000

Referenced by mqc_init_dec().

## alpha

const float grk::alpha = -1.586134342f

static

Referenced by grk::dwt97::encode_1_real(), and grk::dwt97::encode_and_deinterleave_v().

## BAND_RES_ZERO_INDEX_LL

const uint32_t grk::BAND_RES_ZERO_INDEX_LL = 0

## beta

const float grk::beta = -0.052980118f

static

Referenced by grk::dwt97::encode_1_real(), and grk::dwt97::encode_and_deinterleave_v().

## cod_coc_len

const uint32_t grk::cod_coc_len = 5U

Referenced by grk::CodeStreamDecompress::read_cod(), and grk::CodeStreamCompress::write_coc().

## default_header_size

const uint32_t grk::default_header_size = 4096

Referenced by grk::CodeStreamDecompress::process_marker().

## default_number_mcc_records

const uint32_t grk::default_number_mcc_records = 10

Referenced by grk::SIZMarker::read(), and grk::CodeStreamDecompress::read_mcc().

## default_number_mct_records

const uint32_t grk::default_number_mct_records = 10

Referenced by grk::CodeStreamCompress::init_mct_encoding(), grk::SIZMarker::read(), and grk::CodeStreamDecompress::read_mct().

## default_numbers_segments

const uint32_t grk::default_numbers_segments = 10

## delta

const float grk::delta = 0.443506852f

static

Referenced by grk::dwt97::encode_1_real(), grk::dwt97::encode_and_deinterleave_v(), grk::Codeblock::incNumPassesInPacket(), and grk::SparseBuffer::incrementCurrentChunkOffset().

## dwt_norms

const double grk::dwt_norms[4][10]

static

Initial value:
= {
{1.000, 1.500, 2.750, 5.375, 10.68, 21.34, 42.67, 85.33, 170.7, 341.3},
{1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9},
{1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9},
{.7186, .9218, 1.586, 3.043, 6.019, 12.01, 24.00, 47.97, 95.93}}

Referenced by grk::T1::getnorm().

## dwt_norms_real

const double grk::dwt_norms_real[4][10]

static

Initial value:
= {
{1.000, 1.965, 4.177, 8.403, 16.90, 33.84, 67.69, 135.3, 270.6, 540.9},
{2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0},
{2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0},
{2.080, 3.865, 8.307, 17.18, 34.71, 69.59, 139.3, 278.6, 557.2}}

Referenced by grk::T1::getnorm().

## gain_b

const uint8_t grk::gain_b[4] = {0, 1, 1, 2}

Referenced by grk::DecompressScheduler::scheduleBlocks().

## gamma

const float grk::gamma = 0.882911075f

static

Referenced by grk::dwt97::encode_1_real(), and grk::dwt97::encode_and_deinterleave_v().

## grk_buffer_alignment

const size_t grk::grk_buffer_alignment = 64

Referenced by grk_aligned_malloc(), and grk_make_aligned_width().

## GRK_COMP_PARAM_DEFAULT_CBLOCKH

const uint32_t grk::GRK_COMP_PARAM_DEFAULT_CBLOCKH = 64

Referenced by grk_compress_set_default_params(), and grk::Profile::set_imf_parameters().

## GRK_COMP_PARAM_DEFAULT_CBLOCKW

const uint32_t grk::GRK_COMP_PARAM_DEFAULT_CBLOCKW = 64

Referenced by grk_compress_set_default_params(), and grk::Profile::set_imf_parameters().

## GRK_COMP_PARAM_DEFAULT_NUMRESOLUTION

const uint32_t grk::GRK_COMP_PARAM_DEFAULT_NUMRESOLUTION = 6

Referenced by grk_compress_set_default_params(), grk::Profile::set_broadcast_parameters(), and grk::Profile::set_imf_parameters().

## GRK_COMP_PARAM_DEFAULT_PROG_ORDER

const GRK_PROG_ORDER grk::GRK_COMP_PARAM_DEFAULT_PROG_ORDER = GRK_LRCP

Referenced by grk_compress_set_default_params(), and grk::Profile::set_imf_parameters().

## grk_invK

const float grk::grk_invK = (float)(1.0 / 1.230174105)

static

Referenced by grk::dwt97::encode_1_real(), and grk::dwt97::encode_and_deinterleave_v().

## grk_K

const float grk::grk_K = 1.230174105f

static

Referenced by grk::dwt97::encode_1_real(), and grk::dwt97::encode_and_deinterleave_v().

## invScale

const double grk::invScale = log(2) / 256

Referenced by grk::RateControl::slopeFromLog().

## IPTC_UUID

const uint8_t grk::IPTC_UUID[16]

Initial value:
= {0x33, 0xC7, 0xA4, 0xD2, 0xB8, 0x1D, 0x47, 0x23,
0xA0, 0xBA, 0xF1, 0xA3, 0xE0, 0x97, 0xAD, 0x38}

Referenced by grk::FileFormatCompress::init(), and grk::FileFormatDecompress::readHeader().

## j2k_mct_read_functions_to_float

const j2k_mct_function grk::j2k_mct_read_functions_to_float[]

static

Initial value:
= {
j2k_read_int16_to_float, j2k_read_int32_to_float, j2k_read_float32_to_float,
j2k_read_float64_to_float}
grk::j2k_read_int32_to_float
static void j2k_read_int32_to_float(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:30
grk::j2k_read_int16_to_float
static void j2k_read_int16_to_float(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:26
grk::j2k_read_float32_to_float
static void j2k_read_float32_to_float(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:34
grk::j2k_read_float64_to_float
static void j2k_read_float64_to_float(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:38

Referenced by grk::CodeStreamDecompress::add_mct().

## j2k_mct_read_functions_to_int32

const j2k_mct_function grk::j2k_mct_read_functions_to_int32[]

static

Initial value:
= {
j2k_read_int16_to_int32, j2k_read_int32_to_int32, j2k_read_float32_to_int32,
j2k_read_float64_to_int32}
grk::j2k_read_int16_to_int32
static void j2k_read_int16_to_int32(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:42
grk::j2k_read_float32_to_int32
static void j2k_read_float32_to_int32(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:50
grk::j2k_read_int32_to_int32
static void j2k_read_int32_to_int32(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:46
grk::j2k_read_float64_to_int32
static void j2k_read_float64_to_int32(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamDecompress_Markers.cpp:54

Referenced by grk::CodeStreamDecompress::add_mct().

## j2k_mct_write_functions_from_float

const j2k_mct_function grk::j2k_mct_write_functions_from_float[]

static

Initial value:
= {
j2k_write_float_to_int16, j2k_write_float_to_int32, j2k_write_float_to_float,
j2k_write_float_to_float64}
grk::j2k_write_float_to_int16
static void j2k_write_float_to_int16(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamCompress.cpp:26
grk::j2k_write_float_to_float
static void j2k_write_float_to_float(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamCompress.cpp:34
grk::j2k_write_float_to_float64
static void j2k_write_float_to_float64(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamCompress.cpp:38
grk::j2k_write_float_to_int32
static void j2k_write_float_to_int32(const void *p_src_data, void *p_dest_data, uint64_t nb_elem)
Definition CodeStreamCompress.cpp:30

Referenced by grk::CodeStreamCompress::init_mct_encoding().

## J2K_MS_CAP

const uint16_t grk::J2K_MS_CAP = 0xff50

CAP marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), ojph::QuantizerOJPH::write(), and openhtj2k::QuantizerOpenHTJ2K::write().

## J2K_MS_CBD

const uint16_t grk::J2K_MS_CBD = 0xff78

CBD marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_cbd().

## J2K_MS_COC

const uint16_t grk::J2K_MS_COC = 0xff53

COC marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_coc().

## J2K_MS_COD

const uint16_t grk::J2K_MS_COD = 0xff52

COD marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), and grk::CodeStreamCompress::write_cod().

## J2K_MS_COM

const uint16_t grk::J2K_MS_COM = 0xff64

COM marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_com().

## J2K_MS_CRG

const uint16_t grk::J2K_MS_CRG = 0xff63

CRG marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::CodeStream::markerString().

## J2K_MS_EOC

const uint16_t grk::J2K_MS_EOC = 0xffd9

EOC marker value.

Referenced by grk::DecompressorState::findNextSOT(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::parseTileParts(), grk::CodeStreamDecompress::readSOTorEOC(), and grk::CodeStreamCompress::write_eoc().

## J2K_MS_EPH

const uint16_t grk::J2K_MS_EPH = 0xff92

EPH marker value.

Referenced by grk::BitIO::bytein(), grk::T2Compress::compressPacket(), grk::CodeStream::markerString(), and grk::PacketParser::readHeader().

## J2K_MS_MCC

const uint16_t grk::J2K_MS_MCC = 0xff75

MCC marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_mcc_record().

## J2K_MS_MCO

const uint16_t grk::J2K_MS_MCO = 0xff77

MCO marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_mco().

## J2K_MS_MCT

const uint16_t grk::J2K_MS_MCT = 0xff74

MCT marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_mct_record().

## J2K_MS_PLM

const uint16_t grk::J2K_MS_PLM = 0xff57

PLM marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::CodeStream::markerString().

## J2K_MS_PLT

const uint16_t grk::J2K_MS_PLT = 0xff58

PLT marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::PLMarkerMgr::write().

## J2K_MS_POC

const uint16_t grk::J2K_MS_POC = 0xff5f

POC marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::writePoc().

## J2K_MS_PPM

const uint16_t grk::J2K_MS_PPM = 0xff60

PPM marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::CodeStream::markerString().

## J2K_MS_PPT

const uint16_t grk::J2K_MS_PPT = 0xff61

PPT marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::CodeStream::markerString().

## J2K_MS_QCC

const uint16_t grk::J2K_MS_QCC = 0xff5d

QCC marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_qcc().

## J2K_MS_QCD

const uint16_t grk::J2K_MS_QCD = 0xff5c

QCD marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), and grk::CodeStreamCompress::write_qcd().

## J2K_MS_RGN

const uint16_t grk::J2K_MS_RGN = 0xff5e

RGN marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::CodeStreamCompress::write_rgn().

## J2K_MS_SIZ

const uint16_t grk::J2K_MS_SIZ = 0xff51

SIZ marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), and grk::SIZMarker::write().

## J2K_MS_SOC

const uint16_t grk::J2K_MS_SOC = 0xff4f

SOC marker value.

Referenced by grk::CodeStream::markerString(), grk::CodeStreamDecompress::read_soc(), and grk::CodeStreamCompress::write_soc().

## J2K_MS_SOD

const uint16_t grk::J2K_MS_SOD = 0xff93

SOD marker value.

Referenced by grk::TileProcessor::cacheTilePartPackets(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::parseTileParts(), grk::CodeStreamDecompress::readMarker(), and grk::TileProcessor::writeTilePartT2().

## J2K_MS_SOP

const uint16_t grk::J2K_MS_SOP = 0xff91

SOP marker value.

Referenced by grk::BitIO::bytein(), grk::T2Compress::compressPacket(), grk::CodeStream::markerString(), and grk::PacketParser::readHeader().

## J2K_MS_SOT

const uint16_t grk::J2K_MS_SOT = 0xff90

SOT marker value.

Referenced by grk::TileLengthMarkers::addTileMarkerInfo(), grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), grk::DecompressorState::findNextSOT(), grk::CodeStream::markerString(), grk::CodeStreamDecompress::parseTileParts(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), grk::CodeStreamDecompress::readSOTorEOC(), and grk::SOTMarker::write().

## J2K_MS_TLM

const uint16_t grk::J2K_MS_TLM = 0xff55

TLM marker value.

Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), grk::CodeStream::markerString(), and grk::TileLengthMarkers::writeBegin().

## J2K_MS_UNK

const uint16_t grk::J2K_MS_UNK = 0

UNKNOWN marker value.

Referenced by grk::CodeStream::markerString().

## j2k_prog_order_list

j2k_prog_order grk::j2k_prog_order_list[]

static

Initial value:
= {{GRK_CPRL, "CPRL"}, {GRK_LRCP, "LRCP"},
{GRK_PCRL, "PCRL"}, {GRK_RLCP, "RLCP"},
{GRK_RPCL, "RPCL"}, {(GRK_PROG_ORDER)-1, ""}}
GRK_PROG_ORDER
enum _GRK_PROG_ORDER GRK_PROG_ORDER
Progression order.
GRK_RPCL
@ GRK_RPCL
resolution-precinct-component-layer order
Definition grok.h:61
GRK_CPRL
@ GRK_CPRL
component-precinct-resolution-layer order
Definition grok.h:63
GRK_RLCP
@ GRK_RLCP
resolution-layer-component-precinct order
Definition grok.h:60
GRK_LRCP
@ GRK_LRCP
layer-resolution-component-precinct order
Definition grok.h:59
GRK_PCRL
@ GRK_PCRL
precinct-component-resolution-layer order
Definition grok.h:62

Referenced by grk::CodeStreamCompress::convertProgressionOrder().

## managerInstance

minpf_plugin_manager* grk::managerInstance

Referenced by minpf_cleanup_plugin_manager(), and minpf_get_plugin_manager().

## MARKER_BYTES

const uint8_t grk::MARKER_BYTES = 2

Referenced by grk::TileProcessor::cacheTilePartPackets(), grk::CodeStreamDecompress::read_soc(), grk::CodeStreamDecompress::read_unk(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), grk::CodeStreamInfo::seekFirstTilePart(), grk::SIZMarker::write(), and grk::TileLengthMarkers::writeBegin().

## MARKER_LENGTH_BYTES

const uint8_t grk::MARKER_LENGTH_BYTES = 2

Referenced by grk::CodeStreamDecompress::readCurrentMarkerBody(), grk::CodeStreamDecompress::readHeaderProcedureImpl(), and grk::TileProcessor::subtractMarkerSegmentLength().

## MARKER_PLUS_MARKER_LENGTH_BYTES

const uint8_t grk::MARKER_PLUS_MARKER_LENGTH_BYTES = MARKER_BYTES + MARKER_LENGTH_BYTES

Referenced by grk::CodeStreamDecompress::parseTileParts(), grk::SOTMarker::read(), and grk::CodeStreamDecompress::readHeaderProcedureImpl().

## maxBitPlanesGRK

const uint32_t grk::maxBitPlanesGRK = 31 - T1_NMSEDEC_FRACBITS

Referenced by grk::T1::decompress_cblk(), and grk::PacketParser::readHeader().

## maxCompressLayersGRK

const uint16_t grk::maxCompressLayersGRK = 100

Referenced by grk::CompressCodeblock::init(), grk::TileProcessor::pcrdBisectFeasible(), grk::TileProcessor::pcrdBisectSimple(), grk::Tile::Tile(), and grk::TileCodingParams::TileCodingParams().

## maxNumComponentsJ2K

const uint16_t grk::maxNumComponentsJ2K = 16384

Referenced by grk::CodeStreamCompress::init(), grk::SIZMarker::read(), and grk::FileFormatDecompress::read_ihdr().

## maxNumLayersJ2K

const uint16_t grk::maxNumLayersJ2K = 65535

## maxNumTilesJ2K

const uint16_t grk::maxNumTilesJ2K = 65535

Referenced by grk::CodeStreamCompress::compress(), grk::CodeStreamCompress::init(), and grk::SIZMarker::read().

## maxPassesPerSegmentJ2K

const uint8_t grk::maxPassesPerSegmentJ2K = (maxPrecisionJ2K - 1) * 3 + 1

Referenced by grk::PacketParser::initSegment(), and grk::PacketParser::readHeader().

## maxPrecisionJ2K

const uint8_t grk::maxPrecisionJ2K = 38

Referenced by grk::FileFormatCompress::default_validation().

## maxTilePartSizeJ2K

const uint32_t grk::maxTilePartSizeJ2K = UINT_MAX

## maxTilePartsPerTileJ2K

const uint8_t grk::maxTilePartsPerTileJ2K = 255

Referenced by grk::CodeStreamCompress::getNumTileParts(), grk::CodeStreamCompress::getNumTilePartsForProgression(), and grk::CodeStreamCompress::writeTileParts().

## maxTotalTilePartsJ2K

const uint16_t grk::maxTotalTilePartsJ2K = 65535

Referenced by grk::CodeStreamCompress::getNumTileParts().

## MCT_ELEMENT_SIZE

const uint32_t grk::MCT_ELEMENT_SIZE[] = {2, 4, 4, 8}

Referenced by grk::CodeStreamDecompress::add_mct(), and grk::CodeStreamCompress::init_mct_encoding().

## mqc_states [1/2]

const mqc_state grk::mqc_states[47 *2]

static

Referenced by mqc_resetstates().

## mqc_states [2/2]

const mqc_state grk::mqc_states[47 *2]

static

## NB_ELTS_V8

const uint32_t grk::NB_ELTS_V8 = 8

Referenced by deinterleave_v_cols(), grk::dwt97::encode_and_deinterleave_v(), grk::dwt53::encode_and_deinterleave_v(), grk::WaveletFwdImpl::encode_procedure(), encode_v_func(), fetch_cols_vertical_pass(), grk::dwt97::grk_v8dwt_encode_step1(), and grk::dwt97::grk_v8dwt_encode_step2().

## plugin_debug_mqc_next_cxd_method_name

const char* grk::plugin_debug_mqc_next_cxd_method_name = "plugin_debug_mqc_next_cxd"

static

Referenced by nextCXD().

## plugin_debug_mqc_next_plane_method_name

const char* grk::plugin_debug_mqc_next_plane_method_name = "plugin_debug_mqc_next_plane"

static

Referenced by mqc_next_plane().

## plWriteBufferLen

const uint16_t grk::plWriteBufferLen = USHRT_MAX - 4

Referenced by grk::PLMarkerMgr::pushPL().

## scale

const double grk::scale = 256 / log(2)

Referenced by grk::GrkImage::scaleComponent(), grk::RateControl::slopeFromLog(), and grk::RateControl::slopeToLog().

## shift

const double grk::shift = 1 << 16

Referenced by grk::TileProcessor::isWholeTileDecompress(), grk::RateControl::slopeFromLog(), grk::RateControl::slopeToLog(), grk::HWY_NAMESPACE::DecompressRev::transform(), grk::HWY_NAMESPACE::DecompressIrrev::transform(), grk::HWY_NAMESPACE::CompressRev::transform(), grk::HWY_NAMESPACE::CompressIrrev::transform(), and grk::IncludeTracker::update().

## singleTileRowsPerStrip

const uint32_t grk::singleTileRowsPerStrip = 32

Referenced by grk::GrkImage::GrkImage(), and grk::GrkImage::postReadHeader().

## slopeCutoff

const double grk::slopeCutoff = pow(2, 64)

Referenced by grk::RateControl::slopeFromLog(), and grk::RateControl::slopeToLog().

## sot_marker_segment_len_minus_tile_data_len

const uint32_t grk::sot_marker_segment_len_minus_tile_data_len = 12U

Referenced by grk::TileProcessor::doCompress(), grk::SOTMarker::read(), grk::SOTMarker::read(), grk::TileProcessor::setTilePartDataLength(), and grk::CodeStreamCompress::writeTilePart().

## sot_marker_segment_min_len

const uint32_t grk::sot_marker_segment_min_len = 14U

Referenced by grk::SOTMarker::read().

## SPCod_SPCoc_len

const uint32_t grk::SPCod_SPCoc_len = 5U

Referenced by grk::CodeStreamCompress::get_SPCod_SPCoc_size(), and grk::CodeStreamDecompress::read_SPCod_SPCoc().

## tabMaxSubLevelFromMainLevel

const uint16_t grk::tabMaxSubLevelFromMainLevel[]

static

Initial value:
= {15,
1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9}

Referenced by grk::Profile::is_imf_compliant().

## tlm_marker_start_bytes

const uint32_t grk::tlm_marker_start_bytes = 6

Referenced by grk::TileLengthMarkers::read(), grk::TileLengthMarkers::writeBegin(), and grk::TileLengthMarkers::writeEnd().

## tlmMarkerBytesPerTilePart

const uint32_t grk::tlmMarkerBytesPerTilePart = 6

Referenced by grk::TileLengthMarkers::writeBegin().

## XMP_UUID

const uint8_t grk::XMP_UUID[16]

Initial value:
= {0xBE, 0x7A, 0xCF, 0xCB, 0x97, 0xA9, 0x42, 0xE8,
0x9C, 0x71, 0x99, 0x94, 0x91, 0xE3, 0xAF, 0xAC}

Referenced by grk::FileFormatCompress::init(), and grk::FileFormatDecompress::readHeader().