Grok
7.6.2
|
Copyright (C) 2016-2020 Grok Image Compression Inc. More...
Namespaces | |
t1_ht | |
t1_part1 | |
Typedefs | |
typedef bool(* | j2k_procedure) (CodeStream *codeStream) |
typedef bool(* | marker_callback) (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
typedef bool(* | jp2_procedure) (FileFormat *fileFormat) |
typedef std::vector< grk_tl_info > | TL_INFO_VEC |
typedef std::map< uint8_t, TL_INFO_VEC * > | TL_MAP |
typedef std::vector< uint32_t > | PL_INFO_VEC |
typedef std::map< uint8_t, PL_INFO_VEC * > | PL_MAP |
typedef void(* | j2k_mct_function) (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
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 uint32_t | grk_flag |
Flags for 4 consecutive rows of a column. More... | |
typedef int32_t | grk_handle |
typedef size_t(* | grk_stream_zero_copy_read_fn) (void **p_buffer, size_t nb_bytes, void *user_data) |
using | grk_pt = grk_point< uint32_t > |
using | grk_rect = grk_rectangle< int64_t > |
using | grk_rect_u32 = grk_rectangle< uint32_t > |
using | grk_buf = grk_buffer< uint8_t > |
Functions | |
static bool | j2k_read_header_procedure (CodeStream *codeStream) |
The read header procedure. More... | |
static bool | j2k_compress_validation (CodeStream *codeStream) |
The default compressing validation procedure without any extension. More... | |
static bool | j2k_decompress_validation (CodeStream *codeStream) |
The default decoding validation procedure without any extension. More... | |
static bool | j2k_mct_validation (CodeStream *codeStream) |
The mct compressing validation procedure. More... | |
static bool | j2k_update_rates (CodeStream *codeStream) |
Updates the rates of the tcp. More... | |
static bool | j2k_copy_default_tcp (CodeStream *codeStream) |
Copies the decoding tile parameters onto all the tile parameters. More... | |
static bool | j2k_decompress_tiles (CodeStream *codeStream) |
Read the tiles. More... | |
static bool | j2k_get_end_header (CodeStream *codeStream) |
Gets the offset of the header. More... | |
static bool | j2k_end_encoding (CodeStream *codeStream) |
Ends the compressing, i.e. More... | |
static bool | j2k_init_info (CodeStream *codeStream) |
Inits the Info. More... | |
static bool | j2k_check_poc_val (const grk_poc *p_pocs, uint32_t nb_pocs, uint32_t nb_resolutions, uint32_t numcomps, uint32_t numlayers) |
Checks the progression order changes values. More... | |
static uint64_t | j2k_get_num_tp (CodingParams *cp, uint32_t pino, uint16_t tileno) |
Gets the number of tile parts used for the given change of progression (if any) and the given tile. More... | |
static bool | j2k_calculate_tp (CodingParams *cp, uint16_t *p_nb_tile_parts, grk_image *image) |
Calculates the total number of tile parts needed by the compressor to compress such an image. More... | |
static bool | lupDecompose (float *matrix, uint32_t *permutations, float *p_swap_area, uint32_t nb_compo) |
LUP decomposition. More... | |
static void | lupSolve (float *pResult, float *pMatrix, float *pVector, uint32_t *pPermutations, uint32_t nb_compo, float *p_intermediate_data) |
LUP solving. More... | |
static void | lupInvert (float *pSrcMatrix, float *pDestMatrix, uint32_t nb_compo, uint32_t *pPermutations, float *p_src_temp, float *p_dest_temp, float *p_swap_area) |
LUP inversion (call with the result of lupDecompose) More... | |
static bool | matrix_inversion_f (float *pSrcMatrix, float *pDestMatrix, uint32_t n) |
Calculate a n x n double matrix inversion with a LUP method. More... | |
grk_image * | grk_image_create0 (void) |
bool | grk_image_single_component_data_alloc (grk_image_comp *image) |
Allocate data for single image component. More... | |
static void | grk_copy_image_header (const grk_image *image_src, grk_image *image_dest) |
Copy only header of image and its component header (no data are copied) if dest image have data, they will be freed. More... | |
static bool | update_image_dimensions (grk_image *image, uint32_t reduce) |
static void | transfer_image_data (grk_image *src, grk_image *dest) |
Transfer data from src to dest for each component, and null out src data. More... | |
static bool | j2k_decompress_tile (CodeStream *codeStream) |
static void | j2k_dump_MH_info (CodeStream *codeStream, FILE *out_stream) |
static void | j2k_dump_MH_index (CodeStream *codeStream, FILE *out_stream) |
static void | j2k_dump_tile_info (TileCodingParams *default_tile, uint32_t numcomps, FILE *out_stream) |
void | j2k_dump (CodeStream *codeStream, int32_t flag, FILE *out_stream) |
Dump some elements from the J2K decompression structure . More... | |
void | j2k_dump_image_header (grk_image *image, bool dev_dump_flag, FILE *out_stream) |
Dump an image header structure. More... | |
void | j2k_dump_image_comp_header (grk_image_comp *comp, bool dev_dump_flag, FILE *out_stream) |
Dump a component image header structure. More... | |
grk_codestream_info_v2 * | j2k_get_cstr_info (CodeStream *codeStream) |
Get the code stream info from a JPEG2000 codec. More... | |
grk_codestream_index * | j2k_get_cstr_index (CodeStream *codeStream) |
Get the code stream index from a JPEG2000 codec. More... | |
bool | j2k_allocate_tile_element_cstr_index (CodeStream *codeStream) |
grk_codestream_index * | j2k_create_cstr_index (void) |
void | j2k_destroy_cstr_index (grk_codestream_index *p_cstr_ind) |
Destroys a code stream index structure. More... | |
void | jp2_dump (FileFormat *fileFormat, int32_t flag, FILE *out_stream) |
Dump some elements from the JP2 decompression structure . More... | |
grk_codestream_index * | jp2_get_cstr_index (FileFormat *fileFormat) |
Get the code stream index from a JPEG2000 codec. More... | |
grk_codestream_info_v2 * | jp2_get_cstr_info (FileFormat *fileFormat) |
Get the code stream info from a JPEG2000 codec. More... | |
static void | j2k_copy_tile_component_parameters (CodeStream *codeStream) |
Copies the tile component parameters of all the component from the first tile component. More... | |
template<typename S , typename D > | |
void | j2k_write (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_int16_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_int32_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_float32_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_float64_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_int16_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_int32_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_float32_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_read_float64_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_write_float_to_int16 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_write_float_to_int32 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_write_float_to_float (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
void | j2k_write_float_to_float64 (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
bool | j2k_add_mhmarker (grk_codestream_index *cstr_index, uint32_t type, uint64_t pos, uint32_t len) |
Add main header marker information. More... | |
bool | j2k_write_soc (CodeStream *codeStream) |
Writes the SOC marker (Start Of Codestream) More... | |
bool | j2k_read_soc (CodeStream *codeStream) |
Reads a SOC marker (Start of Codestream) More... | |
bool | j2k_write_siz (CodeStream *codeStream) |
Writes the SIZ marker (image and tile size) More... | |
bool | j2k_read_cap (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a CAP marker. More... | |
bool | j2k_write_cap (CodeStream *codeStream) |
Writes the CAP marker. More... | |
bool | j2k_read_siz (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a SIZ marker (image and tile size) More... | |
bool | j2k_write_com (CodeStream *codeStream) |
Writes the COM marker (comment) More... | |
bool | j2k_read_com (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a COM marker (comments) More... | |
bool | j2k_write_cod (CodeStream *codeStream) |
Writes the COD marker (Coding style default) More... | |
bool | j2k_read_cod (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a COD marker (Coding Style defaults) More... | |
bool | j2k_write_coc (CodeStream *codeStream, uint32_t comp_no) |
bool | j2k_compare_coc (CodeStream *codeStream, uint32_t first_comp_no, uint32_t second_comp_no) |
Compares 2 COC markers (Coding style component) More... | |
bool | j2k_read_coc (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a COC marker (Coding Style Component) More... | |
bool | j2k_write_qcd (CodeStream *codeStream) |
Writes the QCD marker (quantization default) More... | |
bool | j2k_read_qcd (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a QCD marker (Quantization defaults) More... | |
bool | j2k_write_qcc (CodeStream *codeStream, uint32_t comp_no) |
bool | j2k_compare_qcc (CodeStream *codeStream, uint32_t first_comp_no, uint32_t second_comp_no) |
Compare QCC markers (quantization component) More... | |
bool | j2k_read_qcc (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a QCC marker (Quantization component) More... | |
uint16_t | getPocSize (uint32_t nb_comp, uint32_t nb_poc) |
bool | j2k_write_poc (CodeStream *codeStream) |
Writes the POC marker (Progression Order Change) More... | |
bool | j2k_read_poc (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a POC marker (Progression Order Change) More... | |
bool | j2k_read_crg (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a CRG marker (Component registration) More... | |
bool | j2k_read_plm (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a PLM marker (Packet length, main header marker) More... | |
bool | j2k_read_plt (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a PLT marker (Packet length, tile-part header) More... | |
bool | j2k_read_ppm (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a PPM marker (Packed packet headers, main header) More... | |
bool | j2k_merge_ppm (CodingParams *p_cp) |
Merges all PPM markers read (Packed headers, main header) More... | |
bool | j2k_read_ppt (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a PPT marker (Packed packet headers, tile-part header) More... | |
bool | j2k_merge_ppt (TileCodingParams *p_tcp) |
Merges all PPT markers read (Packed packet headers, tile-part header) More... | |
bool | j2k_read_sot (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Read SOT (Start of tile part) marker. More... | |
bool | j2k_write_rgn (CodeStream *codeStream, uint16_t tile_no, uint32_t comp_no, uint32_t nb_comps) |
Writes the RGN marker (Region Of Interest) More... | |
bool | j2k_write_eoc (CodeStream *codeStream) |
Writes the EOC marker (End of Codestream) More... | |
bool | j2k_read_rgn (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a RGN marker (Region Of Interest) More... | |
bool | j2k_write_mct_data_group (CodeStream *codeStream) |
Writes the CBD-MCT-MCC-MCO markers (Multi components transform) More... | |
bool | j2k_write_all_coc (CodeStream *codeStream) |
Writes COC marker for each component. More... | |
bool | j2k_write_all_qcc (CodeStream *codeStream) |
Writes QCC marker for each component. More... | |
bool | j2k_write_regions (CodeStream *codeStream) |
Writes regions of interests. More... | |
bool | j2k_write_epc (CodeStream *codeStream) |
Writes EPC ???? More... | |
bool | j2k_write_mct_record (grk_mct_data *p_mct_record, BufferedStream *stream) |
Writes the MCT marker (Multiple Component Transform) More... | |
bool | j2k_read_mct (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a MCT marker (Multiple Component Transform) More... | |
bool | j2k_write_mcc_record (grk_simple_mcc_decorrelation_data *p_mcc_record, BufferedStream *stream) |
Writes the MCC marker (Multiple Component Collection) More... | |
bool | j2k_read_mcc (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a MCC marker (Multiple Component Collection) More... | |
bool | j2k_write_mco (CodeStream *codeStream) |
Writes the MCO marker (Multiple component transformation ordering) More... | |
bool | j2k_read_mco (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a MCO marker (Multiple Component Transform Ordering) More... | |
bool | j2k_add_mct (TileCodingParams *p_tcp, grk_image *p_image, uint32_t index) |
bool | j2k_write_cbd (CodeStream *codeStream) |
Writes the CBD marker (Component bit depth definition) More... | |
bool | j2k_read_cbd (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a CBD marker (Component bit depth definition) More... | |
bool | j2k_read_tlm (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
Reads a TLM marker (Tile Length Marker) More... | |
bool | j2k_write_tlm_begin (CodeStream *codeStream) |
Begin writing the TLM marker (Tile Length Marker) More... | |
void | j2k_update_tlm (CodeStream *codeStream, uint16_t tile_index, uint32_t tile_part_size) |
Updates the Tile Length Marker. More... | |
bool | j2k_write_tlm_end (CodeStream *codeStream) |
End writing the updated tlm. More... | |
uint32_t | j2k_get_SPCod_SPCoc_size (CodeStream *codeStream, uint32_t comp_no) |
Gets the size taken by writing a SPCod or SPCoc for the given tile and component. More... | |
bool | j2k_compare_SPCod_SPCoc (CodeStream *codeStream, uint32_t first_comp_no, uint32_t second_comp_no) |
Compare 2 a SPCod/ SPCoc elements, i.e. More... | |
bool | j2k_write_SPCod_SPCoc (CodeStream *codeStream, uint32_t comp_no) |
Writes a SPCod or SPCoc element, i.e. More... | |
bool | j2k_read_SPCod_SPCoc (CodeStream *codeStream, uint32_t compno, uint8_t *p_header_data, uint16_t *header_size) |
Reads a SPCod or SPCoc element, i.e. More... | |
uint32_t | j2k_get_SQcd_SQcc_size (CodeStream *codeStream, uint32_t comp_no) |
Gets the size taken by writing SQcd or SQcc element, i.e. More... | |
bool | j2k_compare_SQcd_SQcc (CodeStream *codeStream, uint32_t first_comp_no, uint32_t second_comp_no) |
Compares 2 SQcd or SQcc element, i.e. More... | |
bool | j2k_write_SQcd_SQcc (CodeStream *codeStream, uint32_t comp_no) |
Writes a SQcd or SQcc element, i.e. More... | |
bool | j2k_read_SQcd_SQcc (CodeStream *codeStream, bool fromQCC, uint32_t compno, uint8_t *p_header_data, uint16_t *header_size) |
Reads a SQcd or SQcc element, i.e. More... | |
bool | j2k_write_coc (CodeStream *codeStream, uint32_t comp_no, BufferedStream *stream) |
Writes the COC marker (Coding style component) More... | |
bool | j2k_write_qcc (CodeStream *codeStream, uint16_t tile_index, uint32_t comp_no, BufferedStream *stream) |
Writes the QCC marker (quantization component) More... | |
static void | grk_update_image_comp_header_from_coding_params (grk_image *image_header, const CodingParams *p_cp) |
Updates the components characteristics of the image from the coding parameters. More... | |
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, grk_tile *p_tile) |
void | compress_synch_with_plugin (TileProcessor *tcd, uint32_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. More... | |
void | mqc_raw_init_dec (mqcoder *mqc, uint8_t *bp, uint32_t len) |
Initialize the decoder for RAW decoding. More... | |
void | mqc_finish_dec (mqcoder *mqc) |
Terminate RAW/MQC decoding. More... | |
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) |
static void | prepareBlockForFirstLayer (CompressCodeblock *cblk) |
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. More... | |
uint32_t | max_resolution (Resolution *GRK_RESTRICT r, uint32_t i) |
static void | decompress_h_cas0_53 (int32_t *buf, int32_t *bandL, const uint32_t wL, int32_t *bandH, const uint32_t wH, int32_t *dest) |
static void | decompress_h_cas1_53 (int32_t *buf, int32_t *bandL, const uint32_t wL, int32_t *bandH, const uint32_t wH, int32_t *dest) |
static void | decompress_v_cas0_53 (int32_t *buf, int32_t *bandL, const uint32_t hL, const uint32_t strideL, int32_t *bandH, const uint32_t hH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on even coordinate. More... | |
static void | decompress_v_cas1_53 (int32_t *buf, int32_t *bandL, const uint32_t hL, const uint32_t strideL, int32_t *bandH, const uint32_t hH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on odd coordinate. More... | |
static void | decompress_h_53 (const dwt_data< int32_t > *dwt, int32_t *bandL, int32_t *bandH, int32_t *dest) |
static void | decompress_v_53 (const dwt_data< int32_t > *dwt, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest, uint32_t nb_cols) |
static void | decompress_h_strip_53 (const dwt_data< int32_t > *horiz, uint32_t hMin, uint32_t hMax, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
static bool | decompress_h_mt_53 (uint32_t num_threads, size_t data_size, dwt_data< int32_t > &horiz, dwt_data< int32_t > &vert, uint32_t rh, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
static void | decompress_v_strip_53 (const dwt_data< int32_t > *vert, uint32_t wMin, uint32_t wMax, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
static bool | decompress_v_mt_53 (uint32_t num_threads, size_t data_size, dwt_data< int32_t > &horiz, dwt_data< int32_t > &vert, uint32_t rw, int32_t *bandL, const uint32_t strideL, int32_t *bandH, const uint32_t strideH, int32_t *dest, const uint32_t strideDest) |
static bool | decompress_tile_53 (TileComponent *tilec, uint32_t numres) |
static Decompress97 | makeDecompress97 (dwt_data< vec4f > *dwt, bool low) |
static void | decompress_step1_97 (vec4f *data, uint32_t end, const float c) |
static void | decompress_step2_97 (Decompress97 d, float c) |
static void | decompress_step_97 (dwt_data< vec4f > *GRK_RESTRICT dwt) |
static void | interleave_h_97 (dwt_data< vec4f > *GRK_RESTRICT dwt, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, uint32_t remaining_height) |
static void | decompress_h_strip_97 (dwt_data< vec4f > *GRK_RESTRICT horiz, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *dest, const size_t strideDest) |
static bool | decompress_h_mt_97 (uint32_t num_threads, size_t data_size, dwt_data< vec4f > &GRK_RESTRICT horiz, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest) |
static void | interleave_v_97 (dwt_data< vec4f > *GRK_RESTRICT dwt, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, uint32_t nb_elts_read) |
static void | decompress_v_strip_97 (dwt_data< vec4f > *GRK_RESTRICT vert, const uint32_t rw, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest) |
static bool | decompress_v_mt_97 (uint32_t num_threads, size_t data_size, dwt_data< vec4f > &GRK_RESTRICT vert, const uint32_t rw, const uint32_t rh, float *GRK_RESTRICT bandL, const uint32_t strideL, float *GRK_RESTRICT bandH, const uint32_t strideH, float *GRK_RESTRICT dest, const uint32_t strideDest) |
static bool | decompress_tile_97 (TileComponent *GRK_RESTRICT tilec, uint32_t numres) |
template<typename T , uint32_t FILTER_WIDTH, typename D > | |
bool | decompress_partial_tile (TileComponent *GRK_RESTRICT tilec, grk_rect_u32 bounds, uint32_t numres, ISparseBuffer *sa) |
template<class T > | |
constexpr T | getFilterWidth (bool lossless) |
template<class T > | |
constexpr T | getHorizontalPassHeight (bool lossless) |
int32_t | getValue (uint32_t i) |
bool | init_tilec (TileComponent *tilec, uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint32_t numresolutions, grk_image *output_image) |
void | usage (void) |
template<typename TYPE > | |
void | grk_write (uint8_t *p_buffer, TYPE value, uint32_t nb_bytes) |
template<typename TYPE > | |
void | grk_read (const uint8_t *p_buffer, TYPE *value, uint32_t nb_bytes) |
template<typename TYPE > | |
void | grk_write (uint8_t *p_buffer, TYPE value) |
template<typename TYPE > | |
void | grk_read (const uint8_t *p_buffer, TYPE *value) |
template<typename T > | |
uint32_t | ceildiv (T a, T b) |
Divide an integer by another integer and round upwards. More... | |
template<typename T > | |
T | ceildivpow2 (T a, uint32_t b) |
static uint32_t | uint64_ceildivpow2 (uint64_t a, uint32_t b) |
Divide a 64-bit integer by a power of 2 and round upwards. More... | |
static uint32_t | uint_floordivpow2 (uint32_t a, uint32_t b) |
Divide an unsigned integer by a power of 2 and round downwards. More... | |
template<typename T > | |
T | floorlog2 (uint32_t a) |
Get logarithm of an integer and round downwards. More... | |
static int32_t | int_fix_mul (int32_t a, int32_t b) |
Multiply two fixed-point numbers. More... | |
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,...) |
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. More... | |
void * | grk_calloc (size_t numOfElements, size_t sizeOfElements) |
Allocate a memory block with elements initialized to 0. More... | |
void * | grk_aligned_malloc (size_t size) |
Allocate memory aligned to a 16 byte boundary. More... | |
void | grk_aligned_free (void *ptr) |
void * | grk_realloc (void *m, size_t s) |
Reallocate memory blocks. More... | |
void | grk_free (void *m) |
Deallocates or frees a memory block. More... | |
static void | free_mem (void *user_data) |
static size_t | zero_copy_read_from_mem (void **p_buffer, size_t nb_bytes, MemStream *p_source_buffer) |
static size_t | read_from_mem (void *p_buffer, size_t nb_bytes, MemStream *p_source_buffer) |
static size_t | write_to_mem (void *dest, size_t nb_bytes, MemStream *src) |
static bool | seek_from_mem (uint64_t nb_bytes, MemStream *src) |
static void | grk_stream_set_zero_copy_read_function (grk_stream *stream, grk_stream_zero_copy_read_fn p_function) |
Set the given function to be used as a zero copy read function. More... | |
void | set_up_mem_stream (grk_stream *l_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) |
bool | mult_will_overflow (uint32_t a, uint32_t b) |
bool | mult64_will_overflow (uint64_t a, uint64_t b) |
template<typename T > | |
T | clip (int64_t val) |
template<typename T > | |
T | sat_add (int64_t lhs, int64_t rhs) |
template<typename T > | |
T | sat_add (T lhs, T rhs) |
template<typename T > | |
T | sat_sub (T lhs, T rhs) |
template<typename T > | |
T | sat_sub (int64_t lhs, int64_t rhs) |
Exported functions | |
bool | j2k_init_mct_encoding (TileCodingParams *p_tcp, grk_image *p_image) |
char * | j2k_convert_progression_order (GRK_PROG_ORDER prg_order) |
Converts an enum type progression order to string type. More... | |
bool | j2k_decompress_tile (CodeStream *codeStream, grk_image *p_image, uint16_t tile_index) |
Variables | |
static j2k_prog_order | j2k_prog_order_list [] |
static const j2k_mct_function | j2k_mct_write_functions_from_float [] |
const uint32_t | sot_marker_segment_len = 12U |
const uint32_t | grk_marker_length = 4U |
const uint32_t | SPCod_SPCoc_len = 5U |
const uint32_t | cod_coc_len = 5U |
const uint32_t | tlm_len_per_tile_part = 5 |
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 uint32_t | max_precision_jpeg_2000 = 38 |
const uint32_t | max_num_components = 16384 |
const uint32_t | max_passes_per_segment = (max_precision_jpeg_2000-1) * 3 +1 |
const uint32_t | max_num_tiles = 65535 |
const uint32_t | max_num_tile_parts_per_tile = 255 |
const uint32_t | max_num_tile_parts = 65535 |
const uint32_t | max_tile_part_size = UINT_MAX |
const uint32_t | max_supported_precision = 16 |
const uint32_t | default_numbers_segments = 10 |
const uint32_t | default_header_size = 1000 |
const uint32_t | default_number_mcc_records = 10 |
const uint32_t | default_number_mct_records = 10 |
const uint8_t | IPTC_UUID [16] |
const uint8_t | XMP_UUID [16] |
const uint32_t | tlm_marker_start_bytes = 6 |
const uint32_t | available_packet_len_bytes_per_plt = USHRT_MAX - 1 - 4 |
const uint32_t | min_packets_per_full_plt = available_packet_len_bytes_per_plt / 5 |
static const j2k_mct_function | j2k_mct_read_functions_to_float [] |
static const j2k_mct_function | j2k_mct_read_functions_to_int32 [] |
const uint32_t | MCT_ELEMENT_SIZE [] = { 2, 4, 4, 8 } |
static const uint16_t | tabMaxSubLevelFromMainLevel [] |
const uint32_t | tag_tree_uninitialized_node_value = 999 |
minpf_plugin_manager * | managerInstance |
static const char * | plugin_debug_mqc_next_cxd_method_name |
static const char * | plugin_debug_mqc_next_plane_method_name |
static const double | mct_norms_rev [3] = { 1.732, .8292, .8292 } |
static const double | mct_norms_irrev [3] = { 1.732, 1.805, 1.573 } |
const uint32_t | A_MIN = 0x8000 |
static const mqc_state | mqc_states [47 *2] |
static const mqc_state | mqc_states [47 *2] |
const uint32_t | k_max_bit_planes = 31-T1_NMSEDEC_FRACBITS |
const uint32_t | BAND_RES_ZERO_INDEX_LL = 0 |
const double | slopeCutoff = pow(2, 64) |
const double | scale = 256 / log(2) |
const double | invScale = log(2) / 256 |
const double | shift = 1 << 16 |
static const float | dwt_alpha = 1.586134342f |
static const float | dwt_beta = 0.052980118f |
static const float | dwt_gamma = -0.882911075f |
static const float | dwt_delta = -0.443506852f |
static const float | K = 1.230174105f |
static const float | c13318 = 1.625732422f |
const uint32_t | grk_alignment = 32 |
const size_t | default_align = 64 |
Local static functions | |
static const grk_jp2_header_handler | jp2_header [] |
static const grk_jp2_header_handler | jp2_img_header [] |
static bool | jp2_read_ihdr (FileFormat *fileFormat, uint8_t *p_image_header_data, uint32_t image_header_size) |
Reads a IHDR box - Image Header box. More... | |
static uint8_t * | jp2_write_ihdr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Writes the Image Header box - Image Header box. More... | |
static bool | jp2_read_xml (FileFormat *fileFormat, uint8_t *p_xml_data, uint32_t xml_size) |
Read XML box. More... | |
static uint8_t * | jp2_write_xml (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Write XML box. More... | |
static uint8_t * | jp2_write_buffer (uint32_t boxId, grk_jp2_buffer *buffer, uint32_t *p_nb_bytes_written) |
Write buffer box. More... | |
static bool | jp2_read_uuid (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_data_size) |
Read a UUID box. More... | |
static bool | jp2_read_res (FileFormat *fileFormat, uint8_t *p_resolution_data, uint32_t resolution_size) |
Reads a Resolution box. More... | |
static uint8_t * | jp2_write_res (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Writes the Resolution box. More... | |
static uint8_t * | jp2_write_bpc (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Writes the Bit per Component box. More... | |
static bool | jp2_read_bpc (FileFormat *fileFormat, uint8_t *p_bpc_header_data, uint32_t bpc_header_size) |
Reads a Bit per Component box. More... | |
static bool | jp2_read_channel_definition (FileFormat *fileFormat, uint8_t *p_cdef_header_data, uint32_t cdef_header_size) |
static void | jp2_apply_channel_definition (grk_image *image, grk_jp2_color *color) |
static uint8_t * | jp2_write_channel_definition (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Writes the Channel Definition box. More... | |
static uint8_t * | jp2_write_colr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
Writes the Colour Specification box. More... | |
static bool | jp2_write_ftyp (FileFormat *fileFormat) |
Writes a FTYP box - File type box. More... | |
static bool | jp2_read_ftyp (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size) |
Reads a a FTYP box - File type box. More... | |
static bool | jp2_skip_jp2c (FileFormat *fileFormat) |
static bool | jp2_read_jp2h (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size) |
Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). More... | |
static bool | jp2_write_uuids (FileFormat *fileFormat) |
static bool | jp2_write_jp2c (FileFormat *fileFormat) |
Writes the Jpeg2000 code stream Header box - JP2C Header box. More... | |
static bool | jp2_read_jp (FileFormat *fileFormat, uint8_t *p_header_data, uint32_t header_size) |
Reads a JPEG 2000 file signature box. More... | |
static bool | jp2_write_jp (FileFormat *fileFormat) |
Writes a JPEG 2000 file signature box. More... | |
static bool | jp2_apply_palette_clr (grk_image *image, grk_jp2_color *color) |
Apply collected palette data. More... | |
static void | jp2_free_palette_clr (grk_jp2_color *color) |
static uint8_t * | jp2_write_palette_clr (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
static uint8_t * | jp2_write_component_mapping (FileFormat *fileFormat, uint32_t *p_nb_bytes_written) |
static bool | jp2_read_palette_clr (FileFormat *fileFormat, uint8_t *p_pclr_header_data, uint32_t pclr_header_size) |
Collect palette data. More... | |
static bool | jp2_read_component_mapping (FileFormat *fileFormat, uint8_t *component_mapping_header_data, uint32_t component_mapping_header_size) |
Collect component mapping data. More... | |
static bool | jp2_read_colr (FileFormat *fileFormat, uint8_t *p_colr_header_data, uint32_t colr_header_size) |
Reads the Color Specification box. More... | |
static bool | jp2_init_end_header_writing (FileFormat *fileFormat) |
Sets up the procedures to do on writing header after the code stream. More... | |
static bool | jp2_init_end_header_reading (FileFormat *fileFormat) |
Sets up the procedures to do on reading header after the code stream. More... | |
static bool | jp2_read_header_procedure (FileFormat *fileFormat) |
Reads a JPEG 2000 file header structure. More... | |
static bool | jp2_exec (FileFormat *fileFormat, std::vector< jp2_procedure > *procs) |
Executes the given procedures on the given codec. More... | |
static bool | jp2_read_box_hdr (grk_jp2_box *box, uint32_t *p_number_bytes_read, BufferedStream *stream) |
Reads a box header. More... | |
static bool | jp2_init_compress_validation (FileFormat *fileFormat) |
Sets up the validation ,i.e. More... | |
static bool | jp2_init_header_writing (FileFormat *fileFormat) |
Sets up the procedures to do on writing header. More... | |
static bool | jp2_default_validation (FileFormat *fileFormat) |
static const grk_jp2_header_handler * | jp2_img_find_handler (uint32_t id) |
Finds the image execution function related to the given box id. More... | |
static const grk_jp2_header_handler * | jp2_find_handler (uint32_t id) |
Finds the execution function related to the given box id. More... | |
static bool | jp2_read_box (grk_jp2_box *box, uint8_t *p_data, uint32_t *p_number_bytes_read, uint64_t p_box_max_size) |
Reads a box header. More... | |
static bool | jp2_init_decompress_validation (FileFormat *fileFormat) |
Sets up the validation ,i.e. More... | |
static bool | jp2_init_header_reading (FileFormat *fileFormat) |
Sets up the procedures to do on reading header. More... | |
double | calc_res (uint16_t num, uint16_t den, uint8_t exponent) |
static bool | jp2_read_res_box (uint32_t *id, uint32_t *num, uint32_t *den, uint32_t *exponent, uint8_t **p_resolution_data) |
void | find_cf (double x, uint32_t *num, uint32_t *den) |
static void | jp2_write_res_box (double resx, double resy, uint32_t box_id, uint8_t **current_res_ptr) |
static bool | jp2_check_color (grk_image *image, grk_jp2_color *color) |
static bool | jp2_write_jp2h (FileFormat *fileFormat) |
static bool | pi_next_lrcp (PacketIter *pi) |
Get next packet in layer-resolution-component-precinct order. More... | |
static bool | pi_next_rlcp (PacketIter *pi) |
Get next packet in resolution-layer-component-precinct order. More... | |
static bool | pi_next_rpcl (PacketIter *pi) |
Get next packet in resolution-precinct-component-layer order. More... | |
static bool | pi_next_pcrl (PacketIter *pi) |
Get next packet in precinct-component-resolution-layer order. More... | |
static bool | pi_next_cprl (PacketIter *pi) |
Get next packet in component-precinct-resolution-layer order. More... | |
static void | pi_update_encode_poc_and_final (CodingParams *p_cp, uint16_t tileno, uint32_t tx0, uint32_t tx1, uint32_t ty0, uint32_t ty1, uint64_t max_precincts, uint32_t dx_min, uint32_t dy_min) |
Updates the coding parameters if the compressing is used with Progression order changes and final (or cinema parameters are used). More... | |
static void | pi_update_encode_no_poc (CodingParams *p_cp, uint16_t num_comps, uint16_t tileno, uint32_t tx0, uint32_t tx1, uint32_t ty0, uint32_t ty1, uint64_t max_precincts, uint8_t max_res, uint32_t dx_min, uint32_t dy_min) |
Updates the coding parameters if the compressing is not used with Progression order changes and final (and cinema parameters are used). More... | |
static void | grk_get_encoding_parameters (const grk_image *p_image, const CodingParams *p_cp, uint16_t tileno, uint32_t *tx0, uint32_t *tx1, uint32_t *ty0, uint32_t *ty1, uint32_t *dx_min, uint32_t *dy_min, uint64_t *max_precincts, uint8_t *max_res) |
Gets the compressing parameters needed to update the coding parameters and all the pocs. More... | |
static void | grk_get_all_encoding_parameters (const grk_image *p_image, const CodingParams *p_cp, uint16_t tileno, uint32_t *tx0, uint32_t *tx1, uint32_t *ty0, uint32_t *ty1, uint32_t *dx_min, uint32_t *dy_min, uint64_t *max_precincts, uint8_t *max_res, uint32_t **p_resolutions) |
Gets the compressing parameters needed to update the coding parameters and all the pocs. More... | |
static PacketIter * | pi_create (const grk_image *p_image, const CodingParams *p_cp, uint16_t tileno, std::vector< uint8_t * > *include) |
Allocates memory for a packet iterator. More... | |
static void | pi_update_decode_no_poc (PacketIter *p_pi, TileCodingParams *p_tcp, uint64_t max_precincts, uint8_t max_res) |
Update decompress packet iterator with no POC. More... | |
static void | pi_update_decode_poc (PacketIter *p_pi, TileCodingParams *p_tcp, uint64_t max_precincts) |
Upgrade decompress packet iterator with POC. More... | |
static bool | pi_check_next_level (int32_t pos, CodingParams *cp, uint16_t tileno, uint32_t pino, const char *prog) |
Check packet iterator's nexxt level. More... | |
static void | update_pi_dxy (PacketIter *pi) |
static void | update_pi_dxy_for_comp (PacketIter *pi, grk_pi_comp *comp) |
static uint8_t | pi_next_l (PacketIter *pi) |
PacketIter * | pi_create_decompress (grk_image *image, CodingParams *cp, uint16_t tileno, std::vector< uint8_t * > *include) |
Create a packet iterator for Decoder. More... | |
PacketIter * | pi_create_compress (const grk_image *image, CodingParams *cp, uint16_t tileno, J2K_T2_MODE t2_mode, std::vector< uint8_t * > *include) |
Creates a packet iterator for compressing. More... | |
void | pi_enable_tile_part_generation (PacketIter *pi, CodingParams *cp, uint16_t tileno, uint32_t pino, bool first_poc_tile_part, uint32_t tppos, J2K_T2_MODE t2_mode) |
Modify the packet iterator for enabling tile part generation. More... | |
void | pi_destroy (PacketIter *p_pi) |
Destroys a packet iterator array. More... | |
void | pi_update_encoding_parameters (const grk_image *p_image, CodingParams *p_cp, uint16_t tile_no) |
Updates the compressing parameters of the codec. More... | |
bool | pi_next (PacketIter *pi) |
Modify the packet iterator to point to the next packet. More... | |
Copyright (C) 2016-2020 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/.
using grk::grk_buf = typedef grk_buffer<uint8_t> |
typedef uint32_t grk::grk_flag |
Flags for 4 consecutive rows of a column.
typedef int32_t grk::grk_handle |
using grk::grk_pt = typedef grk_point<uint32_t> |
typedef grk_rectangle< int64_t > grk::grk_rect |
typedef grk_rectangle< uint32_t > grk::grk_rect_u32 |
typedef size_t(* grk::grk_stream_zero_copy_read_fn) (void **p_buffer, size_t nb_bytes, void *user_data) |
typedef void(* grk::j2k_mct_function) (const void *p_src_data, void *p_dest_data, uint64_t nb_elem) |
typedef bool(* grk::j2k_procedure) (CodeStream *codeStream) |
typedef bool(* grk::jp2_procedure) (FileFormat *fileFormat) |
typedef bool(* grk::marker_callback) (CodeStream *codeStream, uint8_t *p_header_data, uint16_t header_size) |
typedef void*(* grk::minpf_create_func) (minpf_object_params *) |
typedef int32_t(* grk::minpf_destroy_func) (void *) |
typedef int32_t(* grk::minpf_exit_func) () |
typedef int32_t(* grk::minpf_invoke_service_func) (const char *serviceName, void *serviceParams) |
typedef struct grk::minpf_object_params grk::minpf_object_params |
typedef struct grk::minpf_platform_services grk::minpf_platform_services |
typedef struct grk::minpf_plugin_api_version grk::minpf_plugin_api_version |
typedef struct grk::minpf_plugin_manager grk::minpf_plugin_manager |
typedef minpf_exit_func(* grk::minpf_post_load_func) (const char *pluginPath, const minpf_platform_services *) |
typedef int32_t(* grk::minpf_register_func) (const char *nodeType, const minpf_register_params *params) |
typedef struct grk::minpf_register_params grk::minpf_register_params |
typedef std::vector<uint32_t> grk::PL_INFO_VEC |
typedef std::map<uint8_t, PL_INFO_VEC*> grk::PL_MAP |
typedef int32_t(* grk::PLUGIN_BATCH_DECODE) (void) |
typedef int32_t(* grk::PLUGIN_BATCH_ENCODE) (const char *input_dir, const char *output_dir, grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK userCallback) |
typedef void(* grk::PLUGIN_DEBUG_MQC_NEXT_CXD) (grk_plugin_debug_mqc *mqc, uint32_t d) |
typedef void(* grk::PLUGIN_DEBUG_MQC_NEXT_PLANE) (grk_plugin_debug_mqc *mqc) |
typedef int32_t(* grk::PLUGIN_DECODE) (grk_decompress_parameters *decoding_parameters, PLUGIN_DECODE_USER_CALLBACK userCallback) |
typedef int32_t(* grk::PLUGIN_DECODE_USER_CALLBACK) (PluginDecodeCallbackInfo *info) |
typedef int32_t(* grk::PLUGIN_ENCODE) (grk_cparameters *encoding_parameters, PLUGIN_ENCODE_USER_CALLBACK callback) |
typedef void(* grk::PLUGIN_ENCODE_USER_CALLBACK) (plugin_encode_user_callback_info *info) |
typedef uint32_t(* grk::PLUGIN_GET_DEBUG_STATE) (void) |
typedef bool(* grk::PLUGIN_INIT) (grk_plugin_init_info initInfo) |
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) |
typedef bool(* grk::PLUGIN_IS_BATCH_COMPLETE) (void) |
typedef void(* grk::PLUGIN_STOP_BATCH_DECODE) (void) |
typedef void(* grk::PLUGIN_STOP_BATCH_ENCODE) (void) |
typedef std::vector<grk_tl_info> grk::TL_INFO_VEC |
typedef std::map<uint8_t, TL_INFO_VEC*> grk::TL_MAP |
enum grk::eBandIndex |
enum grk::J2K_STATUS |
Status of decoding process when decoding main header.
These values may be combined with the | operator.
enum grk::J2K_T2_MODE |
enum grk::JP2_IMG_STATE |
enum grk::JP2_STATE |
double grk::calc_res | ( | uint16_t | num, |
uint16_t | den, | ||
uint8_t | exponent | ||
) |
Referenced by jp2_read_res().
uint32_t grk::ceildiv | ( | T | a, |
T | b | ||
) |
Divide an integer by another integer and round upwards.
a | integer of type T |
b | integer of type T |
T grk::ceildivpow2 | ( | T | a, |
uint32_t | b | ||
) |
Referenced by grk::grk_rectangle< uint32_t >::rectceildivpow2().
T grk::clip | ( | int64_t | val | ) |
|
static |
Referenced by mem_map_free().
void grk::compress_synch_with_plugin | ( | TileProcessor * | tcd, |
uint32_t | compno, | ||
uint32_t | resno, | ||
uint32_t | bandIndex, | ||
uint64_t | precinctIndex, | ||
uint64_t | cblkno, | ||
Subband * | band, | ||
CompressCodeblock * | cblk, | ||
uint32_t * | numPix | ||
) |
References grk::grk_rectangle< T >::area(), _grk_plugin_resolution::band, _grk_plugin_precinct::blocks, grk::Codeblock::compressedStream, grk::TileProcessor::current_plugin_tile, GRK_ERROR(), grk_plugin_get_debug_state(), GRK_PLUGIN_STATE_DEBUG, GRK_WARN(), grk::grk_buffer< T >::len, grk::TileProcessor::needs_rate_control(), grk::Codeblock::numbps, grk::CompressCodeblock::numPassesTotal, grk::grk_buffer< T >::owns_data, grk::CompressCodeblock::paddedCompressedStream, grk::CompressCodeblock::passes, _grk_plugin_band::precincts, grk_plugin_tile_component::resolutions, grk::Subband::stepsize, _grk_plugin_tile::tileComponents, grk::grk_rectangle< T >::x0, grk::grk_rectangle< T >::x1, grk::grk_rectangle< T >::y0, and grk::grk_rectangle< T >::y1.
Referenced by grk::TileProcessor::pcrd_bisect_feasible(), and grk::TileProcessor::pcrd_bisect_simple().
grk_stream * grk::create_mapped_file_read_stream | ( | const char * | fname | ) |
References GRK_ERROR(), grk_map(), grk_stream_set_user_data(), mem_map_free(), open_fd(), set_up_mem_stream(), and size_proc().
Referenced by grk_stream_create_mapped_file_stream().
grk_stream * grk::create_mapped_file_write_stream | ( | const char * | fname | ) |
References GRK_ERROR(), grk_map(), grk_stream_set_user_data(), mem_map_free(), open_fd(), and set_up_mem_stream().
Referenced by grk_stream_create_mapped_file_stream().
grk_stream * grk::create_mem_stream | ( | uint8_t * | buf, |
size_t | len, | ||
bool | ownsBuffer, | ||
bool | is_read_stream | ||
) |
References free_mem(), grk_stream_set_user_data(), and set_up_mem_stream().
Referenced by grk_stream_create_mem_stream().
|
static |
References grk::dwt_data< T >::cas, decompress_h_cas0_53(), decompress_h_cas1_53(), grk::dwt_data< T >::dn, grk::dwt_data< T >::mem, and grk::dwt_data< T >::sn.
Referenced by decompress_h_strip_53().
|
static |
Referenced by decompress_h_53().
|
static |
Referenced by decompress_h_53().
|
static |
References grk::dwt_data< T >::alloc(), decompress_h_strip_53(), ThreadPool::get(), GRK_ERROR(), and grk::dwt_data< T >::mem.
Referenced by decompress_tile_53().
|
static |
References decompress_h_strip_97(), ThreadPool::get(), and GRK_ERROR().
Referenced by decompress_tile_97().
|
static |
References decompress_h_53().
Referenced by decompress_h_mt_53().
|
static |
References decompress_step_97(), grk::dwt_data< T >::dn, grk::vec4f::f, interleave_h_97(), grk::dwt_data< T >::mem, and grk::dwt_data< T >::sn.
Referenced by decompress_h_mt_97().
bool grk::decompress_partial_tile | ( | TileComponent *GRK_RESTRICT | tilec, |
grk_rect_u32 | bounds, | ||
uint32_t | numres, | ||
ISparseBuffer * | sa | ||
) |
5/3 operates on elements of type int32_t while 9/7 operates on elements of type vec4f
Horizontal pass
Each thread processes a strip running the length of the window, of the following dimensions:
5/3 Height : 1
9/7 Height : 4
Vertical pass
5/3 Width : 4
9/7 Height : 1
FILTER_WIDTH value matches the maximum left/right extension given in tables F.2 and F.3 of the standard
References grk::ISparseBuffer::alloc(), grk::dwt_data< T >::alloc(), BAND_INDEX_HL, BAND_INDEX_LH, BAND_NUM_ORIENTATIONS, BAND_ORIENT_HH, BAND_ORIENT_HL, BAND_ORIENT_LH, BAND_ORIENT_LL, grk::dwt_data< T >::cas, D, grk::dwt_data< T >::dn, ThreadPool::get(), GRK_ERROR(), GRK_UNUSED, grk::grk_rectangle< T >::height(), grk::dwt_data< T >::length, max_resolution(), grk::dwt_data< T >::mem, ThreadPool::num_threads(), grk::grk_rectangle< T >::pan(), grk::ISparseBuffer::read(), grk::grk_rectangle< T >::rectceildivpow2(), grk::dwt_data< T >::release(), grk::dwt_data< T >::sn, SPLIT_H, SPLIT_L, SPLIT_NUM_ORIENTATIONS, grk::dwt_data< T >::win_h_0, grk::dwt_data< T >::win_h_1, grk::dwt_data< T >::win_l_0, grk::dwt_data< T >::win_l_1, grk::ISparseBuffer::write(), grk::grk_rectangle< T >::x0, grk::grk_rectangle< T >::x1, grk::grk_rectangle< T >::y0, and grk::grk_rectangle< T >::y1.
Referenced by grk::WaveletReverse::decompress_53(), and grk::WaveletReverse::decompress_97().
|
static |
References GRK_RESTRICT.
Referenced by decompress_step_97().
|
static |
References grk::Decompress97::absoluteStart, grk::Decompress97::boundaryData, grk::Decompress97::data, grk::Decompress97::len, and grk::Decompress97::lenMax.
Referenced by decompress_step_97().
|
static |
References c13318, grk::dwt_data< T >::cas, decompress_step1_97(), decompress_step2_97(), grk::dwt_data< T >::dn, dwt_alpha, dwt_beta, dwt_delta, dwt_gamma, K, makeDecompress97(), grk::dwt_data< T >::mem, grk::dwt_data< T >::sn, grk::dwt_data< T >::win_h_0, grk::dwt_data< T >::win_h_1, grk::dwt_data< T >::win_l_0, and grk::dwt_data< T >::win_l_1.
Referenced by grk::Partial97< T >::decompress_h(), decompress_h_strip_97(), grk::Partial97< T >::decompress_v(), and decompress_v_strip_97().
void grk::decompress_synch_plugin_with_host | ( | TileProcessor * | tcd | ) |
!!! plugin still uses stepsize/2
References BIBO_EXTRA_BITS, _grk_image::comps, grk::grk_tile::comps, grk::TileProcessor::current_plugin_tile, GRK_INFO(), grk::TileProcessor::image, _grk_image_comp::prec, grk::TileProcessor::tile, and _grk_plugin_tile::tileComponents.
Referenced by grk::TileProcessor::decompress_tile_t2().
|
static |
References BAND_ORIENT_HH, BAND_ORIENT_HL, BAND_ORIENT_LH, grk::dwt_data< T >::cas, decompress_h_mt_53(), decompress_v_mt_53(), grk::dwt_data< T >::dn, ThreadPool::get(), grk::TileComponent::getBuffer(), grk::TileComponentWindowBuffer< T >::getSplitWindow(), grk::TileComponentWindowBuffer< T >::getWindow(), GRK_ERROR(), max_resolution(), ThreadPool::num_threads(), PLL_COLS_53, grk::dwt_data< T >::release(), grk::TileComponent::resolutions, SIZE_MAX, grk::dwt_data< T >::sn, SPLIT_H, SPLIT_L, and grk::grk_rectangle< T >::width().
Referenced by grk::WaveletReverse::decompress_53().
|
static |
References grk::dwt_data< T >::alloc(), BAND_ORIENT_HH, BAND_ORIENT_HL, BAND_ORIENT_LH, grk::dwt_data< T >::cas, decompress_h_mt_97(), decompress_v_mt_97(), grk::dwt_data< T >::dn, ThreadPool::get(), GRK_ERROR(), max_resolution(), grk::dwt_data< T >::mem, ThreadPool::num_threads(), grk::dwt_data< T >::release(), grk::dwt_data< T >::sn, SPLIT_H, SPLIT_L, grk::dwt_data< T >::win_h_0, grk::dwt_data< T >::win_h_1, grk::dwt_data< T >::win_l_0, and grk::dwt_data< T >::win_l_1.
Referenced by grk::WaveletReverse::decompress_97().
|
static |
|
static |
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on even coordinate.
Referenced by decompress_v_53().
|
static |
Vertical inverse 5x3 wavelet transform for one column, when top-most pixel is on odd coordinate.
Referenced by decompress_v_53().
|
static |
References grk::dwt_data< T >::alloc(), decompress_v_strip_53(), ThreadPool::get(), GRK_ERROR(), and grk::dwt_data< T >::mem.
Referenced by decompress_tile_53().
|
static |
References decompress_v_strip_97(), ThreadPool::get(), and GRK_ERROR().
Referenced by decompress_tile_97().
|
static |
References decompress_v_53(), and PLL_COLS_53.
Referenced by decompress_v_mt_53().
|
static |
References decompress_step_97(), interleave_v_97(), and grk::dwt_data< T >::mem.
Referenced by decompress_v_mt_97().
void grk::find_cf | ( | double | x, |
uint32_t * | num, | ||
uint32_t * | den | ||
) |
References MAX.
Referenced by jp2_write_res_box().
T grk::floorlog2 | ( | uint32_t | a | ) |
Get logarithm of an integer and round downwards.
a | 32 bit integer |
|
static |
Referenced by create_mem_stream().
|
static |
Referenced by open_fd().
|
static |
Referenced by minpf_load_from_dir().
size_t grk::get_mem_stream_offset | ( | grk_stream * | stream | ) |
Referenced by grk_stream_get_write_mem_stream_length().
|
static |
References T1_CTXNO_MAG, T1_MU_0, and T1_SIGMA_NEIGHBOURS.
|
static |
References lut_ctxno_sc.
Referenced by grk::T1::enc_clnpass().
References grk::mqcoder::lut_ctxno_zc_orient, and T1_SIGMA_NEIGHBOURS.
Referenced by grk::T1::enc_clnpass().
|
static |
References 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().
|
constexpr |
|
constexpr |
|
static |
References lut_nmsedec_ref, lut_nmsedec_ref0, and T1_NMSEDEC_BITS.
|
static |
References lut_nmsedec_sig, lut_nmsedec_sig0, and T1_NMSEDEC_BITS.
Referenced by grk::T1::enc_clnpass().
uint16_t grk::getPocSize | ( | uint32_t | nb_comp, |
uint32_t | nb_poc | ||
) |
Referenced by j2k_write_poc(), and grk::CodeStream::write_tile_part().
|
static |
References lut_spb.
Referenced by grk::T1::enc_clnpass().
int32_t grk::getValue | ( | uint32_t | i | ) |
Referenced by init_tilec(), and main().
|
inlinestatic |
References SIZE_MAX.
Referenced by grk_aligned_malloc().
void grk::grk_aligned_free | ( | void * | ptr | ) |
Referenced by grk::grk_buffer_2d< T >::acquire(), grk::T1::allocate_buffers(), grk::grk_buffer_2d< T >::attach(), grk_image_single_component_data_free(), jp2_apply_palette_clr(), grk::dwt_data< T >::release(), grk::WaveletForward< DWT >::run(), grk::grk_buffer_2d< T >::~grk_buffer_2d(), and grk::T1::~T1().
void * grk::grk_aligned_malloc | ( | size_t | size | ) |
Allocate memory aligned to a 16 byte boundary.
size | Bytes to allocate |
References default_align, and grk_aligned_alloc_n().
Referenced by grk::grk_buffer_2d< T >::alloc(), grk::dwt_data< T >::alloc(), grk::T1::allocate_buffers(), grk_image_single_component_data_alloc(), and grk::WaveletForward< DWT >::run().
void * grk::grk_calloc | ( | size_t | numOfElements, |
size_t | sizeOfElements | ||
) |
Allocate a memory block with elements initialized to 0.
numOfElements | Blocks to allocate |
sizeOfElements | Bytes per block to allocate |
Referenced by grk::CompressCodeblock::alloc(), grk::SparseBuffer< LBW, LBH >::alloc(), grk::T1::code_block_enc_allocate(), grk_create_compress(), grk_create_decompress(), grk_image_create(), grk_image_create0(), j2k_allocate_tile_element_cstr_index(), j2k_create_cstr_index(), j2k_get_cstr_index(), j2k_get_cstr_info(), j2k_read_ppt(), jp2_check_color(), jp2_read_ftyp(), jp2_read_header_procedure(), jp2_write_bpc(), jp2_write_buffer(), jp2_write_colr(), jp2_write_ihdr(), jp2_write_res(), pi_create(), grk::CodeStream::process_marker(), grk::SIZMarker::read(), grk::PPMMarker::read(), and grk::SOTMarker::read().
|
static |
Copy only header of image and its component header (no data are copied) if dest image have data, they will be freed.
image_src | the src image |
image_dest | the dest image |
References grk::FileFormat::alloc_palette(), _grk_image::color, _grk_image::color_space, _grk_image::comps, _grk_image_comp::data, grk_free(), grk_image_all_components_data_free(), grk_malloc(), _grk_jp2_color::icc_profile_buf, _grk_image::numcomps, _grk_jp2_color::palette, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by grk::CodeStream::decompress(), grk::CodeStream::decompress_tile(), grk::CodeStream::init_compress(), and grk::CodeStream::read_header().
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.
void grk::GRK_ERROR | ( | const char * | fmt, |
... | |||
) |
References log(), and grk::logger::m_logger.
Referenced by grk::TileLengthMarkers::add_to_index(), grk::grk_buffer_2d< T >::alloc(), grk::dwt_data< T >::alloc(), grk::SparseBuffer< LBW, LBH >::alloc(), grk::CodeStream::alloc_multi_tile_output_data(), grk::T1::allocate_buffers(), grk::BitIO::bytein(), grk::CodeStream::compress(), grk::T2Compress::compress_packet(), grk::T2Compress::compress_packet_simulate(), grk::T2Compress::compress_packets(), grk::T2Compress::compress_packets_simulate(), compress_synch_with_plugin(), grk::CodeStream::compress_tile(), grk::CodeStream::compress_validation(), grk::TileComponent::create_buffer(), create_mapped_file_read_stream(), create_mapped_file_write_stream(), grk::t1_ht::T1HT::decompress(), grk::FileFormat::decompress(), grk::T1::decompress_cblk(), decompress_h_mt_53(), decompress_h_mt_97(), grk::T2Decompress::decompress_packets(), decompress_partial_tile(), grk::CodeStream::decompress_tile(), grk::FileFormat::decompress_tile(), decompress_tile_53(), decompress_tile_97(), grk::TileProcessor::decompress_tile_t1(), grk::CodeStream::decompress_tile_t2(), grk::CodeStream::decompress_tiles(), decompress_v_mt_53(), decompress_v_mt_97(), grk::T1DecompressScheduler::decompressBlock(), grk::TileProcessor::do_compress(), grk::BufferedStream::flush(), grk::SOTMarker::get_sot_values(), grk_image_create(), grk_image_single_component_data_alloc(), grk::TileComponent::init(), grk::Resolution::init(), grk::TileProcessor::init(), grk::CodeStream::init_compress(), grk::FileFormat::init_compress(), j2k_add_mhmarker(), j2k_calculate_tp(), j2k_check_poc_val(), j2k_merge_ppt(), j2k_read_cap(), j2k_read_cbd(), j2k_read_coc(), j2k_read_cod(), j2k_read_com(), j2k_read_crg(), j2k_read_header_procedure(), j2k_read_mcc(), j2k_read_mco(), j2k_read_mct(), j2k_read_poc(), j2k_read_ppt(), j2k_read_qcc(), j2k_read_qcd(), j2k_read_rgn(), j2k_read_soc(), j2k_read_SPCod_SPCoc(), j2k_write_cod(), j2k_write_qcd(), jp2_apply_palette_clr(), jp2_check_color(), jp2_read_box(), jp2_read_box_hdr(), jp2_read_bpc(), jp2_read_channel_definition(), jp2_read_colr(), jp2_read_component_mapping(), jp2_read_ftyp(), jp2_read_header_procedure(), jp2_read_ihdr(), jp2_read_jp(), jp2_read_jp2h(), jp2_read_palette_clr(), jp2_read_res(), jp2_write_ftyp(), jp2_write_jp2c(), jp2_write_jp2h(), mem_map_free(), grk::PPMMarker::merge(), grk::CodeStream::need_nb_tile_parts_correction(), open_fd(), grk::CodeStream::parse_tile_header_markers(), pi_next_cprl(), pi_next_l(), pi_next_lrcp(), pi_next_pcrl(), pi_next_rlcp(), grk::CodeStream::post_write_tile(), grk::TileProcessor::pre_write_tile(), grk::TileProcessor::prepare_sod_decoding(), grk::T1DecompressScheduler::prepareScheduleDecompress(), grk::CodeStream::process_marker(), grk::SIZMarker::read(), grk::BufferedStream::read(), grk::TileLengthMarkers::read(), grk::PPMMarker::read(), grk::SOTMarker::read(), grk::FileFormat::read_header(), grk::CodeStream::read_header_procedure(), grk::SparseBuffer< LBW, LBH >::read_or_write(), grk::T2Decompress::read_packet_data(), grk::T2Decompress::read_packet_header(), grk::Quantizer::read_SQcd_SQcc(), grk::CodeStream::read_unk(), grk::PacketLengthMarkers::readPLM(), grk::PacketLengthMarkers::readPLT(), grk::WaveletForward< DWT >::run(), grk::CodeStream::set_decompress_window(), grk::Quantizer::setBandStepSizeAndBps(), update_image_dimensions(), and grk::CodeStream::write_tile_part().
void grk::grk_free | ( | void * | m | ) |
Deallocates or frees a memory block.
m | Previously allocated memory block to be freed |
Referenced by grk::TileLengthMarkers::add_to_index(), grk::CompressCodeblock::cleanup(), grk::T1::code_block_enc_deallocate(), grk::mct::compress_custom(), grk::TileCodingParams::destroy(), grk_copy_image_header(), grk_create_compress(), grk_create_decompress(), grk_destroy_codec(), grk_destroy_cstr_info(), grk_image_destroy(), grk::CodeStream::init_compress(), j2k_add_mct(), j2k_add_mhmarker(), j2k_create_cstr_index(), j2k_destroy_cstr_index(), j2k_get_cstr_index(), j2k_init_mct_encoding(), j2k_merge_ppt(), j2k_read_mcc(), j2k_read_mco(), j2k_read_mct(), jp2_apply_palette_clr(), jp2_check_color(), jp2_read_header_procedure(), jp2_write_jp2h(), matrix_inversion_f(), grk::PPMMarker::merge(), pi_create_compress(), pi_create_decompress(), grk::CodeStream::process_marker(), grk::SOTMarker::read(), grk::CodeStream::~CodeStream(), grk::FileFormat::~FileFormat(), grk::PacketIter::~PacketIter(), grk::PPMMarker::~PPMMarker(), grk::SparseBuffer< LBW, LBH >::~SparseBuffer(), and grk::T1::~T1().
|
static |
Gets the compressing parameters needed to update the coding parameters and all the pocs.
The precinct widths, heights, dx and dy for each component at each resolution will be stored as well. the last parameter of the function should be an array of pointers of size nb components, each pointer leading to an area of size 4 * max_res. The data is stored inside this area with the following pattern : dx_compi_res0 , dy_compi_res0 , w_compi_res0, h_compi_res0 , dx_compi_res1 , dy_compi_res1 , w_compi_res1, h_compi_res1 , ...
p_image | the image being encoded. |
p_cp | the coding parameters. |
tileno | the tile index of the tile being encoded. |
tx0 | X0 parameter for the tile |
tx1 | X1 parameter for the tile |
ty0 | Y0 parameter for the tile |
ty1 | Y1 parameter for the tile |
max_precincts | maximum number of precincts for all the bands of the tile |
max_res | maximum number of resolutions for all the poc inside the tile. |
dx_min | minimum dx of all the components of all the resolutions for the tile. |
dy_min | minimum dy of all the components of all the resolutions for the tile. |
p_resolutions | pointer to an area corresponding to the one described above. |
References _grk_image::comps, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::TileCodingParams::tccps, grk::CodingParams::tcps, grk::CodingParams::tx0, grk::CodingParams::ty0, uint_floordivpow2(), _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by pi_create_compress(), and pi_create_decompress().
|
static |
Gets the compressing parameters needed to update the coding parameters and all the pocs.
p_image | the image being encoded. |
p_cp | the coding parameters. |
tileno | the tile index of the tile being encoded. |
tx0 | X0 parameter for the tile |
tx1 | X1 parameter for the tile |
ty0 | Y0 parameter for the tile |
ty1 | Y1 parameter for the tile |
max_precincts | maximum number of precincts for all the bands of the tile |
max_res | maximum number of resolutions for all the poc inside the tile. |
dx_min | minimum dx of all the components of all the resolutions for the tile. |
dy_min | minimum dy of all the components of all the resolutions for the tile. |
References _grk_image::comps, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::CodingParams::tcps, grk::CodingParams::tx0, grk::CodingParams::ty0, uint_floordivpow2(), _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by pi_update_encoding_parameters().
grk_image* grk::grk_image_create0 | ( | void | ) |
References grk_calloc().
Referenced by grk::CodeStream::decompress(), grk::CodeStream::decompress_tile(), grk::CodeStream::init_compress(), and grk::CodeStream::read_header().
bool grk::grk_image_single_component_data_alloc | ( | grk_image_comp * | image | ) |
Allocate data for single image component.
image | image |
References _grk_image_comp::data, default_align, grk_aligned_malloc(), GRK_ERROR(), grk_image_single_component_data_free(), grk_make_aligned_width(), _grk_image_comp::h, _grk_image_comp::owns_data, _grk_image_comp::stride, and _grk_image_comp::w.
Referenced by grk::CodeStream::alloc_multi_tile_output_data(), grk_image_create(), and jp2_apply_palette_clr().
void grk::GRK_INFO | ( | const char * | fmt, |
... | |||
) |
References log(), and grk::logger::m_logger.
Referenced by grk::T2Compress::compress_packet(), grk::T2Compress::compress_packet_simulate(), grk::T2Compress::compress_packets_simulate(), grk::T2Decompress::decompress_packets(), decompress_synch_plugin_with_host(), and grk::CodeStream::set_decompress_window().
uint32_t grk::grk_make_aligned_width | ( | uint32_t | width | ) |
References grk_alignment.
Referenced by grk::grk_buffer_2d< T >::alloc(), and grk_image_single_component_data_alloc().
void * grk::grk_malloc | ( | size_t | size | ) |
Allocate an uninitialized memory block.
size | Bytes to allocate |
Referenced by grk::mct::compress_custom(), grk::CodeStream::copy_default_tcp(), grk_copy_image_header(), grk_set_MCT(), grk::CodeStream::init_compress(), grk::FileFormat::init_compress(), j2k_add_mct(), j2k_get_cstr_index(), j2k_init_mct_encoding(), j2k_read_mct(), j2k_read_ppt(), jp2_apply_palette_clr(), jp2_write_channel_definition(), jp2_write_component_mapping(), jp2_write_palette_clr(), matrix_inversion_f(), grk::PPMMarker::merge(), pi_create_compress(), pi_create_decompress(), grk::PPMMarker::read(), and grk::T1::T1().
|
static |
Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().
void grk::grk_read | ( | const uint8_t * | p_buffer, |
TYPE * | value | ||
) |
void grk::grk_read | ( | const uint8_t * | p_buffer, |
TYPE * | value, | ||
uint32_t | nb_bytes | ||
) |
Referenced by jp2_read_bpc().
void * grk::grk_realloc | ( | void * | m, |
size_t | s | ||
) |
Reallocate memory blocks.
m | Pointer to previously allocated memory block |
s | New size in bytes |
Referenced by grk::TileLengthMarkers::add_to_index(), grk::t1_part1::T1Part1::decompress(), j2k_add_mhmarker(), j2k_init_mct_encoding(), j2k_read_mcc(), j2k_read_mct(), j2k_read_ppt(), jp2_read_header_procedure(), grk::CodeStream::process_marker(), grk::PPMMarker::read(), and grk::SOTMarker::read().
|
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
stream | stream to modify |
p_function | function to use as read function. |
References GROK_STREAM_STATUS_INPUT.
Referenced by set_up_mem_stream().
|
static |
Updates the components characteristics of the image from the coding parameters.
image_header | the image header to update. |
p_cp | the coding parameters from which to update the image. |
References _grk_image::comps, grk::CodingParams::m_coding_params, grk::CodingParams::m_dec, grk::DecodingParams::m_reduce, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::CodingParams::tx0, grk::CodingParams::ty0, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by grk::SIZMarker::read().
void grk::GRK_WARN | ( | const char * | fmt, |
... | |||
) |
References log(), and grk::logger::m_logger.
Referenced by grk::T2Compress::compress_packet(), grk::T2Compress::compress_packet_simulate(), compress_synch_with_plugin(), grk::T1::dec_clnpass_check_segsym(), grk::T1::decompress_cblk(), grk::T2Decompress::decompress_packets(), grk::CodeStream::decompress_tile(), grk::CodeStream::decompress_tile_t2t1(), grk::DecoderState::findNextTile(), grk::CodeStream::get_marker_handler(), grk::grk_buffer< uint8_t >::incr_offset(), grk::TileProcessor::init(), grk::CodeStream::init_compress(), grk::FileFormat::init_compress(), grk::PrecinctImpl::initTagTrees(), grk::Profile::is_broadcast_compliant(), grk::Profile::is_cinema_compliant(), grk::Profile::is_imf_compliant(), j2k_read_cod(), j2k_read_com(), j2k_read_mcc(), j2k_read_mco(), j2k_read_mct(), j2k_write_com(), jp2_apply_channel_definition(), jp2_check_color(), jp2_read_bpc(), jp2_read_colr(), jp2_read_header_procedure(), jp2_read_ihdr(), jp2_read_uuid(), grk::TileProcessor::need_mct_decompress(), grk::TileProcessor::pre_compress_first_tile_part(), grk::TileProcessor::prepare_sod_decoding(), grk::SIZMarker::read(), grk::SOTMarker::read(), grk::ChunkBuffer::read(), grk::CodeStream::read_marker(), grk::T2Decompress::read_packet_header(), grk::Quantizer::read_SQcd_SQcc(), grk::Profile::set_cinema_parameters(), grk::CodeStream::set_decompress_window(), grk::ChunkBuffer::skip(), grk::T2Decompress::skip_packet_data(), and grk::TagTree::TagTree().
void grk::grk_write | ( | uint8_t * | p_buffer, |
TYPE | value | ||
) |
void grk::grk_write | ( | uint8_t * | p_buffer, |
TYPE | value, | ||
uint32_t | nb_bytes | ||
) |
Referenced by jp2_write_bpc(), and grk::BufferedStream::write().
bool grk::init_tilec | ( | TileComponent * | tilec, |
uint32_t | x0, | ||
uint32_t | y0, | ||
uint32_t | x1, | ||
uint32_t | y1, | ||
uint32_t | numresolutions, | ||
grk_image * | output_image | ||
) |
References grk::TileComponentWindowBuffer< T >::alloc(), grk::TileComponent::create_buffer(), grk::TileComponent::getBuffer(), getValue(), grk::TileComponent::numresolutions, grk::TileComponent::resolutions, grk::TileComponent::resolutions_to_decompress, grk::grk_rectangle< T >::set_rect(), _grk_image::x0, grk::grk_rectangle< T >::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by main().
|
inlinestatic |
Multiply two fixed-point numbers.
a | N-bit precision fixed point number |
b | 13-bit precision fixed point number |
Referenced by grk::mct::compress_custom(), and grk::dwt97::compress_line().
|
static |
|
static |
References grk::dwt_data< T >::cas, GRK_RESTRICT, grk::dwt_data< T >::mem, grk::dwt_data< T >::win_h_0, and grk::dwt_data< T >::win_l_0.
Referenced by decompress_v_strip_97().
bool grk::j2k_add_mct | ( | TileCodingParams * | p_tcp, |
grk_image * | p_image, | ||
uint32_t | index | ||
) |
element discarded
do not support number of comps != image
References grk_free(), grk_malloc(), j2k_mct_read_functions_to_float, j2k_mct_read_functions_to_int32, grk::TileComponentCodingParams::m_dc_level_shift, grk::grk_simple_mcc_decorrelation_data::m_decorrelation_array, grk::TileCodingParams::m_mcc_records, grk::TileCodingParams::m_mct_decoding_matrix, grk::TileCodingParams::m_nb_mcc_records, MCT_ELEMENT_SIZE, _grk_image::numcomps, and grk::TileCodingParams::tccps.
Referenced by j2k_read_mco().
bool grk::j2k_add_mhmarker | ( | grk_codestream_index * | cstr_index, |
uint32_t | type, | ||
uint64_t | pos, | ||
uint32_t | len | ||
) |
Add main header marker information.
cstr_index | Codestream information structure |
type | marker type |
pos | byte offset of marker segment |
len | length of marker segment |
References GRK_ERROR(), grk_free(), grk_realloc(), _grk_marker_info::len, _grk_codestream_index::marker, _grk_codestream_index::marknum, _grk_codestream_index::maxmarknum, _grk_marker_info::pos, and _grk_marker_info::type.
Referenced by j2k_read_soc(), grk::CodeStream::read_header_procedure(), and grk::CodeStream::read_unk().
bool grk::j2k_allocate_tile_element_cstr_index | ( | CodeStream * | codeStream | ) |
References grk::CodeStream::cstr_index, grk_calloc(), grk::CodeStream::m_cp, _grk_tile_index::marker, _grk_tile_index::marknum, _grk_tile_index::maxmarknum, _grk_codestream_index::nb_of_tiles, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, and _grk_codestream_index::tile_index.
Referenced by grk::CodeStream::decompress_tile(), and grk::CodeStream::read_header().
|
static |
Calculates the total number of tile parts needed by the compressor to compress such an image.
If not enough memory is available, then the function return false.
cp | coding parameters for the image. |
p_nb_tile_parts | total number of tile parts in whole image. |
image | image to compress. |
References GRK_ERROR(), j2k_get_num_tp(), max_num_tile_parts, max_num_tile_parts_per_tile, pi_update_encoding_parameters(), grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, and grk::CodingParams::tcps.
Referenced by j2k_init_info().
|
static |
Checks the progression order changes values.
Tells of the poc given as input are valid. A nice message is outputted at errors.
p_pocs | the progression order changes. |
nb_pocs | the number of progression order changes. |
nb_resolutions | the number of resolutions. |
numcomps | the number of components |
numlayers | the number of layers. |
References _grk_poc::compno0, _grk_poc::compno1, GRK_ERROR(), _grk_poc::layno1, _grk_poc::resno0, and _grk_poc::resno1.
Referenced by grk::CodeStream::init_compress().
bool grk::j2k_compare_coc | ( | CodeStream * | codeStream, |
uint32_t | first_comp_no, | ||
uint32_t | second_comp_no | ||
) |
Compares 2 COC markers (Coding style component)
codeStream | JPEG 2000 code stream |
first_comp_no | the index of the first component to compare. |
second_comp_no | the index of the second component to compare. |
References j2k_compare_SPCod_SPCoc(), and grk::CodeStream::m_cp.
Referenced by j2k_write_all_coc().
bool grk::j2k_compare_qcc | ( | CodeStream * | codeStream, |
uint32_t | first_comp_no, | ||
uint32_t | second_comp_no | ||
) |
Compare QCC markers (quantization component)
codeStream | JPEG 2000 code stream |
first_comp_no | the index of the first component to compare. |
second_comp_no | the index of the second component to compare. |
References j2k_compare_SQcd_SQcc().
Referenced by j2k_write_all_qcc().
bool grk::j2k_compare_SPCod_SPCoc | ( | CodeStream * | codeStream, |
uint32_t | first_comp_no, | ||
uint32_t | second_comp_no | ||
) |
Compare 2 a SPCod/ SPCoc elements, i.e.
the coding style of a given component of a tile.
codeStream | JPEG 2000 code stream |
first_comp_no | The 1st component number to compare. |
second_comp_no | The 1st component number to compare. |
References J2K_CCP_CSTY_PRT, and grk::CodeStream::m_cp.
Referenced by j2k_compare_coc().
bool grk::j2k_compare_SQcd_SQcc | ( | CodeStream * | codeStream, |
uint32_t | first_comp_no, | ||
uint32_t | second_comp_no | ||
) |
Compares 2 SQcd or SQcc element, i.e.
the quantization values of a band in the QCD or QCC.
codeStream | JPEG 2000 code stream |
first_comp_no | the first component number to compare. |
second_comp_no | the second component number to compare. |
References grk::CodeStream::m_cp.
Referenced by j2k_compare_qcc().
|
static |
The default compressing validation procedure without any extension.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::compress_validation().
Referenced by grk::CodeStream::start_compress().
char * grk::j2k_convert_progression_order | ( | GRK_PROG_ORDER | prg_order | ) |
Converts an enum type progression order to string type.
References grk::j2k_prog_order::enum_prog, j2k_prog_order_list, and grk::j2k_prog_order::str_prog.
Referenced by j2k_get_num_tp(), and pi_enable_tile_part_generation().
|
static |
Copies the decoding tile parameters onto all the tile parameters.
Creates also the tile decompressor.
codeStream | JPEG 2000 code stream |
codeStream | code stream |
References grk::CodeStream::copy_default_tcp().
Referenced by grk::CodeStream::read_header().
|
static |
Copies the tile component parameters of all the component from the first tile component.
codeStream | the J2k codec. |
References grk::CodeStream::get_current_decode_tcp(), grk::CodeStream::m_input_image, _grk_image::numcomps, grk::TileComponentCodingParams::numresolutions, and grk::TileCodingParams::tccps.
Referenced by j2k_read_cod().
grk_codestream_index * grk::j2k_create_cstr_index | ( | void | ) |
References grk_calloc(), and grk_free().
Referenced by grk::CodeStream::CodeStream().
|
static |
References grk::CodeStream::decompress_tile().
Referenced by grk::CodeStream::decompress_tile().
bool grk::j2k_decompress_tile | ( | CodeStream * | codeStream, |
grk_image * | p_image, | ||
uint16_t | tile_index | ||
) |
|
static |
Read the tiles.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::decompress_tiles().
Referenced by grk::CodeStream::decompress().
|
static |
The default decoding validation procedure without any extension.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::decompress_validation().
Referenced by grk::CodeStream::read_header().
void grk::j2k_destroy_cstr_index | ( | grk_codestream_index * | p_cstr_ind | ) |
Destroys a code stream index structure.
p_cstr_ind | the code stream index parameter to destroy. |
References grk_free(), _grk_tile_index::marker, _grk_codestream_index::marker, _grk_codestream_index::nb_of_tiles, _grk_codestream_index::tile_index, and _grk_tile_index::tp_index.
Referenced by grk_destroy_cstr_index(), and grk::CodeStream::~CodeStream().
void grk::j2k_dump | ( | CodeStream * | codeStream, |
int32_t | flag, | ||
FILE * | out_stream | ||
) |
Dump some elements from the J2K decompression structure .
codeStream | JPEG 2000 code stream |
flag | flag to describe what elements are dumped. |
out_stream | output stream where dump the elements. |
References GRK_IMG_INFO, GRK_J2K_MH_IND, GRK_J2K_MH_INFO, GRK_J2K_TCH_INFO, GRK_J2K_TH_IND, GRK_J2K_TH_INFO, GRK_JP2_IND, GRK_JP2_INFO, j2k_dump_image_header(), j2k_dump_MH_index(), j2k_dump_MH_info(), j2k_dump_tile_info(), grk::CodeStream::m_cp, grk::CodeStream::m_input_image, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, and grk::CodingParams::tcps.
Referenced by grk::CodeStream::dump(), grk::FileFormat::dump(), and jp2_dump().
void grk::j2k_dump_image_comp_header | ( | grk_image_comp * | comp, |
bool | dev_dump_flag, | ||
FILE * | out_stream | ||
) |
Dump a component image header structure.
comp | the component image header to dump. |
dev_dump_flag | flag to describe if we are in the case of this function is use outside j2k_dump function |
out_stream | output stream where dump the elements. |
References _grk_image_comp::dx, _grk_image_comp::dy, _grk_image_comp::prec, and _grk_image_comp::sgnd.
Referenced by j2k_dump_image_header().
void grk::j2k_dump_image_header | ( | grk_image * | image, |
bool | dev_dump_flag, | ||
FILE * | out_stream | ||
) |
Dump an image header structure.
image | the image header to dump. |
dev_dump_flag | flag to describe if we are in the case of this function is use outside j2k_dump function |
out_stream | output stream where dump the elements. |
References _grk_image::comps, j2k_dump_image_comp_header(), _grk_image::numcomps, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by j2k_dump().
|
static |
References grk::CodeStream::cstr_index.
Referenced by j2k_dump().
|
static |
References j2k_dump_tile_info(), grk::CodeStream::m_cp, grk::CodeStream::m_decompressor, grk::DecoderState::m_default_tcp, grk::CodeStream::m_input_image, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::CodingParams::tx0, and grk::CodingParams::ty0.
Referenced by j2k_dump().
|
static |
References grk::TileCodingParams::csty, J2K_CCP_QNTSTY_SIQNT, grk::TileCodingParams::mct, grk::TileCodingParams::numlayers, grk::TileCodingParams::prg, and grk::TileCodingParams::tccps.
Referenced by j2k_dump(), and j2k_dump_MH_info().
|
static |
Ends the compressing, i.e.
frees memory.
codeStream | JPEG 2000 code stream |
Referenced by grk::CodeStream::end_compress().
grk_codestream_index * grk::j2k_get_cstr_index | ( | CodeStream * | codeStream | ) |
Get the code stream index from a JPEG2000 codec.
codeStream | the component image header to dump. |
References _grk_codestream_index::codestream_size, grk::CodeStream::cstr_index, grk_calloc(), grk_free(), grk_malloc(), _grk_codestream_index::main_head_end, _grk_codestream_index::main_head_start, _grk_tile_index::marker, _grk_codestream_index::marker, _grk_tile_index::marknum, _grk_codestream_index::marknum, _grk_codestream_index::nb_of_tiles, _grk_tile_index::nb_tps, _grk_codestream_index::tile_index, and _grk_tile_index::tp_index.
Referenced by grk::CodeStream::get_cstr_index(), grk::FileFormat::get_cstr_index(), and jp2_get_cstr_index().
grk_codestream_info_v2 * grk::j2k_get_cstr_info | ( | CodeStream * | codeStream | ) |
Get the code stream info from a JPEG2000 codec.
codeStream | the component image header to dump. |
References grk::TileCodingParams::csty, grk_calloc(), grk_destroy_cstr_info(), GRK_J2K_MAXBANDS, GRK_J2K_MAXRLVLS, J2K_CCP_QNTSTY_SIQNT, grk::CodeStream::m_cp, grk::CodeStream::m_decompressor, grk::DecoderState::m_default_tcp, grk::CodeStream::m_input_image, _grk_image::numcomps, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::CodingParams::tx0, and grk::CodingParams::ty0.
Referenced by grk::CodeStream::get_cstr_info(), grk::FileFormat::get_cstr_info(), and jp2_get_cstr_info().
|
static |
Gets the offset of the header.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::get_end_header().
Referenced by grk::CodeStream::init_header_writing().
|
static |
Gets the number of tile parts used for the given change of progression (if any) and the given tile.
cp | the coding parameters. |
pino | the offset of the given poc (i.e. its position in the coding parameter). |
tileno | the given tile. |
References j2k_convert_progression_order(), grk::CodingParams::m_coding_params, grk::CodingParams::m_enc, grk::EncodingParams::m_tp_flag, grk::EncodingParams::m_tp_on, grk::EncodingParams::m_tp_pos, grk::TileCodingParams::numpocs, grk::CodingParams::t_grid_height, grk::CodingParams::t_grid_width, and grk::CodingParams::tcps.
Referenced by j2k_calculate_tp(), and grk::CodeStream::post_write_tile().
uint32_t grk::j2k_get_SPCod_SPCoc_size | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
Gets the size taken by writing a SPCod or SPCoc for the given tile and component.
codeStream | the JPEG 2000 code stream |
comp_no | the component being outputted. |
References J2K_CCP_CSTY_PRT, grk::CodeStream::m_cp, and SPCod_SPCoc_len.
Referenced by j2k_write_coc(), and j2k_write_cod().
uint32_t grk::j2k_get_SQcd_SQcc_size | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
Gets the size taken by writing SQcd or SQcc element, i.e.
the quantization values of a band in the QCD or QCC.
codeStream | the JPEG 2000 code stream |
comp_no | the component being output. |
References grk::CodeStream::m_cp.
Referenced by j2k_write_qcc(), and j2k_write_qcd().
|
static |
Inits the Info.
codeStream | JPEG 2000 code stream |
References j2k_calculate_tp(), grk::CodeStream::m_cp, grk::CodeStream::m_encoder, grk::CodeStream::m_input_image, and grk::EncoderState::m_total_tile_parts.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_init_mct_encoding | ( | TileCodingParams * | p_tcp, |
grk_image * | p_image | ||
) |
References default_number_mct_records, grk_free(), grk_malloc(), grk_realloc(), j2k_mct_write_functions_from_float, grk::grk_mct_data::m_array_type, grk::grk_mct_data::m_data, grk::grk_mct_data::m_data_size, grk::TileComponentCodingParams::m_dc_level_shift, grk::grk_simple_mcc_decorrelation_data::m_decorrelation_array, grk::grk_mct_data::m_element_type, grk::grk_mct_data::m_index, grk::grk_simple_mcc_decorrelation_data::m_index, grk::grk_simple_mcc_decorrelation_data::m_is_irreversible, grk::TileCodingParams::m_mcc_records, grk::TileCodingParams::m_mct_decoding_matrix, grk::TileCodingParams::m_mct_records, grk::grk_simple_mcc_decorrelation_data::m_nb_comps, grk::TileCodingParams::m_nb_max_mcc_records, grk::TileCodingParams::m_nb_max_mct_records, grk::TileCodingParams::m_nb_mcc_records, grk::TileCodingParams::m_nb_mct_records, grk::grk_simple_mcc_decorrelation_data::m_offset_array, grk::TileCodingParams::mct, MCT_ELEMENT_SIZE, MCT_TYPE_DECORRELATION, MCT_TYPE_FLOAT, MCT_TYPE_OFFSET, _grk_image::numcomps, and grk::TileCodingParams::tccps.
Referenced by grk::CodeStream::init_compress().
|
static |
The mct compressing validation procedure.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::mct_validation().
Referenced by grk::CodeStream::start_compress().
bool grk::j2k_merge_ppm | ( | CodingParams * | p_cp | ) |
Merges all PPM markers read (Packed headers, main header)
p_cp | main coding parameters. |
References grk::PPMMarker::merge(), and grk::CodingParams::ppm_marker.
Referenced by grk::CodeStream::read_header_procedure().
bool grk::j2k_merge_ppt | ( | TileCodingParams * | p_tcp | ) |
Merges all PPT markers read (Packed packet headers, tile-part header)
Merges all PPT markers read (Packed headers, tile-part header)
p_tcp | the tile. |
References GRK_ERROR(), grk_free(), grk::grk_ppx::m_data, grk::grk_ppx::m_data_size, grk::TileCodingParams::ppt, grk::TileCodingParams::ppt_buffer, grk::TileCodingParams::ppt_data, grk::TileCodingParams::ppt_data_size, grk::TileCodingParams::ppt_len, grk::TileCodingParams::ppt_markers, and grk::TileCodingParams::ppt_markers_count.
Referenced by grk::CodeStream::parse_tile_header_markers().
bool grk::j2k_read_cap | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a CAP marker.
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodingParams::ccap, GRK_ERROR(), grk::CodeStream::m_cp, grk::CodingParams::pcap, and ojph::population_count().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_cbd | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a CBD marker (Component bit depth definition)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References _grk_image::comps, GRK_ERROR(), grk::CodeStream::m_input_image, _grk_image::numcomps, and _grk_image_comp::sgnd.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_coc | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a COC marker (Coding Style Component)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), j2k_read_SPCod_SPCoc(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_cod | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a COD marker (Coding Style defaults)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References cod_coc_len, grk::CodeStream::get_current_decode_tcp(), GRK_CPRL, GRK_ERROR(), GRK_WARN(), J2K_CCP_CSTY_PRT, j2k_copy_tile_component_parameters(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_PRT, J2K_CP_CSTY_SOP, j2k_read_SPCod_SPCoc(), grk::CodeStream::m_cp, and grk::CodeStream::m_input_image.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_com | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a COM marker (comments)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodingParams::comment, grk::CodingParams::comment_len, GRK_ERROR(), GRK_NUM_COMMENTS_SUPPORTED, GRK_WARN(), grk::CodingParams::isBinaryComment, grk::CodeStream::m_cp, and grk::CodingParams::num_comments.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_crg | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a CRG marker (Component registration)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References _grk_image::comps, GRK_ERROR(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::CodeStream().
void grk::j2k_read_float32_to_float | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_float32_to_int32 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_float64_to_float | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_float64_to_int32 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
|
static |
The read header procedure.
codeStream | JPEG 2000 code stream |
References GRK_ERROR(), grk::InvalidMarkerException::m_marker, and grk::CodeStream::read_header_procedure().
Referenced by grk::CodeStream::read_header().
void grk::j2k_read_int16_to_float | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_int16_to_int32 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_int32_to_float | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_read_int32_to_int32 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
bool grk::j2k_read_mcc | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a MCC marker (Multiple Component Collection)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
NOT FOUND
References default_number_mcc_records, grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), grk_free(), grk_realloc(), and GRK_WARN().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_mco | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a MCO marker (Multiple Component Transform Ordering)
codeStream | JPEG 2000 code stream |
p_header_data | header data. |
header_size | size of header data |
References grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), grk_free(), GRK_WARN(), j2k_add_mct(), and grk::CodeStream::m_input_image.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_mct | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a MCT marker (Multiple Component Transform)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References default_number_mct_records, grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), grk_free(), grk_malloc(), grk_realloc(), GRK_WARN(), grk::grk_simple_mcc_decorrelation_data::m_decorrelation_array, and grk::grk_simple_mcc_decorrelation_data::m_offset_array.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_plm | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a PLM marker (Packet length, main header marker)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::m_cp, grk::CodingParams::plm_markers, and grk::PacketLengthMarkers::readPLM().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_plt | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a PLT marker (Packet length, tile-part header)
codeStream | JPEG 2000 code stream |
p_header_data | the data contained in the PLT box. |
header_size | the size of the data contained in the PLT marker. |
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::currentProcessor().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_poc | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a POC marker (Progression Order Change)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), GRK_J2K_MAXRLVLS, GRK_NUM_PROGRESSION_ORDERS, grk::CodeStream::m_input_image, grk::TileComponentCodingParams::numresolutions, and grk::TileCodingParams::tccps.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_ppm | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a PPM marker (Packed packet headers, main header)
Reads a PPM marker (Packed headers, main header)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::m_cp, grk::CodingParams::ppm_marker, and grk::PPMMarker::read().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_ppt | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a PPT marker (Packed packet headers, tile-part header)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::currentProcessor(), grk_calloc(), GRK_ERROR(), grk_malloc(), grk_realloc(), and grk::CodeStream::m_cp.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_qcc | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a QCC marker (Quantization component)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References GRK_ERROR(), j2k_read_SQcd_SQcc(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_qcd | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a QCD marker (Quantization defaults)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::Quantizer::apply_quant(), grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), j2k_read_SQcd_SQcc(), grk::CodeStream::m_input_image, _grk_image::numcomps, grk::TileComponentCodingParams::quant, and grk::TileCodingParams::tccps.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_rgn | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a RGN marker (Region Of Interest)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::get_current_decode_tcp(), GRK_ERROR(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_siz | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a SIZ marker (image and tile size)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::SIZMarker::read().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_soc | ( | CodeStream * | codeStream | ) |
Reads a SOC marker (Start of Codestream)
codeStream | JPEG 2000 code stream. |
References grk::CodeStream::cstr_index, grk::CodeStream::getStream(), GRK_ERROR(), j2k_add_mhmarker(), J2K_DEC_STATE_MH_SIZ, J2K_MS_SOC, grk::CodeStream::m_decompressor, grk::DecoderState::m_state, and _grk_codestream_index::main_head_start.
Referenced by grk::CodeStream::read_header_procedure().
bool grk::j2k_read_sot | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Read SOT (Start of tile part) marker.
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
codeStream | JPEG 2000 code stream |
p_header_data | header data. |
header_size | size of header data |
References grk::SOTMarker::read().
Referenced by grk::CodeStream::CodeStream().
bool grk::j2k_read_SPCod_SPCoc | ( | CodeStream * | codeStream, |
uint32_t | compno, | ||
uint8_t * | p_header_data, | ||
uint16_t * | header_size | ||
) |
Reads a SPCod or SPCoc element, i.e.
the coding style of a given component of a tile.
codeStream | JPEG 2000 code stream |
compno | component number |
p_header_data | the data contained in the COM box. |
header_size | the size of the data contained in the COM marker. |
References _grk_image::comps, grk::CodeStream::get_current_decode_tcp(), GRK_CBLKSTY_HT, GRK_ERROR(), GRK_J2K_MAX_DECOMP_LVLS, J2K_CCP_CSTY_PRT, J2K_DEC_STATE_ERR, grk::CodeStream::m_cp, grk::CodeStream::m_decompressor, grk::CodeStream::m_input_image, grk::DecoderState::m_state, _grk_image::numcomps, grk::CodingParams::pcap, _grk_image_comp::prec, _grk_image_comp::sgnd, SPCod_SPCoc_len, and grk::TileCodingParams::tccps.
Referenced by j2k_read_coc(), and j2k_read_cod().
bool grk::j2k_read_SQcd_SQcc | ( | CodeStream * | codeStream, |
bool | fromQCC, | ||
uint32_t | compno, | ||
uint8_t * | p_header_data, | ||
uint16_t * | header_size | ||
) |
Reads a SQcd or SQcc element, i.e.
the quantization values of a band in the QCD or QCC.
codeStream | JPEG 2000 code stream |
fromQCC | true if reading QCC, otherwise false (reading QCD) |
compno | the component number to output. |
p_header_data | the data buffer. |
header_size | pointer to the size of the data buffer, it is changed by the function. |
References grk::CodeStream::get_current_decode_tcp(), grk::TileComponentCodingParams::quant, grk::Quantizer::read_SQcd_SQcc(), and grk::TileCodingParams::tccps.
Referenced by j2k_read_qcc(), and j2k_read_qcd().
bool grk::j2k_read_tlm | ( | CodeStream * | codeStream, |
uint8_t * | p_header_data, | ||
uint16_t | header_size | ||
) |
Reads a TLM marker (Tile Length Marker)
codeStream | JPEG 2000 code stream |
p_header_data | header data |
header_size | size of header data |
References grk::CodeStream::m_cp, grk::TileLengthMarkers::read(), and grk::CodingParams::tlm_markers.
Referenced by grk::CodeStream::CodeStream().
|
static |
Updates the rates of the tcp.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::update_rates().
Referenced by grk::CodeStream::init_header_writing().
void grk::j2k_update_tlm | ( | CodeStream * | codeStream, |
uint16_t | tile_index, | ||
uint32_t | tile_part_size | ||
) |
Updates the Tile Length Marker.
References grk::CodeStream::m_cp, grk::CodingParams::tlm_markers, and grk::TileLengthMarkers::write_update().
Referenced by grk::CodeStream::write_tile_part().
void grk::j2k_write | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
bool grk::j2k_write_all_coc | ( | CodeStream * | codeStream | ) |
Writes COC marker for each component.
codeStream | JPEG 2000 code stream |
References j2k_compare_coc(), j2k_write_coc(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_all_qcc | ( | CodeStream * | codeStream | ) |
Writes QCC marker for each component.
codeStream | JPEG 2000 code stream |
References j2k_compare_qcc(), j2k_write_qcc(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_cap | ( | CodeStream * | codeStream | ) |
Writes the CAP marker.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), J2K_MS_CAP, and grk::CodeStream::m_cp.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_cbd | ( | CodeStream * | codeStream | ) |
Writes the CBD marker (Component bit depth definition)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), J2K_MS_CBD, grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by j2k_write_mct_data_group().
bool grk::j2k_write_coc | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
References cod_coc_len, grk::CodeStream::getStream(), j2k_get_SPCod_SPCoc_size(), J2K_MS_COC, j2k_write_SPCod_SPCoc(), grk::CodeStream::m_cp, and grk::CodeStream::m_input_image.
Referenced by j2k_write_all_coc().
bool grk::j2k_write_coc | ( | CodeStream * | codeStream, |
uint32_t | comp_no, | ||
BufferedStream * | stream | ||
) |
Writes the COC marker (Coding style component)
codeStream | JPEG 2000 code stream |
comp_no | the index of the component to output. |
stream | buffered stream. |
bool grk::j2k_write_cod | ( | CodeStream * | codeStream | ) |
Writes the COD marker (Coding style default)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), GRK_ERROR(), j2k_get_SPCod_SPCoc_size(), J2K_MS_COD, j2k_write_SPCod_SPCoc(), and grk::CodeStream::m_cp.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_com | ( | CodeStream * | codeStream | ) |
Writes the COM marker (comment)
codeStream | JPEG 2000 code stream |
References grk::CodingParams::comment, grk::CodingParams::comment_len, grk::CodeStream::getStream(), GRK_MAX_COMMENT_LENGTH, GRK_WARN(), grk::CodingParams::isBinaryComment, J2K_MS_COM, grk::CodeStream::m_cp, and grk::CodingParams::num_comments.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_eoc | ( | CodeStream * | codeStream | ) |
Writes the EOC marker (End of Codestream)
codeStream | JPEG 2000 code stream |
References grk::BufferedStream::flush(), grk::CodeStream::getStream(), and J2K_MS_EOC.
Referenced by grk::CodeStream::end_compress().
bool grk::j2k_write_epc | ( | CodeStream * | codeStream | ) |
Writes EPC ????
codeStream | JPEG 2000 code stream |
References _grk_codestream_index::codestream_size, grk::CodeStream::cstr_index, and grk::CodeStream::getStream().
Referenced by grk::CodeStream::end_compress().
void grk::j2k_write_float_to_float | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_write_float_to_float64 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_write_float_to_int16 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
void grk::j2k_write_float_to_int32 | ( | const void * | p_src_data, |
void * | p_dest_data, | ||
uint64_t | nb_elem | ||
) |
bool grk::j2k_write_mcc_record | ( | grk_simple_mcc_decorrelation_data * | p_mcc_record, |
BufferedStream * | stream | ||
) |
Writes the MCC marker (Multiple Component Collection)
p_mcc_record | MCC record |
stream | buffered stream. |
References J2K_MS_MCC, grk::grk_simple_mcc_decorrelation_data::m_decorrelation_array, grk::grk_mct_data::m_index, grk::grk_simple_mcc_decorrelation_data::m_index, grk::grk_simple_mcc_decorrelation_data::m_is_irreversible, grk::grk_simple_mcc_decorrelation_data::m_nb_comps, grk::grk_simple_mcc_decorrelation_data::m_offset_array, grk::BufferedStream::write_24(), grk::BufferedStream::write_byte(), and grk::BufferedStream::write_short().
Referenced by j2k_write_mct_data_group().
bool grk::j2k_write_mco | ( | CodeStream * | codeStream | ) |
Writes the MCO marker (Multiple component transformation ordering)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), J2K_MS_MCO, grk::CodeStream::m_cp, and grk::CodingParams::tcps.
Referenced by j2k_write_mct_data_group().
bool grk::j2k_write_mct_data_group | ( | CodeStream * | codeStream | ) |
Writes the CBD-MCT-MCC-MCO markers (Multi components transform)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), j2k_write_cbd(), j2k_write_mcc_record(), j2k_write_mco(), j2k_write_mct_record(), grk::CodeStream::m_cp, and grk::CodingParams::tcps.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_mct_record | ( | grk_mct_data * | p_mct_record, |
BufferedStream * | stream | ||
) |
Writes the MCT marker (Multiple Component Transform)
p_mct_record | MCT record |
stream | buffered stream. |
References J2K_MS_MCT, grk::grk_mct_data::m_array_type, grk::grk_mct_data::m_data, grk::grk_mct_data::m_data_size, grk::grk_mct_data::m_element_type, grk::grk_mct_data::m_index, grk::BufferedStream::write_bytes(), and grk::BufferedStream::write_short().
Referenced by j2k_write_mct_data_group().
bool grk::j2k_write_poc | ( | CodeStream * | codeStream | ) |
Writes the POC marker (Progression Order Change)
codeStream | JPEG 2000 code stream |
References getPocSize(), grk::CodeStream::getStream(), J2K_MS_POC, grk::CodeStream::m_cp, grk::CodeStream::m_input_image, _grk_image::numcomps, grk::TileCodingParams::tccps, and grk::CodingParams::tcps.
Referenced by grk::CodeStream::init_header_writing(), and grk::CodeStream::write_tile_part().
bool grk::j2k_write_qcc | ( | CodeStream * | codeStream, |
uint16_t | tile_index, | ||
uint32_t | comp_no, | ||
BufferedStream * | stream | ||
) |
Writes the QCC marker (quantization component)
codeStream | JPEG 2000 code stream |
tile_index | current tile index |
comp_no | the index of the component to output. |
stream | buffered stream. |
bool grk::j2k_write_qcc | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
References grk::CodeStream::getStream(), j2k_get_SQcd_SQcc_size(), J2K_MS_QCC, j2k_write_SQcd_SQcc(), grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by j2k_write_all_qcc().
bool grk::j2k_write_qcd | ( | CodeStream * | codeStream | ) |
Writes the QCD marker (quantization default)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), GRK_ERROR(), j2k_get_SQcd_SQcc_size(), J2K_MS_QCD, and j2k_write_SQcd_SQcc().
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_regions | ( | CodeStream * | codeStream | ) |
Writes regions of interests.
codeStream | JPEG 2000 code stream |
References j2k_write_rgn(), grk::CodeStream::m_cp, grk::CodeStream::m_input_image, _grk_image::numcomps, grk::TileCodingParams::tccps, and grk::CodingParams::tcps.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_rgn | ( | CodeStream * | codeStream, |
uint16_t | tile_no, | ||
uint32_t | comp_no, | ||
uint32_t | nb_comps | ||
) |
Writes the RGN marker (Region Of Interest)
tile_no | the tile to output |
comp_no | the component to output |
nb_comps | the number of components |
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), J2K_MS_RGN, grk::CodeStream::m_cp, and grk::BufferedStream::write_byte().
Referenced by j2k_write_regions().
bool grk::j2k_write_siz | ( | CodeStream * | codeStream | ) |
Writes the SIZ marker (image and tile size)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), and grk::SIZMarker::write().
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_soc | ( | CodeStream * | codeStream | ) |
Writes the SOC marker (Start Of Codestream)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), and J2K_MS_SOC.
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_SPCod_SPCoc | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
Writes a SPCod or SPCoc element, i.e.
the coding style of a given component of a tile.
codeStream | JPEG 2000 code stream |
comp_no | the component number to output. |
References grk::CodeStream::getStream(), J2K_CCP_CSTY_PRT, grk::CodeStream::m_cp, grk::CodeStream::m_input_image, and _grk_image::numcomps.
Referenced by j2k_write_coc(), and j2k_write_cod().
bool grk::j2k_write_SQcd_SQcc | ( | CodeStream * | codeStream, |
uint32_t | comp_no | ||
) |
Writes a SQcd or SQcc element, i.e.
the quantization values of a band in the QCD or QCC.
codeStream | JPEG 2000 code stream |
comp_no | the component number to output. |
References grk::CodeStream::getStream(), and grk::CodeStream::m_cp.
Referenced by j2k_write_qcc(), and j2k_write_qcd().
bool grk::j2k_write_tlm_begin | ( | CodeStream * | codeStream | ) |
Begin writing the TLM marker (Tile Length Marker)
codeStream | JPEG 2000 code stream |
References grk::CodeStream::getStream(), grk::CodeStream::m_cp, grk::CodeStream::m_encoder, grk::EncoderState::m_total_tile_parts, grk::CodingParams::tlm_markers, and grk::TileLengthMarkers::write_begin().
Referenced by grk::CodeStream::init_header_writing().
bool grk::j2k_write_tlm_end | ( | CodeStream * | codeStream | ) |
End writing the updated tlm.
codeStream | JPEG 2000 code stream |
References grk::CodeStream::m_cp, grk::CodingParams::tlm_markers, and grk::TileLengthMarkers::write_end().
Referenced by grk::CodeStream::end_compress().
|
static |
References _grk_jp2_color::channel_definition, _grk_image::comps, _grk_channel_definition::descriptions, GRK_COMPONENT_ASSOC_WHOLE_IMAGE, GRK_COMPONENT_TYPE_COLOUR, GRK_WARN(), ojph::info, _grk_channel_definition::num_channel_descriptions, _grk_image::numcomps, and _grk_image_comp::type.
Referenced by grk::FileFormat::postDecompress().
|
static |
Apply collected palette data.
color | Collector for profile, cdef and pclr data |
image |
References _grk_palette_data::channel_prec, _grk_palette_data::channel_sign, _grk_palette_data::component_mapping, _grk_image::comps, _grk_image_comp::data, grk_aligned_free(), GRK_ERROR(), grk_free(), grk_image_single_component_data_alloc(), grk_image_single_component_data_free(), grk_malloc(), _grk_palette_data::lut, _grk_palette_data::num_channels, _grk_palette_data::num_entries, _grk_image::numcomps, and _grk_jp2_color::palette.
Referenced by grk::FileFormat::postDecompress().
|
static |
References _grk_jp2_color::channel_definition, _grk_palette_data::component_mapping, _grk_channel_definition::descriptions, grk_calloc(), GRK_COMPONENT_ASSOC_UNASSOCIATED, GRK_ERROR(), grk_free(), GRK_WARN(), ojph::info, _grk_channel_definition::num_channel_descriptions, _grk_palette_data::num_channels, _grk_image::numcomps, and _grk_jp2_color::palette.
Referenced by grk::FileFormat::read_header().
|
static |
References grk::grk_jp2_comps::bpc, grk::FileFormat::codeStream, grk::FileFormat::comps, grk::CodeStream::getStream(), grk::FileFormat::jp2_img_state, JP2_IMG_STATE_NONE, grk::FileFormat::jp2_state, JP2_STATE_NONE, grk::FileFormat::m_procedure_list, grk::FileFormat::m_validation_list, grk::FileFormat::meth, and grk::FileFormat::numcomps.
Referenced by jp2_init_compress_validation().
void grk::jp2_dump | ( | FileFormat * | fileFormat, |
int32_t | flag, | ||
FILE * | out_stream | ||
) |
Dump some elements from the JP2 decompression structure .
fileFormat | the jp2 codec. |
flag | flag to describe what elements are dump. |
out_stream | output stream where dump the elements. |
References grk::FileFormat::codeStream, and j2k_dump().
|
static |
Executes the given procedures on the given codec.
fileFormat | JPEG 2000 code stream to execute the procedures on. |
procs | the list of procedures to execute |
Referenced by grk::FileFormat::end_compress(), grk::FileFormat::end_decompress(), grk::FileFormat::read_header(), and grk::FileFormat::start_compress().
|
static |
Finds the execution function related to the given box id.
id | the id of the handler to fetch. |
References jp2_header.
Referenced by jp2_read_header_procedure().
|
static |
grk_codestream_index * grk::jp2_get_cstr_index | ( | FileFormat * | fileFormat | ) |
Get the code stream index from a JPEG2000 codec.
fileFormat | jp2 codec. |
References grk::FileFormat::codeStream, and j2k_get_cstr_index().
grk_codestream_info_v2 * grk::jp2_get_cstr_info | ( | FileFormat * | fileFormat | ) |
Get the code stream info from a JPEG2000 codec.
fileFormat | jp2 codec. |
References grk::FileFormat::codeStream, and j2k_get_cstr_info().
|
static |
Finds the image execution function related to the given box id.
id | the id of the handler to fetch. |
References jp2_img_header.
Referenced by jp2_read_header_procedure(), and jp2_read_jp2h().
|
static |
Sets up the validation ,i.e.
adds the procedures to launch to make sure the codec parameters are valid. Developers wanting to extend the library can add their own validation procedures.
References jp2_default_validation(), and grk::FileFormat::m_validation_list.
Referenced by grk::FileFormat::start_compress().
|
static |
Sets up the validation ,i.e.
adds the procedures to launch to make sure the codec parameters are valid. Developers wanting to extend the library can add their own validation procedures.
Referenced by grk::FileFormat::read_header().
|
static |
Sets up the procedures to do on reading header after the code stream.
Developers wanting to extend the library can add their own writing procedures.
References jp2_read_header_procedure(), and grk::FileFormat::m_procedure_list.
Referenced by grk::FileFormat::end_decompress().
|
static |
Sets up the procedures to do on writing header after the code stream.
Developers wanting to extend the library can add their own writing procedures.
References jp2_write_jp2c(), and grk::FileFormat::m_procedure_list.
Referenced by grk::FileFormat::end_compress().
|
static |
Sets up the procedures to do on reading header.
Developers wanting to extend the library can add their own writing procedures.
References jp2_read_header_procedure(), and grk::FileFormat::m_procedure_list.
Referenced by grk::FileFormat::read_header().
|
static |
Sets up the procedures to do on writing header.
Developers wanting to extend the library can add their own writing procedures.
References jp2_skip_jp2c(), jp2_write_ftyp(), jp2_write_jp(), jp2_write_jp2h(), jp2_write_uuids(), and grk::FileFormat::m_procedure_list.
Referenced by grk::FileFormat::start_compress().
|
static |
Reads a box header.
box | the box structure to fill. |
p_data | the character string to read data from. |
p_number_bytes_read | number of bytes read from the stream |
p_box_max_size | the maximum number of bytes in the box. |
References GRK_ERROR(), grk::grk_jp2_box::length, and grk::grk_jp2_box::type.
Referenced by jp2_read_jp2h().
|
static |
Reads a box header.
stream | the input stream to read data from. |
box | the box structure to fill. |
p_number_bytes_read | number of bytes read from the stream |
References grk::BufferedStream::get_number_byte_left(), GRK_ERROR(), grk::grk_jp2_box::length, grk::BufferedStream::read(), and grk::grk_jp2_box::type.
Referenced by jp2_read_header_procedure().
|
static |
Reads a Bit per Component box.
p_bpc_header_data | pointer to actual data (already read from file) |
fileFormat | JPEG 2000 code stream. |
bpc_header_size | the size of the bpc header |
References grk::grk_jp2_comps::bpc, grk::FileFormat::bpc, grk::FileFormat::comps, GRK_ERROR(), grk_read(), GRK_WARN(), and grk::FileFormat::numcomps.
|
static |
|
static |
Reads the Color Specification box.
p_colr_header_data | pointer to actual data (already read from file) |
fileFormat | JPEG 2000 code stream. |
colr_header_size | the size of the color header |
References grk::FileFormat::approx, grk::FileFormat::color, grk::FileFormat::enumcs, GRK_CUSTOM_CIELAB_SPACE, GRK_DEFAULT_CIELAB_SPACE, GRK_ENUM_CLRSPC_CIE, GRK_ENUM_CLRSPC_CMYK, GRK_ENUM_CLRSPC_EYCC, GRK_ENUM_CLRSPC_GRAY, GRK_ENUM_CLRSPC_SRGB, GRK_ENUM_CLRSPC_SYCC, GRK_ENUM_CLRSPC_UNKNOWN, GRK_ERROR(), GRK_WARN(), _grk_jp2_color::has_colour_specification_box, _grk_jp2_color::icc_profile_buf, _grk_jp2_color::icc_profile_len, grk::FileFormat::meth, and grk::FileFormat::precedence.
|
static |
Collect component mapping data.
fileFormat | JP2 file format |
component_mapping_header_data | component_mapping header data |
component_mapping_header_size | component_mapping header data size |
References grk::FileFormat::color, _grk_palette_data::component_mapping, GRK_ERROR(), _grk_palette_data::num_channels, and _grk_jp2_color::palette.
|
static |
Reads a a FTYP box - File type box.
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the FTYP box. |
header_size | the size of the data contained in the FTYP box. |
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the FTYP box. |
header_size | the size of the data contained in the FTYP box. |
References grk::FileFormat::brand, grk::FileFormat::cl, grk_calloc(), GRK_ERROR(), grk::FileFormat::jp2_state, JP2_STATE_FILE_TYPE, JP2_STATE_SIGNATURE, grk::FileFormat::minversion, and grk::FileFormat::numcl.
|
static |
Reads a JPEG 2000 file header structure.
fileFormat | the JPEG 2000 file header structure. |
References grk::FileFormat::codeStream, grk::CodeStream::getStream(), GRK_BOX_SIZE, grk_calloc(), GRK_ERROR(), grk_free(), grk_realloc(), GRK_WARN(), jp2_find_handler(), jp2_img_find_handler(), JP2_JP2C, jp2_read_box_hdr(), grk::FileFormat::jp2_state, JP2_STATE_CODESTREAM, JP2_STATE_FILE_TYPE, JP2_STATE_HEADER, JP2_STATE_SIGNATURE, JP2_STATE_UNKNOWN, grk::grk_jp2_box::length, and grk::grk_jp2_box::type.
Referenced by jp2_init_end_header_reading(), and jp2_init_header_reading().
|
static |
Reads a IHDR box - Image Header box.
p_image_header_data | pointer to actual data (already read from file) |
fileFormat | JPEG 2000 code stream. |
image_header_size | the size of the image header |
References grk::FileFormat::bpc, grk::FileFormat::C, grk::FileFormat::comps, GRK_ENUM_CLRSPC_CIE, GRK_ERROR(), GRK_WARN(), grk::FileFormat::h, grk::FileFormat::IPR, max_num_components, max_supported_precision, grk::FileFormat::numcomps, grk::FileFormat::UnkC, and grk::FileFormat::w.
|
static |
Reads a JPEG 2000 file signature box.
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the signature box. |
header_size | the size of the data contained in the signature box. |
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the signature box. |
header_size | the size of the data contained in the signature box. |
References GRK_ERROR(), grk::FileFormat::jp2_state, JP2_STATE_NONE, and JP2_STATE_SIGNATURE.
|
static |
Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box).
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the file header box. |
header_size | the size of the data contained in the file header box. |
fileFormat | JPEG 2000 code stream. |
p_header_data | the data contained in the file header box. |
header_size | the size of the data contained in the file header box. |
References GRK_ERROR(), JP2_IHDR, jp2_img_find_handler(), grk::FileFormat::jp2_img_state, JP2_IMG_STATE_NONE, JP2_IMG_STATE_UNKNOWN, jp2_read_box(), grk::FileFormat::jp2_state, JP2_STATE_FILE_TYPE, JP2_STATE_HEADER, grk::grk_jp2_box::length, and grk::grk_jp2_box::type.
|
static |
Collect palette data.
fileFormat | JP2 file format |
p_pclr_header_data | pclr header data |
pclr_header_size | pclr header data size |
References grk::FileFormat::alloc_palette(), grk::FileFormat::color, GRK_ERROR(), and _grk_jp2_color::palette.
|
static |
Reads a Resolution box.
p_resolution_data | pointer to actual data (already read from file) |
fileFormat | JPEG 2000 code stream. |
resolution_size | the size of the image header |
References calc_res(), grk::FileFormat::capture_resolution, grk::FileFormat::display_resolution, GRK_ERROR(), GRK_RESOLUTION_BOX_SIZE, grk::FileFormat::has_capture_resolution, grk::FileFormat::has_display_resolution, JP2_CAPTURE_RES, JP2_DISPLAY_RES, and jp2_read_res_box().
|
static |
Referenced by jp2_read_res().
|
static |
Read a UUID box.
fileFormat | JPEG 2000 file codec. |
p_header_data | pointer to actual data (already read from file) |
header_data_size | size of data |
References GRK_WARN(), JP2_MAX_NUM_UUIDS, grk::FileFormat::numUuids, and grk::FileFormat::uuids.
|
static |
Read XML box.
fileFormat | JPEG 2000 file codec. |
p_xml_data | pointer to actual data (already read from file) |
xml_size | size of the xml data |
References grk::grk_jp2_buffer::alloc(), grk::grk_jp2_buffer::buffer, grk::grk_jp2_buffer::len, and grk::FileFormat::xml.
|
static |
|
static |
Writes the Bit per Component box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References grk::grk_jp2_comps::bpc, grk::FileFormat::comps, grk_calloc(), grk_write(), JP2_BPCC, and grk::FileFormat::numcomps.
Referenced by jp2_write_jp2h().
|
static |
Write buffer box.
boxId | box id. |
buffer | buffer with data |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References grk::grk_jp2_buffer::buffer, grk_calloc(), and grk::grk_jp2_buffer::len.
Referenced by jp2_write_xml().
|
static |
Writes the Channel Definition box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References _grk_channel_description::asoc, _grk_jp2_color::channel_definition, _grk_channel_description::cn, grk::FileFormat::color, _grk_channel_definition::descriptions, grk_malloc(), JP2_CDEF, _grk_channel_definition::num_channel_descriptions, and _grk_channel_description::typ.
Referenced by jp2_write_jp2h().
|
static |
Writes the Colour Specification box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References grk::FileFormat::approx, grk::FileFormat::color, grk::FileFormat::enumcs, grk_calloc(), _grk_jp2_color::icc_profile_buf, _grk_jp2_color::icc_profile_len, JP2_COLR, grk::FileFormat::meth, and grk::FileFormat::precedence.
Referenced by jp2_write_jp2h().
|
static |
References grk::FileFormat::color, grk_malloc(), JP2_CMAP, _grk_palette_data::num_channels, and _grk_jp2_color::palette.
Referenced by jp2_write_jp2h().
|
static |
Writes a FTYP box - File type box.
fileFormat | JPEG 2000 code stream. |
References grk::FileFormat::brand, grk::FileFormat::cl, grk::FileFormat::codeStream, grk::CodeStream::getStream(), GRK_ERROR(), JP2_FTYP, grk::FileFormat::minversion, and grk::FileFormat::numcl.
Referenced by jp2_init_header_writing().
|
static |
Writes the Image Header box - Image Header box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References grk::FileFormat::bpc, grk::FileFormat::C, grk_calloc(), grk::FileFormat::h, grk::FileFormat::IPR, JP2_IHDR, grk::FileFormat::numcomps, grk::FileFormat::UnkC, and grk::FileFormat::w.
Referenced by jp2_write_jp2h().
|
static |
Writes a JPEG 2000 file signature box.
fileFormat | JPEG 2000 code stream. |
References grk::FileFormat::codeStream, grk::CodeStream::getStream(), and JP2_JP.
Referenced by jp2_init_header_writing().
|
static |
Writes the Jpeg2000 code stream Header box - JP2C Header box.
This function must be called AFTER the coding has been done.
fileFormat | JPEG 2000 code stream. |
References grk::FileFormat::codeStream, grk::CodeStream::getStream(), GRK_ERROR(), grk::FileFormat::j2k_codestream_offset, JP2_JP2C, and grk::FileFormat::needs_xl_jp2c_box_length.
Referenced by jp2_init_end_header_writing().
|
static |
References grk::FileFormat::bpc, grk::grk_jp2_buffer::buffer, grk::FileFormat::capture_resolution, _grk_jp2_color::channel_definition, grk::FileFormat::codeStream, grk::FileFormat::color, grk::FileFormat::display_resolution, grk::CodeStream::getStream(), GRK_ERROR(), grk_free(), grk::grk_jp2_img_header_writer_handler::handler, grk::FileFormat::has_capture_resolution, grk::FileFormat::has_display_resolution, JP2_JP2H, jp2_write_bpc(), jp2_write_channel_definition(), jp2_write_colr(), jp2_write_component_mapping(), jp2_write_ihdr(), jp2_write_palette_clr(), jp2_write_res(), jp2_write_xml(), grk::grk_jp2_buffer::len, grk::grk_jp2_img_header_writer_handler::m_data, _grk_jp2_color::palette, and grk::FileFormat::xml.
Referenced by jp2_init_header_writing().
|
static |
References grk::FileFormat::color, grk_malloc(), JP2_PCLR, and _grk_jp2_color::palette.
Referenced by jp2_write_jp2h().
|
static |
Writes the Resolution box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References grk::FileFormat::capture_resolution, grk::FileFormat::display_resolution, grk_calloc(), GRK_RESOLUTION_BOX_SIZE, JP2_CAPTURE_RES, JP2_DISPLAY_RES, JP2_RES, and jp2_write_res_box().
Referenced by jp2_write_jp2h().
|
static |
References find_cf(), and GRK_RESOLUTION_BOX_SIZE.
Referenced by jp2_write_res().
|
static |
References grk::FileFormat::codeStream, grk::CodeStream::getStream(), JP2_UUID, grk::FileFormat::numUuids, and grk::FileFormat::uuids.
Referenced by jp2_init_header_writing().
|
static |
Write XML box.
fileFormat | JPEG 2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References jp2_write_buffer(), JP2_XML, and grk::FileFormat::xml.
Referenced by jp2_write_jp2h().
|
noexcept |
|
static |
LUP decomposition.
Referenced by matrix_inversion_f().
|
static |
LUP inversion (call with the result of lupDecompose)
References lupSolve().
Referenced by matrix_inversion_f().
|
static |
LUP solving.
Referenced by lupInvert().
|
static |
References grk::Decompress97::absoluteStart, grk::Decompress97::boundaryData, grk::dwt_data< T >::cas, grk::Decompress97::data, grk::dwt_data< T >::dn, grk::Decompress97::len, grk::Decompress97::lenMax, grk::dwt_data< T >::mem, grk::dwt_data< T >::sn, grk::dwt_data< T >::win_h_0, grk::dwt_data< T >::win_h_1, grk::dwt_data< T >::win_l_0, and grk::dwt_data< T >::win_l_1.
Referenced by decompress_step_97().
|
static |
Calculate a n x n double matrix inversion with a LUP method.
Matrix inversion.
Data is aligned, rows after rows (or columns after columns). The function does not take ownership of any memory block, data must be freed by the user.
pSrcMatrix | the matrix to invert. |
pDestMatrix | data to store the inverted matrix. |
n | size of the matrix |
References grk_free(), grk_malloc(), lupDecompose(), and lupInvert().
Referenced by grk::CodeStream::init_compress().
uint32_t grk::max_resolution | ( | Resolution *GRK_RESTRICT | r, |
uint32_t | i | ||
) |
Referenced by decompress_partial_tile(), decompress_tile_53(), decompress_tile_97(), and grk::WaveletForward< DWT >::run().
|
static |
References grk::MemStream::buf, close_fd(), grk::MemStream::fd, GRK_ERROR(), grk::MemStream::len, and unmap().
Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().
void grk::minpf_cleanup_plugin_manager | ( | void | ) |
References grk::minpf_plugin_manager::dynamic_libraries, grk::minpf_plugin_manager::exit_functions, 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().
const char * grk::minpf_get_dynamic_library_extension | ( | void | ) |
Referenced by grk_plugin_load(), and minpf_load_from_dir().
bool grk::minpf_get_full_path | ( | const char * | path, |
void * | addr, | ||
dynamic_handle_t | handle, | ||
char * | fullPath, | ||
size_t | fullPathLen | ||
) |
References ojph::error.
Referenced by minpf_load().
minpf_plugin_manager * grk::minpf_get_plugin_manager | ( | void | ) |
References 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().
void * grk::minpf_get_symbol | ( | minpf_dynamic_library * | library, |
const char * | symbol | ||
) |
References grk::minpf_dynamic_library::handle.
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().
PLUGIN_API minpf_exit_func grk::minpf_init_plugin | ( | const char * | pluginPath, |
const minpf_platform_services * | params | ||
) |
void grk::minpf_initialize_plugin_manager | ( | minpf_plugin_manager * | manager | ) |
References grk::minpf_platform_services::invokeService, grk::minpf_plugin_api_version::major, grk::minpf_plugin_api_version::minor, minpf_register_object(), grk::minpf_plugin_manager::platformServices, grk::minpf_plugin_manager::plugins, grk::minpf_platform_services::registerObject, and grk::minpf_platform_services::version.
Referenced by minpf_get_plugin_manager().
|
static |
References grk::minpf_register_params::createFunc, and grk::minpf_register_params::destroyFunc.
Referenced by minpf_register_object().
|
static |
References grk::minpf_plugin_manager::dynamic_libraries, grk::minpf_dynamic_library::handle, minpf_get_full_path(), minpf_get_plugin_manager(), minpf_get_symbol(), minpf_load_dynamic_library(), MINPF_MAX_PLUGINS, minpf_post_load_plugin(), minpf_unload_dynamic_library(), and grk::minpf_plugin_manager::num_libraries.
Referenced by minpf_load_from_dir(), and minpf_load_from_path().
minpf_dynamic_library * grk::minpf_load_dynamic_library | ( | const char * | path, |
char * | error | ||
) |
References ojph::error, grk::minpf_dynamic_library::handle, and grk::minpf_dynamic_library::path.
Referenced by minpf_load().
int32_t grk::minpf_load_from_dir | ( | const char * | directory_path, |
minpf_invoke_service_func | func | ||
) |
int32_t grk::minpf_load_from_path | ( | const char * | path, |
minpf_invoke_service_func | func | ||
) |
References grk::minpf_platform_services::invokeService, minpf_get_plugin_manager(), minpf_load(), and grk::minpf_plugin_manager::platformServices.
Referenced by grk_plugin_load().
|
static |
int32_t grk::minpf_register_object | ( | const char * | id, |
const minpf_register_params * | params | ||
) |
References grk::minpf_plugin_api_version::major, minpf_get_plugin_manager(), minpf_is_valid_plugin(), grk::minpf_plugin_manager::platformServices, grk::minpf_plugin_manager::plugins, grk::minpf_register_params::version, and grk::minpf_platform_services::version.
Referenced by minpf_initialize_plugin_manager().
bool grk::minpf_unload_dynamic_library | ( | minpf_dynamic_library * | library | ) |
References grk::minpf_dynamic_library::handle.
Referenced by minpf_cleanup_plugin_manager(), and minpf_load().
void grk::mqc_bypass_enc | ( | mqcoder * | mqc, |
uint32_t | d | ||
) |
void grk::mqc_bypass_flush_enc | ( | mqcoder * | mqc, |
bool | erterm | ||
) |
References grk::mqcoder::bp, grk::mqcoder::c, and grk::mqcoder::ct.
Referenced by grk::T1::compress_cblk().
uint32_t grk::mqc_bypass_get_extra_bytes_enc | ( | mqcoder * | mqc, |
bool | erterm | ||
) |
References grk::mqcoder::bp, and grk::mqcoder::ct.
Referenced by grk::T1::compress_cblk().
void grk::mqc_bypass_init_enc | ( | mqcoder * | mqc | ) |
References grk::mqcoder::bp, BYPASS_CT_INIT, grk::mqcoder::c, grk::mqcoder::ct, and grk::mqcoder::start.
Referenced by grk::T1::compress_cblk().
void grk::mqc_byteout | ( | mqcoder * | mqc | ) |
References grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, and grk::mqcoder::start.
Referenced by mqc_erterm_enc(), mqc_flush_enc(), and mqc_renorm_enc().
|
static |
References grk::mqcoder::a, grk::mqcoder::c, grk::mqcoder::curctx, and mqc_renorm_enc().
Referenced by mqc_encode().
|
static |
References grk::mqcoder::a, grk::mqcoder::c, grk::mqcoder::curctx, and mqc_renorm_enc().
Referenced by mqc_encode().
void grk::mqc_encode | ( | mqcoder * | mqc, |
uint32_t | d | ||
) |
References grk::mqcoder::curctx, mqc_codelps_enc(), and mqc_codemps_enc().
Referenced by mqc_segmark_enc().
void grk::mqc_erterm_enc | ( | mqcoder * | mqc | ) |
References grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, and mqc_byteout().
Referenced by grk::T1::compress_cblk().
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()
mqc | MQC handle |
References grk::mqcoder::backup, grk::mqcoder::end, and grk_cblk_dec_compressed_data_pad_right.
Referenced by grk::T1::decompress_cblk().
void grk::mqc_flush_enc | ( | mqcoder * | mqc | ) |
References grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, mqc_byteout(), and mqc_setbits_enc().
Referenced by grk::T1::compress_cblk().
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.
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::mqcoder::a, A_MIN, grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, grk::mqcoder::end_of_byte_stream_counter, mqc_bytein(), mqc_init_dec_common(), and mqc_setcurctx.
Referenced by grk::T1::decompress_cblk().
|
static |
References grk::mqcoder::backup, grk::mqcoder::bp, grk::mqcoder::end, grk_cblk_dec_compressed_data_pad_right, and grk::mqcoder::start.
Referenced by mqc_init_dec(), and mqc_raw_init_dec().
void grk::mqc_init_enc | ( | mqcoder * | mqc, |
uint8_t * | bp | ||
) |
References grk::mqcoder::a, grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, grk::mqcoder::end_of_byte_stream_counter, mqc_setcurctx, and grk::mqcoder::start.
Referenced by grk::T1::compress_cblk().
void grk::mqc_next_plane | ( | grk_plugin_debug_mqc * | mqc | ) |
uint32_t grk::mqc_numbytes_enc | ( | mqcoder * | mqc | ) |
References grk::mqcoder::bp, and grk::mqcoder::start.
Referenced by grk::T1::compress_cblk().
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.
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::mqcoder::c, grk::mqcoder::ct, and mqc_init_dec_common().
Referenced by grk::T1::decompress_cblk().
|
static |
References grk::mqcoder::a, grk::mqcoder::c, grk::mqcoder::ct, and mqc_byteout().
Referenced by mqc_codelps_enc(), and mqc_codemps_enc().
void grk::mqc_resetstates | ( | mqcoder * | mqc | ) |
References grk::mqcoder::ctxs, 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().
void grk::mqc_restart_init_enc | ( | mqcoder * | mqc | ) |
References grk::mqcoder::a, grk::mqcoder::bp, grk::mqcoder::c, grk::mqcoder::ct, and grk::mqcoder::start.
Referenced by grk::T1::compress_cblk().
void grk::mqc_segmark_enc | ( | mqcoder * | mqc | ) |
References mqc_encode(), and mqc_setcurctx.
Referenced by grk::T1::compress_cblk().
|
static |
References grk::mqcoder::a, and grk::mqcoder::c.
Referenced by mqc_flush_enc().
|
inline |
Referenced by grk::Resolution::init().
|
inline |
void grk::nextCXD | ( | grk_plugin_debug_mqc * | mqc, |
uint32_t | d | ||
) |
|
static |
References get_file_open_mode(), and GRK_ERROR().
Referenced by create_mapped_file_read_stream(), and create_mapped_file_write_stream().
|
static |
Check packet iterator's nexxt level.
References GRK_LRCP, GRK_RLCP, grk::TileCodingParams::pocs, and grk::CodingParams::tcps.
Referenced by pi_enable_tile_part_generation().
|
static |
Allocates memory for a packet iterator.
Data and data sizes are set by this operation. No other data is set. The include section of the packet iterator is not allocated.
p_image | the image used to initialize the packet iterator (in fact only the number of components is relevant. |
p_cp | the coding parameters. |
tileno | the index of the tile from which creating the packet iterator. |
References grk::PacketIter::comps, grk_calloc(), _grk_image::numcomps, grk::TileCodingParams::numpocs, grk::grk_pi_comp::numresolutions, pi_destroy(), grk::grk_pi_comp::resolutions, grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by pi_create_compress(), and pi_create_decompress().
PacketIter * grk::pi_create_compress | ( | const grk_image * | image, |
CodingParams * | cp, | ||
uint16_t | tileno, | ||
J2K_T2_MODE | t2_mode, | ||
std::vector< uint8_t * > * | include | ||
) |
Creates a packet iterator for compressing.
image | the image being encoded. |
cp | the coding parameters. |
tileno | index of the tile being encoded. |
t2_mode | the type of pass for generating the packet iterator |
include | vector of include buffers, one per layer |
References _grk_image::comps, _grk_image_comp::dx, FINAL_PASS, grk_free(), grk_get_all_encoding_parameters(), GRK_IS_CINEMA, GRK_J2K_MAXRLVLS, grk_malloc(), grk::CodingParams::m_coding_params, grk::CodingParams::m_enc, grk::EncodingParams::m_tp_on, _grk_image::numcomps, grk::TileCodingParams::numpocs, pi_create(), pi_update_encode_no_poc(), pi_update_encode_poc_and_final(), grk::CodingParams::rsiz, grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by grk::T2Compress::compress_packets(), and grk::T2Compress::compress_packets_simulate().
PacketIter * grk::pi_create_decompress | ( | grk_image * | image, |
CodingParams * | cp, | ||
uint16_t | tileno, | ||
std::vector< uint8_t * > * | include | ||
) |
Create a packet iterator for Decoder.
image | Raw image for which the packets will be listed |
cp | Coding parameters |
tileno | Number that identifies the tile for which to list the packets |
include | vector of include buffers, one per layer |
References _grk_image::comps, _grk_image_comp::dx, grk_free(), grk_get_all_encoding_parameters(), GRK_J2K_MAXRLVLS, grk_malloc(), _grk_image::numcomps, grk::TileCodingParams::numpocs, pi_create(), pi_update_decode_no_poc(), pi_update_decode_poc(), grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by grk::T2Decompress::decompress_packets().
void grk::pi_destroy | ( | PacketIter * | p_pi | ) |
Destroys a packet iterator array.
p_pi | the packet iterator array to destroy. |
References grk::PacketIter::destroy_include().
Referenced by grk::T2Compress::compress_packets(), grk::T2Compress::compress_packets_simulate(), grk::T2Decompress::decompress_packets(), and pi_create().
void grk::pi_enable_tile_part_generation | ( | PacketIter * | pi, |
CodingParams * | cp, | ||
uint16_t | tileno, | ||
uint32_t | pino, | ||
bool | first_poc_tile_part, | ||
uint32_t | tppos, | ||
J2K_T2_MODE | t2_mode | ||
) |
Modify the packet iterator for enabling tile part generation.
pi | Handle to the packet iterator generated in pi_initialise_encode |
cp | Coding parameters |
tileno | Number that identifies the tile for which to list the packets |
pino | packet iterator number |
first_poc_tile_part | true for first POC tile part |
tppos | The position of the tile part flag in the progression order |
t2_mode | T2 mode |
References _grk_poc::compno0, _grk_poc::compno1, FINAL_PASS, grk::PacketIter::first, GRK_IS_CINEMA, GRK_IS_IMF, GRK_LRCP, GRK_RLCP, j2k_convert_progression_order(), _grk_poc::layno0, _grk_poc::layno1, grk::CodingParams::m_coding_params, grk::CodingParams::m_enc, grk::EncodingParams::m_tp_on, pi_check_next_level(), grk::PacketIter::poc, grk::TileCodingParams::pocs, _grk_poc::precno0, _grk_poc::precno1, _grk_poc::prg, _grk_poc::resno0, _grk_poc::resno1, grk::CodingParams::rsiz, grk::CodingParams::tcps, _grk_poc::tx0, _grk_poc::tx1, _grk_poc::ty0, and _grk_poc::ty1.
Referenced by grk::T2Compress::compress_packets(), and grk::T2Compress::compress_packets_simulate().
bool grk::pi_next | ( | PacketIter * | pi | ) |
Modify the packet iterator to point to the next packet.
pi | Packet iterator to modify |
References GRK_CPRL, GRK_LRCP, GRK_PCRL, GRK_RLCP, GRK_RPCL, pi_next_cprl(), pi_next_lrcp(), pi_next_pcrl(), pi_next_rlcp(), pi_next_rpcl(), grk::PacketIter::poc, and _grk_poc::prg.
Referenced by grk::T2Compress::compress_packets(), grk::T2Compress::compress_packets_simulate(), and grk::T2Decompress::decompress_packets().
|
static |
Get next packet in component-precinct-resolution-layer order.
pi | packet iterator to modify |
References grk::PacketIter::compno, _grk_poc::compno0, _grk_poc::compno1, grk::PacketIter::comps, grk::PacketIter::dx, grk::PacketIter::dy, grk::PacketIter::first, GRK_ERROR(), grk::PacketIter::layno, _grk_poc::layno0, _grk_poc::layno1, grk::PacketIter::numcomps, grk::grk_pi_comp::numresolutions, pi_next_l(), grk::PacketIter::poc, grk::PacketIter::resno, _grk_poc::resno0, _grk_poc::resno1, grk::PacketIter::tp_on, grk::PacketIter::tx0, _grk_poc::tx0, grk::PacketIter::tx1, _grk_poc::tx1, grk::PacketIter::ty0, _grk_poc::ty0, grk::PacketIter::ty1, _grk_poc::ty1, grk::PacketIter::update_include(), update_pi_dxy_for_comp(), grk::PacketIter::x, and grk::PacketIter::y.
Referenced by pi_next().
|
static |
References grk::PacketIter::compno, grk::PacketIter::comps, GRK_ERROR(), GRK_J2K_MAXRLVLS, grk::PacketIter::numcomps, grk::PacketIter::precinctIndex, grk::PacketIter::resno, grk::PacketIter::tx0, grk::PacketIter::tx1, grk::PacketIter::ty0, grk::PacketIter::ty1, uint_floordivpow2(), grk::PacketIter::x, and grk::PacketIter::y.
Referenced by pi_next_cprl(), pi_next_pcrl(), and pi_next_rpcl().
|
static |
Get next packet in layer-resolution-component-precinct order.
pi | packet iterator to modify |
References grk::PacketIter::compno, _grk_poc::compno0, _grk_poc::compno1, grk::PacketIter::comps, grk::PacketIter::first, GRK_ERROR(), grk::PacketIter::layno, _grk_poc::layno0, _grk_poc::layno1, grk::PacketIter::numcomps, grk::grk_pi_comp::numresolutions, grk::grk_pi_resolution::ph, grk::PacketIter::poc, grk::PacketIter::precinctIndex, _grk_poc::precno0, _grk_poc::precno1, grk::grk_pi_resolution::pw, grk::PacketIter::resno, _grk_poc::resno0, _grk_poc::resno1, grk::grk_pi_comp::resolutions, grk::PacketIter::tp_on, and grk::PacketIter::update_include().
Referenced by pi_next().
|
static |
Get next packet in precinct-component-resolution-layer order.
pi | packet iterator to modify |
References grk::PacketIter::compno, _grk_poc::compno0, _grk_poc::compno1, grk::PacketIter::comps, grk::PacketIter::dx, grk::PacketIter::dy, grk::PacketIter::first, GRK_ERROR(), grk::PacketIter::layno, _grk_poc::layno0, _grk_poc::layno1, grk::PacketIter::numcomps, grk::grk_pi_comp::numresolutions, pi_next_l(), grk::PacketIter::poc, grk::PacketIter::resno, _grk_poc::resno0, _grk_poc::resno1, grk::PacketIter::tp_on, grk::PacketIter::tx0, _grk_poc::tx0, grk::PacketIter::tx1, _grk_poc::tx1, grk::PacketIter::ty0, _grk_poc::ty0, grk::PacketIter::ty1, _grk_poc::ty1, grk::PacketIter::update_include(), update_pi_dxy(), grk::PacketIter::x, and grk::PacketIter::y.
Referenced by pi_next().
|
static |
Get next packet in resolution-layer-component-precinct order.
pi | packet iterator to modify |
References grk::PacketIter::compno, _grk_poc::compno0, _grk_poc::compno1, grk::PacketIter::comps, grk::PacketIter::first, GRK_ERROR(), grk::PacketIter::layno, _grk_poc::layno0, _grk_poc::layno1, grk::PacketIter::numcomps, grk::grk_pi_comp::numresolutions, grk::grk_pi_resolution::ph, grk::PacketIter::poc, grk::PacketIter::precinctIndex, _grk_poc::precno0, _grk_poc::precno1, grk::grk_pi_resolution::pw, grk::PacketIter::resno, _grk_poc::resno0, _grk_poc::resno1, grk::grk_pi_comp::resolutions, grk::PacketIter::tp_on, and grk::PacketIter::update_include().
Referenced by pi_next().
|
static |
Get next packet in resolution-precinct-component-layer order.
pi | packet iterator to modify |
References grk::PacketIter::compno, _grk_poc::compno0, _grk_poc::compno1, grk::PacketIter::dx, grk::PacketIter::dy, grk::PacketIter::first, grk::PacketIter::layno, _grk_poc::layno0, _grk_poc::layno1, pi_next_l(), grk::PacketIter::poc, grk::PacketIter::resno, _grk_poc::resno0, _grk_poc::resno1, grk::PacketIter::tp_on, grk::PacketIter::tx0, _grk_poc::tx0, grk::PacketIter::tx1, _grk_poc::tx1, grk::PacketIter::ty0, _grk_poc::ty0, grk::PacketIter::ty1, _grk_poc::ty1, grk::PacketIter::update_include(), update_pi_dxy(), grk::PacketIter::x, and grk::PacketIter::y.
Referenced by pi_next().
|
static |
Update decompress packet iterator with no POC.
References grk::TileCodingParams::numlayers, grk::TileCodingParams::numpocs, grk::PacketIter::poc, grk::TileCodingParams::prg, and _grk_poc::prg.
Referenced by pi_create_decompress().
|
static |
Upgrade decompress packet iterator with POC.
References grk::TileCodingParams::numlayers, grk::TileCodingParams::numpocs, grk::TileCodingParams::pocs, and _grk_poc::prg.
Referenced by pi_create_decompress().
|
static |
Updates the coding parameters if the compressing is not used with Progression order changes and final (and cinema parameters are used).
p_cp | the coding parameters to modify |
num_comps | the number of components |
tileno | the tile index being concerned. |
tx0 | X0 parameter for the tile |
tx1 | X1 parameter for the tile |
ty0 | Y0 parameter for the tile |
ty1 | Y1 parameter for the tile |
max_precincts | the maximum number of precincts for all the bands of the tile |
max_res | the maximum number of resolutions for all the poc inside the tile. |
dx_min | the minimum dx of all the components of all the resolutions for the tile. |
dy_min | the minimum dy of all the components of all the resolutions for the tile. |
References grk::TileCodingParams::numpocs, grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by pi_create_compress(), and pi_update_encoding_parameters().
|
static |
Updates the coding parameters if the compressing is used with Progression order changes and final (or cinema parameters are used).
p_cp | the coding parameters to modify |
tileno | the tile index being concerned. |
tx0 | X0 parameter for the tile |
tx1 | X1 parameter for the tile |
ty0 | Y0 parameter for the tile |
ty1 | Y1 parameter for the tile |
max_precincts | the maximum number of precincts for all the bands of the tile |
dx_min | the minimum dx of all the components of all the resolutions for the tile. |
dy_min | the minimum dy of all the components of all the resolutions for the tile. |
References grk::TileCodingParams::numpocs, grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by pi_create_compress(), and pi_update_encoding_parameters().
void grk::pi_update_encoding_parameters | ( | const grk_image * | p_image, |
CodingParams * | p_cp, | ||
uint16_t | tile_no | ||
) |
Updates the compressing parameters of the codec.
p_image | the image being encoded. |
p_cp | the coding parameters. |
tile_no | index of the tile being encoded. |
References grk_get_encoding_parameters(), _grk_image::numcomps, pi_update_encode_no_poc(), pi_update_encode_poc_and_final(), grk::CodingParams::t_grid_height, and grk::CodingParams::tcps.
Referenced by j2k_calculate_tp().
|
static |
|
static |
References grk::MemStream::buf, grk::MemStream::len, and grk::MemStream::off.
Referenced by set_up_mem_stream().
T grk::sat_add | ( | int64_t | lhs, |
int64_t | rhs | ||
) |
T grk::sat_add | ( | T | lhs, |
T | rhs | ||
) |
T grk::sat_sub | ( | int64_t | lhs, |
int64_t | rhs | ||
) |
T grk::sat_sub | ( | T | lhs, |
T | rhs | ||
) |
|
static |
References grk::MemStream::len, and grk::MemStream::off.
Referenced by set_up_mem_stream().
void grk::set_context_stream | ( | TileProcessor * | p_tileProcessor | ) |
References _grk_plugin_resolution::band, grk::Resolution::band, _grk_plugin_precinct::blocks, grk::grk_tile::comps, _grk_plugin_code_block::contextStream, grk::TileProcessor::current_plugin_tile, grk::grk_tile::numcomps, _grk_plugin_band::precincts, grk_plugin_tile_component::resolutions, grk::TileComponent::resolutions, grk::TileProcessor::tile, and _grk_plugin_tile::tileComponents.
Referenced by grk::TileProcessor::do_compress().
void grk::set_up_mem_stream | ( | grk_stream * | l_stream, |
size_t | len, | ||
bool | is_read_stream | ||
) |
References 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().
|
static |
Referenced by create_mapped_file_read_stream().
bool grk::tile_equals | ( | grk_plugin_tile * | plugin_tile, |
grk_tile * | p_tile | ||
) |
References _grk_plugin_resolution::band, grk::grk_tile::comps, grk_plugin_get_debug_state(), GRK_PLUGIN_STATE_DEBUG, _grk_plugin_tile::numComponents, grk::grk_tile::numcomps, _grk_plugin_band::numPrecincts, grk_plugin_tile_component::resolutions, and _grk_plugin_tile::tileComponents.
Referenced by grk::TileProcessor::init().
Transfer data from src to dest for each component, and null out src data.
Assumption: src and dest have the same number of components
References _grk_image::comps, grk_image_single_component_data_free(), and _grk_image::numcomps.
Referenced by grk::CodeStream::do_decompress().
|
inlinestatic |
Divide a 64-bit integer by a power of 2 and round upwards.
a | 64-bit integer |
b | power of two |
|
inlinestatic |
Divide an unsigned integer by a power of 2 and round downwards.
Referenced by grk_get_all_encoding_parameters(), grk_get_encoding_parameters(), grk::TileComponent::init(), grk::PrecinctImpl::init(), grk::Resolution::init(), pi_next_l(), and grk::SparseBuffer< LBW, LBH >::SparseBuffer().
|
static |
Referenced by mem_map_free().
|
static |
References update_flags_macro.
Referenced by grk::T1::dec_sigpass_step_raw(), and grk::T1::enc_clnpass().
|
static |
References _grk_image::comps, GRK_ERROR(), _grk_image::numcomps, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.
Referenced by grk::CodeStream::set_decompress_window().
|
static |
References grk::PacketIter::comps, grk::PacketIter::dx, grk::PacketIter::dy, grk::PacketIter::first, grk::PacketIter::numcomps, and update_pi_dxy_for_comp().
Referenced by pi_next_pcrl(), and pi_next_rpcl().
|
static |
References grk::grk_pi_comp::dx, grk::PacketIter::dx, grk::grk_pi_comp::dy, grk::PacketIter::dy, grk::grk_pi_comp::numresolutions, and grk::grk_pi_comp::resolutions.
Referenced by pi_next_cprl(), and update_pi_dxy().
void grk::usage | ( | void | ) |
Referenced by grk::GrokOutput::usage().
|
static |
References grk::MemStream::buf, grk::MemStream::len, and grk::MemStream::off.
Referenced by set_up_mem_stream().
|
static |
References grk::MemStream::buf, grk::MemStream::len, and grk::MemStream::off.
Referenced by set_up_mem_stream().
const uint32_t grk::A_MIN = 0x8000 |
Referenced by mqc_init_dec().
const uint32_t grk::available_packet_len_bytes_per_plt = USHRT_MAX - 1 - 4 |
Referenced by grk::PacketLengthMarkers::write_marker_header().
const uint32_t grk::BAND_RES_ZERO_INDEX_LL = 0 |
|
static |
Referenced by decompress_step_97().
const uint32_t grk::cod_coc_len = 5U |
Referenced by j2k_read_cod(), and j2k_write_coc().
const size_t grk::default_align = 64 |
Referenced by grk::grk_buffer_2d< T >::alloc(), grk_aligned_malloc(), and grk_image_single_component_data_alloc().
const uint32_t grk::default_header_size = 1000 |
Referenced by grk::CodeStream::process_marker().
const uint32_t grk::default_number_mcc_records = 10 |
Referenced by j2k_read_mcc(), and grk::SIZMarker::read().
const uint32_t grk::default_number_mct_records = 10 |
Referenced by j2k_init_mct_encoding(), j2k_read_mct(), and grk::SIZMarker::read().
const uint32_t grk::default_numbers_segments = 10 |
Referenced by grk::DecompressCodeblock::alloc(), and grk::T2Decompress::init_seg().
|
static |
Referenced by decompress_step_97().
|
static |
Referenced by decompress_step_97().
|
static |
Referenced by decompress_step_97().
|
static |
Referenced by decompress_step_97().
const uint32_t grk::grk_alignment = 32 |
Referenced by grk_make_aligned_width().
const uint32_t grk::GRK_COMP_PARAM_DEFAULT_CBLOCKH = 64 |
Referenced by grk_set_default_compress_params(), and grk::Profile::set_imf_parameters().
const uint32_t grk::GRK_COMP_PARAM_DEFAULT_CBLOCKW = 64 |
Referenced by grk_set_default_compress_params(), and grk::Profile::set_imf_parameters().
const uint32_t grk::GRK_COMP_PARAM_DEFAULT_NUMRESOLUTION = 6 |
const GRK_PROG_ORDER grk::GRK_COMP_PARAM_DEFAULT_PROG_ORDER = GRK_LRCP |
Referenced by grk_set_default_compress_params(), and grk::Profile::set_imf_parameters().
const uint32_t grk::grk_marker_length = 4U |
Referenced by grk::SOTMarker::get_sot_values(), and grk::CodeStream::parse_tile_header_markers().
const double grk::invScale = log(2) / 256 |
Referenced by grk::RateControl::slopeFromLog().
const uint8_t grk::IPTC_UUID[16] |
Referenced by grk::FileFormat::init_compress(), and grk::FileFormat::read_header().
|
static |
Referenced by j2k_add_mct().
|
static |
Referenced by j2k_add_mct().
|
static |
Referenced by j2k_init_mct_encoding().
|
static |
Referenced by j2k_convert_progression_order().
|
static |
Referenced by jp2_find_handler().
|
static |
Referenced by jp2_img_find_handler().
|
static |
const uint32_t grk::k_max_bit_planes = 31-T1_NMSEDEC_FRACBITS |
Referenced by grk::T1::decompress_cblk().
minpf_plugin_manager* grk::managerInstance |
Referenced by minpf_cleanup_plugin_manager(), and minpf_get_plugin_manager().
const uint32_t grk::max_num_components = 16384 |
Referenced by grk::CodeStream::init_compress(), jp2_read_ihdr(), and grk::SIZMarker::read().
const uint32_t grk::max_num_tile_parts = 65535 |
Referenced by j2k_calculate_tp().
const uint32_t grk::max_num_tile_parts_per_tile = 255 |
Referenced by j2k_calculate_tp(), and grk::CodeStream::post_write_tile().
const uint32_t grk::max_num_tiles = 65535 |
Referenced by grk::CodeStream::compress(), and grk::SIZMarker::read().
const uint32_t grk::max_passes_per_segment = (max_precision_jpeg_2000-1) * 3 +1 |
Referenced by grk::T2Decompress::init_seg(), and grk::T2Decompress::read_packet_header().
const uint32_t grk::max_precision_jpeg_2000 = 38 |
Referenced by grk::T2Decompress::read_packet_header().
const uint32_t grk::max_supported_precision = 16 |
Referenced by jp2_read_ihdr(), and grk::SIZMarker::read().
const uint32_t grk::max_tile_part_size = UINT_MAX |
const uint32_t grk::MCT_ELEMENT_SIZE[] = { 2, 4, 4, 8 } |
Referenced by j2k_add_mct(), and j2k_init_mct_encoding().
|
static |
Referenced by grk::mct::get_norms_irrev().
|
static |
Referenced by grk::mct::get_norms_rev().
const uint32_t grk::min_packets_per_full_plt = available_packet_len_bytes_per_plt / 5 |
|
static |
Referenced by mqc_resetstates().
|
static |
|
static |
Referenced by nextCXD().
|
static |
Referenced by mqc_next_plane().
const double grk::scale = 256 / log(2) |
Referenced by grk::RateControl::slopeFromLog(), and grk::RateControl::slopeToLog().
const double grk::shift = 1 << 16 |
Referenced by grk::mct::decompress_dc_shift_irrev(), grk::mct::decompress_dc_shift_rev(), grk::mct::decompress_irrev(), grk::mct::decompress_rev(), grk::TileProcessor::is_whole_tilecomp_decoding(), grk::t1_ht::T1HT::preCompress(), grk::RateControl::slopeFromLog(), grk::RateControl::slopeToLog(), and grk::PacketIter::update_include().
const double grk::slopeCutoff = pow(2, 64) |
Referenced by grk::RateControl::slopeFromLog(), and grk::RateControl::slopeToLog().
const uint32_t grk::sot_marker_segment_len = 12U |
const uint32_t grk::SPCod_SPCoc_len = 5U |
Referenced by j2k_get_SPCod_SPCoc_size(), and j2k_read_SPCod_SPCoc().
|
static |
Referenced by grk::Profile::is_imf_compliant().
const uint32_t grk::tag_tree_uninitialized_node_value = 999 |
const uint32_t grk::tlm_len_per_tile_part = 5 |
Referenced by grk::TileLengthMarkers::write_begin().
const uint32_t grk::tlm_marker_start_bytes = 6 |
const uint8_t grk::XMP_UUID[16] |
Referenced by grk::FileFormat::init_compress(), and grk::FileFormat::read_header().