Grok 12.0.1
|
#include "grk_config.h"
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <limits.h>
Go to the source code of this file.
Classes | |
struct | _grk_object |
Grok ref-counted object. More... | |
struct | _grk_progression |
Progression order change. More... | |
struct | _grk_raw_comp_cparameters |
RAW component compress parameters. More... | |
struct | _grk_raw_cparameters |
RAW image compress parameters. More... | |
struct | _grk_component_mapping_comp |
Note: "component" refers to an image component as decompressed from the code stream, while "channel" refers to a component resulting from the application of a Palette box LUT and a Component mapping box. More... | |
struct | _grk_palette_data |
Palette data. More... | |
struct | _grk_channel_description |
Channel definition: channel index, type, association. More... | |
struct | _grk_channel_definition |
Channel definitions and number of definitions. More... | |
struct | _grk_color |
ICC profile, palette, channel definition. More... | |
struct | _grk_asoc |
Association box info. More... | |
struct | _grk_precision |
Precision. More... | |
struct | _grk_header_info |
Header info. More... | |
struct | _grk_io_buf |
struct | _grk_io_init |
struct | _grk_stream_params |
JPEG 2000 stream parameters. More... | |
struct | _grk_decompress_core_params |
Core decompression parameters. More... | |
struct | _grk_decompress_params |
Decompression parameters. More... | |
struct | _grk_image_comp |
Image component. More... | |
struct | _grk_image_meta |
struct | _grk_image |
struct | _grk_plugin_pass |
Plugin pass. More... | |
struct | _grk_plugin_code_block |
Plugin code block. More... | |
struct | _grk_plugin_precinct |
Plugin precinct. More... | |
struct | _grk_plugin_band |
Plugin band. More... | |
struct | _grk_plugin_resolution |
Plugin resolution. More... | |
struct | grk_plugin_tile_component |
Plugin tile component. More... | |
struct | _grk_plugin_tile |
Plugin tile. More... | |
struct | _grk_cparameters |
Compress parameters. More... | |
struct | _grk_plugin_load_info |
struct | _grk_plugin_init_info |
struct | grk_plugin_compress_user_callback_info |
struct | grk_plugin_compress_batch_info |
struct | _grk_plugin_decompress_callback_info |
Macros | |
#define | GRK_CALLCONV |
#define | GRK_API __attribute__((visibility("default"))) |
#define | GRK_NUM_COMMENTS_SUPPORTED 256 |
#define | GRK_NUM_ASOC_BOXES_SUPPORTED 256 |
#define | GRK_MAX_COMMENT_LENGTH (UINT16_MAX - 2) |
#define | GRK_MAX_SUPPORTED_IMAGE_PRECISION 16 /* Maximum supported precision in library */ |
#define | BIBO_EXTRA_BITS 7 |
#define | GRK_MAX_PASSES (3 * (GRK_MAX_SUPPORTED_IMAGE_PRECISION + BIBO_EXTRA_BITS) - 2) |
#define | GRK_PATH_LEN 4096 /* Maximum allowed filename size */ |
#define | GRK_MAX_LAYERS 100 /* Maximum number of quality layers */ |
#define | GRK_J2K_MAX_DECOMP_LVLS |
#define | GRK_J2K_MAXRLVLS (GRK_J2K_MAX_DECOMP_LVLS + 1) /* Maximum number of resolution levels allowed by standard*/ |
#define | GRK_J2K_MAXBANDS (3 * GRK_J2K_MAXRLVLS - 2) /* Maximum number of sub-bands allowed by standard */ |
#define | GRK_DECOMPRESS_COMPRESSION_LEVEL_DEFAULT (UINT_MAX) |
#define | GRK_DECODE_HEADER (1 << 0) |
#define | GRK_DECODE_T2 (1 << 1) |
#define | GRK_DECODE_T1 (1 << 2) |
#define | GRK_DECODE_POST_T1 (1 << 3) |
#define | GRK_PLUGIN_DECODE_CLEAN (1 << 4) |
#define | GRK_DECODE_ALL |
#define | GRK_IMG_INFO 1 /* Basic image information provided to the user */ |
#define | GRK_J2K_MH_INFO 2 /* Codestream information based only on the main header */ |
#define | GRK_J2K_TH_INFO 4 /* Tile information based on the current tile header */ |
#define | GRK_J2K_TCH_INFO 8 |
Tile/Component information of all tiles. | |
#define | GRK_J2K_MH_IND 16 |
Codestream index based only on the main header. | |
#define | GRK_J2K_TH_IND 32 |
Tile index based on the current tile. | |
#define | GRK_JP2_INFO 128 |
JP2 file information. | |
#define | GRK_JP2_IND 256 |
JP2 file index. | |
#define | GRK_CBLKSTY_LAZY 0x001 |
Selective arithmetic coding bypass. | |
#define | GRK_CBLKSTY_RESET 0x002 |
Reset context probabilities on coding pass boundaries. | |
#define | GRK_CBLKSTY_TERMALL 0x004 |
Termination on each coding pass. | |
#define | GRK_CBLKSTY_VSC 0x008 |
Vertical stripe causal context. | |
#define | GRK_CBLKSTY_PTERM 0x010 |
Predictable termination. | |
#define | GRK_CBLKSTY_SEGSYM 0x020 |
Segmentation symbols are used. | |
#define | GRK_CBLKSTY_HT 0x040 |
high throughput block coding | |
#define | GRK_CBLKSTY_HT_MIXED 0x080 |
high throughput block coding - mixed | |
#define | GRK_CBLKSTY_HT_PHLD 0x100 |
high throughput block coding - placeholder | |
#define | GRK_JPH_RSIZ_FLAG 0x4000 |
for JPH, bit 14 of RSIZ must be set to 1 | |
#define | GRK_PROFILE_NONE 0x0000 /** no profile, conform to 15444-1 */ |
#define | GRK_PROFILE_0 0x0001 /** Profile 0 as described in 15444-1,Table A.45 */ |
#define | GRK_PROFILE_1 0x0002 /** Profile 1 as described in 15444-1,Table A.45 */ |
#define | GRK_PROFILE_CINEMA_2K 0x0003 /** 2K cinema profile defined in 15444-1 AMD1 */ |
#define | GRK_PROFILE_CINEMA_4K 0x0004 /** 4K cinema profile defined in 15444-1 AMD1 */ |
#define | GRK_PROFILE_CINEMA_S2K 0x0005 /** Scalable 2K cinema profile defined in 15444-1 AMD2 */ |
#define | GRK_PROFILE_CINEMA_S4K 0x0006 /** Scalable 4K cinema profile defined in 15444-1 AMD2 */ |
#define | GRK_PROFILE_CINEMA_LTS 0x0007 /** Long term storage cinema profile defined in 15444-1 AMD2 */ |
#define | GRK_PROFILE_BC_SINGLE 0x0100 /** Single Tile Broadcast profile defined in 15444-1 AMD3 */ |
#define | GRK_PROFILE_BC_MULTI 0x0200 /** Multi Tile Broadcast profile defined in 15444-1 AMD3 */ |
#define | GRK_PROFILE_BC_MULTI_R 0x0300 /** Multi Tile Reversible Broadcast profile defined in 15444-1 AMD3 */ |
#define | GRK_PROFILE_BC_MASK 0x030F /** Mask for broadcast profile including main level */ |
#define | GRK_PROFILE_IMF_2K 0x0400 /** 2K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_IMF_4K 0x0500 /** 4K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_IMF_8K 0x0600 /** 8K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_IMF_2K_R 0x0700 /** 2K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_IMF_4K_R 0x0800 /** 4K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_IMF_8K_R 0x0900 /** 8K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define | GRK_PROFILE_MASK 0x0FFF /** Mask for profile bits */ |
#define | GRK_PROFILE_PART2 0x8000 /** At least 1 extension defined in 15444-2 (Part-2) */ |
#define | GRK_PROFILE_PART2_EXTENSIONS_MASK 0x3FFF |
#define | GRK_EXTENSION_NONE 0x0000 /** No Part-2 extension */ |
JPEG 2000 Part-2 extensions. | |
#define | GRK_EXTENSION_MCT 0x0100 /** Custom MCT support */ |
#define | GRK_IS_PART2(v) ((v)&GRK_PROFILE_PART2) |
#define | GRK_IS_CINEMA(v) (((v) >= GRK_PROFILE_CINEMA_2K) && ((v) <= GRK_PROFILE_CINEMA_S4K)) |
#define | GRK_IS_STORAGE(v) ((v) == GRK_PROFILE_CINEMA_LTS) |
#define | GRK_GET_IMF_OR_BROADCAST_PROFILE(v) ((v)&0x0f00) /** Extract profile without mainlevel/sublevel */ |
#define | GRK_LEVEL_MAX 11U /** Maximum (main) level */ |
#define | GRK_GET_LEVEL(v) ((v)&0xf) /** Extract (main) level */ |
#define | GRK_IS_BROADCAST(v) |
#define | GRK_BROADCAST_LEVEL_1_MBITSSEC 200U /** Mbits/sec for level 1 */ |
#define | GRK_BROADCAST_LEVEL_2_MBITSSEC 200U /** Mbits/sec for level 2 */ |
#define | GRK_BROADCAST_LEVEL_3_MBITSSEC 200U /** Mbits/sec for level 3 */ |
#define | GRK_BROADCAST_LEVEL_4_MBITSSEC 400U /** Mbits/sec for level 4 */ |
#define | GRK_BROADCAST_LEVEL_5_MBITSSEC 800U /** Mbits/sec for level 5 */ |
#define | GRK_BROADCAST_LEVEL_6_MBITSSEC 1600U /** Mbits/sec for level 6 */ |
#define | GRK_BROADCAST_LEVEL_7_MBITSSEC 3200U /** Mbits/sec for level 7 */ |
#define | GRK_BROADCAST_LEVEL_8_MBITSSEC 6400U /** Mbits/sec for level 8 */ |
#define | GRK_BROADCAST_LEVEL_9_MBITSSEC 12800U /** Mbits/sec for level 9 */ |
#define | GRK_BROADCAST_LEVEL_10_MBITSSEC 25600U /** Mbits/sec for level 10 */ |
#define | GRK_BROADCAST_LEVEL_11_MBITSSEC 51200U /** Mbits/sec for level 11 */ |
#define | GRK_BROADCAST_LEVEL_1_MSAMPLESSEC 64U /** MSamples/sec for level 1 */ |
#define | GRK_BROADCAST_LEVEL_2_MSAMPLESSEC 130U /** MSamples/sec for level 2 */ |
#define | GRK_BROADCAST_LEVEL_3_MSAMPLESSEC 195U /** MSamples/sec for level 3 */ |
#define | GRK_BROADCAST_LEVEL_4_MSAMPLESSEC 260U /** MSamples/sec for level 4 */ |
#define | GRK_BROADCAST_LEVEL_5_MSAMPLESSEC 520U /** MSamples/sec for level 5 */ |
#define | GRK_BROADCAST_LEVEL_6_MSAMPLESSEC 1200U /** MSamples/sec for level 6 */ |
#define | GRK_BROADCAST_LEVEL_7_MSAMPLESSEC 2400U /** MSamples/sec for level 7 */ |
#define | GRK_BROADCAST_LEVEL_8_MSAMPLESSEC 4800U /** MSamples/sec for level 8 */ |
#define | GRK_BROADCAST_LEVEL_9_MSAMPLESSEC 9600U /** MSamples/sec for level 9 */ |
#define | GRK_BROADCAST_LEVEL_10_MSAMPLESSEC 19200U /** MSamples/sec for level 10 */ |
#define | GRK_BROADCAST_LEVEL_11_MSAMPLESSEC 38400U /** MSamples/sec for level 11 */ |
#define | GRK_IS_IMF(v) |
#define | GRK_IMF_MAINLEVEL_1_MSAMPLESSEC 65U /** MSamples/sec for main level 1 */ |
#define | GRK_IMF_MAINLEVEL_2_MSAMPLESSEC 130U /** MSamples/sec for main level 2 */ |
#define | GRK_IMF_MAINLEVEL_3_MSAMPLESSEC 195U /** MSamples/sec for main level 3 */ |
#define | GRK_IMF_MAINLEVEL_4_MSAMPLESSEC 260U /** MSamples/sec for main level 4 */ |
#define | GRK_IMF_MAINLEVEL_5_MSAMPLESSEC 520U /** MSamples/sec for main level 5 */ |
#define | GRK_IMF_MAINLEVEL_6_MSAMPLESSEC 1200U /** MSamples/sec for main level 6 */ |
#define | GRK_IMF_MAINLEVEL_7_MSAMPLESSEC 2400U /** MSamples/sec for main level 7 */ |
#define | GRK_IMF_MAINLEVEL_8_MSAMPLESSEC 4800U /** MSamples/sec for main level 8 */ |
#define | GRK_IMF_MAINLEVEL_9_MSAMPLESSEC 9600U /** MSamples/sec for main level 9 */ |
#define | GRK_IMF_MAINLEVEL_10_MSAMPLESSEC 19200U /** MSamples/sec for main level 10 */ |
#define | GRK_IMF_MAINLEVEL_11_MSAMPLESSEC 38400U /** MSamples/sec for main level 11 */ |
#define | GRK_IMF_SUBLEVEL_MAX 9U /** Maximum IMF sublevel */ |
#define | GRK_GET_IMF_SUBLEVEL(v) (((v) >> 4) & 0xf) /** Extract IMF sub level */ |
#define | GRK_IMF_SUBLEVEL_1_MBITSSEC 200U /** Mbits/s for IMF sub level 1 */ |
Maximum compressed bit rate (Mbits/s) per IMF sub level. | |
#define | GRK_IMF_SUBLEVEL_2_MBITSSEC 400U /** Mbits/s for IMF sub level 2 */ |
#define | GRK_IMF_SUBLEVEL_3_MBITSSEC 800U /** Mbits/s for IMF sub level 3 */ |
#define | GRK_IMF_SUBLEVEL_4_MBITSSEC 1600U /** Mbits/s for IMF sub level 4 */ |
#define | GRK_IMF_SUBLEVEL_5_MBITSSEC 3200U /** Mbits/s for IMF sub level 5 */ |
#define | GRK_IMF_SUBLEVEL_6_MBITSSEC 6400U /** Mbits/s for IMF sub level 6 */ |
#define | GRK_IMF_SUBLEVEL_7_MBITSSEC 12800U /** Mbits/s for IMF sub level 7 */ |
#define | GRK_IMF_SUBLEVEL_8_MBITSSEC 25600U /** Mbits/s for IMF sub level 8 */ |
#define | GRK_IMF_SUBLEVEL_9_MBITSSEC 51200U /** Mbits/s for IMF sub level 9 */ |
#define | GRK_CINEMA_DCI_MAX_BANDWIDTH 250000000 |
JPEG 2000 cinema profile code stream and component size limits. | |
#define | GRK_CINEMA_24_CS 1302083 /** Maximum code stream length @ 24fps */ |
#define | GRK_CINEMA_24_COMP 1041666 /** Maximum size per color component @ 24fps */ |
#define | GRK_CINEMA_48_CS 651041 /** Maximum code stream length @ 48fps */ |
#define | GRK_CINEMA_48_COMP 520833 /** Maximum size per color component @ 48fps */ |
#define | GRK_CINEMA_4K_DEFAULT_NUM_RESOLUTIONS 7 |
#define | GRK_CUSTOM_CIELAB_SPACE 0x0 |
#define | GRK_DEFAULT_CIELAB_SPACE 0x44454600 /* 'DEF' */ |
#define | GRK_CIE_DAY ((((uint32_t)'C') << 24) + (((uint32_t)'T') << 16)) |
#define | GRK_CIE_D50 ((uint32_t)0x00443530) |
#define | GRK_CIE_D65 ((uint32_t)0x00443635) |
#define | GRK_CIE_D75 ((uint32_t)0x00443735) |
#define | GRK_CIE_SA ((uint32_t)0x00005341) |
#define | GRK_CIE_SC ((uint32_t)0x00005343) |
#define | GRK_CIE_F2 ((uint32_t)0x00004632) |
#define | GRK_CIE_F7 ((uint32_t)0x00004637) |
#define | GRK_CIE_F11 ((uint32_t)0x00463131) |
#define | GRK_RANDOM_ACCESS_PLT 1 /* use PLT marker if present */ |
Toggle random access markers. | |
#define | GRK_RANDOM_ACCESS_TLM 2 /* use TLM marker if present */ |
#define | GRK_RANDOM_ACCESS_PLM 4 /* use PLM marker if present */ |
#define | GRK_PLUGIN_STATE_NO_DEBUG 0x0 |
#define | GRK_PLUGIN_STATE_DEBUG 0x1 |
#define | GRK_PLUGIN_STATE_PRE_TR1 0x2 |
#define | GRK_PLUGIN_STATE_DWT_QUANTIZATION 0x4 |
#define | GRK_PLUGIN_STATE_MCT_ONLY 0x8 |
Typedefs | |
typedef enum _GRK_PROG_ORDER | GRK_PROG_ORDER |
Progression order. | |
typedef enum _GRK_COLOR_SPACE | GRK_COLOR_SPACE |
Supported color spaces. | |
typedef enum _GRK_ENUM_COLOUR_SPACE | GRK_ENUM_COLOUR_SPACE |
typedef void(* | grk_msg_callback) (const char *msg, void *client_data) |
Logging callback. | |
typedef struct _grk_object | grk_object |
Grok ref-counted object. | |
typedef struct _grk_progression | grk_progression |
Progression order change. | |
typedef struct _grk_raw_comp_cparameters | grk_raw_comp_cparameters |
RAW component compress parameters. | |
typedef struct _grk_raw_cparameters | grk_raw_cparameters |
RAW image compress parameters. | |
typedef enum _GRK_RATE_CONTROL_ALGORITHM | GRK_RATE_CONTROL_ALGORITHM |
Rate control algorithms GRK_RATE_CONTROL_BISECT: bisect with all truncation points GRK_RATE_CONTROL_PCRD_OPT: bisect with only feasible truncation points. | |
typedef enum _GRK_SUPPORTED_FILE_FMT | GRK_SUPPORTED_FILE_FMT |
All supported file formats. | |
typedef enum _GRK_CODEC_FORMAT | GRK_CODEC_FORMAT |
Supported JPEG 2000 formats. | |
typedef struct _grk_component_mapping_comp | grk_component_mapping_comp |
Note: "component" refers to an image component as decompressed from the code stream, while "channel" refers to a component resulting from the application of a Palette box LUT and a Component mapping box. | |
typedef struct _grk_palette_data | grk_palette_data |
Palette data. | |
typedef enum _GRK_CHANNEL_TYPE | GRK_CHANNEL_TYPE |
typedef enum _GRK_CHANNEL_ASSOC | GRK_CHANNEL_ASSOC |
typedef struct _grk_channel_description | grk_channel_description |
Channel definition: channel index, type, association. | |
typedef struct _grk_channel_definition | grk_channel_definition |
Channel definitions and number of definitions. | |
typedef struct _grk_color | grk_color |
ICC profile, palette, channel definition. | |
typedef struct _grk_asoc | grk_asoc |
Association box info. | |
typedef enum _grk_precision_mode | grk_precision_mode |
Precision mode. | |
typedef struct _grk_precision | grk_precision |
Precision. | |
typedef struct _grk_header_info | grk_header_info |
Header info. | |
typedef struct _grk_io_buf | grk_io_buf |
typedef struct _grk_io_init | grk_io_init |
typedef bool(* | grk_io_callback) (uint32_t threadId, grk_io_buf buffer, void *io_user_data) |
typedef void(* | grk_io_register_reclaim_callback) (grk_io_init io_init, grk_io_callback reclaim_callback, void *io_user_data, void *reclaim_user_data) |
typedef bool(* | grk_io_pixels_callback) (uint32_t threadId, grk_io_buf buffer, void *user_data) |
typedef size_t(* | grk_stream_read_fn) (uint8_t *buffer, size_t numBytes, void *user_data) |
read stream callback | |
typedef size_t(* | grk_stream_write_fn) (const uint8_t *buffer, size_t numBytes, void *user_data) |
write stream callback | |
typedef bool(* | grk_stream_seek_fn) (uint64_t offset, void *user_data) |
seek (absolute) callback | |
typedef void(* | grk_stream_free_user_data_fn) (void *user_data) |
free user data callback | |
typedef struct _grk_stream_params | grk_stream_params |
JPEG 2000 stream parameters. | |
typedef enum _GRK_TILE_CACHE_STRATEGY | GRK_TILE_CACHE_STRATEGY |
typedef struct _grk_decompress_core_params | grk_decompress_core_params |
Core decompression parameters. | |
typedef struct _grk_decompress_params | grk_decompress_parameters |
Decompression parameters. | |
typedef struct _grk_image_comp | grk_image_comp |
Image component. | |
typedef struct _grk_image_meta | grk_image_meta |
typedef struct _grk_image | grk_image |
typedef struct _grk_plugin_pass | grk_plugin_pass |
Plugin pass. | |
typedef struct _grk_plugin_code_block | grk_plugin_code_block |
Plugin code block. | |
typedef struct _grk_plugin_precinct | grk_plugin_precinct |
Plugin precinct. | |
typedef struct _grk_plugin_band | grk_plugin_band |
Plugin band. | |
typedef struct _grk_plugin_resolution | grk_plugin_resolution |
Plugin resolution. | |
typedef struct grk_plugin_tile_component | grk_plugin_tile_component |
Plugin tile component. | |
typedef struct _grk_plugin_tile | grk_plugin_tile |
Plugin tile. | |
typedef grk_object | grk_codec |
typedef struct _grk_cparameters | grk_cparameters |
Compress parameters. | |
typedef struct _grk_plugin_load_info | grk_plugin_load_info |
typedef struct _grk_plugin_init_info | grk_plugin_init_info |
typedef struct grk_plugin_compress_user_callback_info | grk_plugin_compress_user_callback_info |
typedef uint64_t(* | GRK_PLUGIN_COMPRESS_USER_CALLBACK) (grk_plugin_compress_user_callback_info *info) |
typedef struct grk_plugin_compress_batch_info | grk_plugin_compress_batch_info |
typedef int(* | GROK_INIT_DECOMPRESSORS) (grk_header_info *header_info, grk_image *image) |
typedef struct _grk_plugin_decompress_callback_info | grk_plugin_decompress_callback_info |
typedef int32_t(* | grk_plugin_decompress_callback) (grk_plugin_decompress_callback_info *info) |
Functions | |
GRK_API const char *GRK_CALLCONV | grk_version (void) |
Library version. | |
GRK_API void GRK_CALLCONV | grk_initialize (const char *pluginPath, uint32_t numthreads, bool verbose) |
Initialize library. | |
GRK_API void GRK_CALLCONV | grk_deinitialize () |
De-initialize library. | |
GRK_API grk_object *GRK_CALLCONV | grk_object_ref (grk_object *obj) |
Increment ref count. | |
GRK_API void GRK_CALLCONV | grk_object_unref (grk_object *obj) |
GRK_API void GRK_CALLCONV | grk_set_msg_handlers (grk_msg_callback info_callback, void *info_user_data, grk_msg_callback warn_callback, void *warn_user_data, grk_msg_callback error_callback, void *error_user_data) |
GRK_API grk_image *GRK_CALLCONV | grk_image_new (uint16_t numcmpts, grk_image_comp *cmptparms, GRK_COLOR_SPACE clrspc, bool alloc_data) |
Create image. | |
GRK_API grk_image_meta *GRK_CALLCONV | grk_image_meta_new (void) |
GRK_API bool GRK_CALLCONV | grk_decompress_detect_format (const char *fileName, GRK_CODEC_FORMAT *fmt) |
Detect jpeg 2000 format from file Format is either GRK_FMT_J2K or GRK_FMT_JP2. | |
GRK_API void GRK_CALLCONV | grk_set_default_stream_params (grk_stream_params *params) |
Initialize stream parameters with default values. | |
GRK_API void GRK_CALLCONV | grk_decompress_set_default_params (grk_decompress_parameters *parameters) |
Initialize decompress parameters with default values. | |
GRK_API grk_codec *GRK_CALLCONV | grk_decompress_init (grk_stream_params *stream_params, grk_decompress_core_params *core_params) |
Initialize decompressor. | |
GRK_API bool GRK_CALLCONV | grk_decompress_read_header (grk_codec *codec, grk_header_info *header_info) |
Decompress JPEG 2000 header. | |
GRK_API grk_image *GRK_CALLCONV | grk_decompress_get_tile_image (grk_codec *codec, uint16_t tileIndex) |
Get decompressed tile image. | |
GRK_API grk_image *GRK_CALLCONV | grk_decompress_get_composited_image (grk_codec *codec) |
Get decompressed composite image. | |
GRK_API bool GRK_CALLCONV | grk_decompress_set_window (grk_codec *codec, float start_x, float start_y, float end_x, float end_y) |
Set the given area to be decompressed. | |
GRK_API bool GRK_CALLCONV | grk_decompress (grk_codec *codec, grk_plugin_tile *tile) |
Decompress image from a JPEG 2000 code stream. | |
GRK_API bool GRK_CALLCONV | grk_decompress_tile (grk_codec *codec, uint16_t tileIndex) |
Decompress a specific tile. | |
GRK_API void GRK_CALLCONV | grk_compress_set_default_params (grk_cparameters *parameters) |
Set compressing parameters to default values: | |
GRK_API grk_codec *GRK_CALLCONV | grk_compress_init (grk_stream_params *stream_params, grk_cparameters *parameters, grk_image *p_image) |
Set up the compressor parameters using the current image and user parameters. | |
GRK_API uint64_t GRK_CALLCONV | grk_compress (grk_codec *codec, grk_plugin_tile *tile) |
Compress an image into a JPEG 2000 code stream using plugin. | |
GRK_API void GRK_CALLCONV | grk_dump_codec (grk_codec *codec, uint32_t info_flag, FILE *output_stream) |
Dump codec information to file. | |
GRK_API bool GRK_CALLCONV | grk_set_MCT (grk_cparameters *parameters, float *encodingMatrix, int32_t *dc_shift, uint32_t nbComp) |
Set the MCT matrix to use. | |
GRK_API bool GRK_CALLCONV | grk_plugin_load (grk_plugin_load_info info) |
Load plugin. | |
GRK_API void GRK_CALLCONV | grk_plugin_cleanup (void) |
Release plugin resources. | |
GRK_API uint32_t GRK_CALLCONV | grk_plugin_get_debug_state () |
Get debug state of plugin. | |
GRK_API bool GRK_CALLCONV | grk_plugin_init (grk_plugin_init_info initInfo) |
Initialize plugin. | |
GRK_API int32_t GRK_CALLCONV | grk_plugin_compress (grk_cparameters *compress_parameters, GRK_PLUGIN_COMPRESS_USER_CALLBACK callback) |
Compress with plugin. | |
GRK_API int32_t GRK_CALLCONV | grk_plugin_batch_compress (grk_plugin_compress_batch_info info) |
Batch compress with plugin. | |
GRK_API void GRK_CALLCONV | grk_plugin_wait_for_batch_complete (void) |
Wait for batch job to complete. | |
GRK_API void GRK_CALLCONV | grk_plugin_stop_batch_compress (void) |
Stop batch compress. | |
GRK_API int32_t GRK_CALLCONV | grk_plugin_decompress (grk_decompress_parameters *decompress_parameters, grk_plugin_decompress_callback callback) |
Decompress with plugin. | |
GRK_API int32_t GRK_CALLCONV | grk_plugin_init_batch_decompress (const char *input_dir, const char *output_dir, grk_decompress_parameters *decompress_parameters, grk_plugin_decompress_callback callback) |
Initialize batch decompress. | |
GRK_API int32_t GRK_CALLCONV | grk_plugin_batch_decompress (void) |
Initiate batch decompress. | |
GRK_API void GRK_CALLCONV | grk_plugin_stop_batch_decompress (void) |
Stop batch decompress. | |
#define BIBO_EXTRA_BITS 7 |
Referenced by grk::decompress_synch_plugin_with_host().
#define GRK_API __attribute__((visibility("default"))) |
#define GRK_BROADCAST_LEVEL_10_MBITSSEC 25600U /** Mbits/sec for level 10 */ |
#define GRK_BROADCAST_LEVEL_10_MSAMPLESSEC 19200U /** MSamples/sec for level 10 */ |
#define GRK_BROADCAST_LEVEL_11_MBITSSEC 51200U /** Mbits/sec for level 11 */ |
#define GRK_BROADCAST_LEVEL_11_MSAMPLESSEC 38400U /** MSamples/sec for level 11 */ |
#define GRK_BROADCAST_LEVEL_1_MBITSSEC 200U /** Mbits/sec for level 1 */ |
#define GRK_BROADCAST_LEVEL_1_MSAMPLESSEC 64U /** MSamples/sec for level 1 */ |
#define GRK_BROADCAST_LEVEL_2_MBITSSEC 200U /** Mbits/sec for level 2 */ |
#define GRK_BROADCAST_LEVEL_2_MSAMPLESSEC 130U /** MSamples/sec for level 2 */ |
#define GRK_BROADCAST_LEVEL_3_MBITSSEC 200U /** Mbits/sec for level 3 */ |
#define GRK_BROADCAST_LEVEL_3_MSAMPLESSEC 195U /** MSamples/sec for level 3 */ |
#define GRK_BROADCAST_LEVEL_4_MBITSSEC 400U /** Mbits/sec for level 4 */ |
#define GRK_BROADCAST_LEVEL_4_MSAMPLESSEC 260U /** MSamples/sec for level 4 */ |
#define GRK_BROADCAST_LEVEL_5_MBITSSEC 800U /** Mbits/sec for level 5 */ |
#define GRK_BROADCAST_LEVEL_5_MSAMPLESSEC 520U /** MSamples/sec for level 5 */ |
#define GRK_BROADCAST_LEVEL_6_MBITSSEC 1600U /** Mbits/sec for level 6 */ |
#define GRK_BROADCAST_LEVEL_6_MSAMPLESSEC 1200U /** MSamples/sec for level 6 */ |
#define GRK_BROADCAST_LEVEL_7_MBITSSEC 3200U /** Mbits/sec for level 7 */ |
#define GRK_BROADCAST_LEVEL_7_MSAMPLESSEC 2400U /** MSamples/sec for level 7 */ |
#define GRK_BROADCAST_LEVEL_8_MBITSSEC 6400U /** Mbits/sec for level 8 */ |
#define GRK_BROADCAST_LEVEL_8_MSAMPLESSEC 4800U /** MSamples/sec for level 8 */ |
#define GRK_BROADCAST_LEVEL_9_MBITSSEC 12800U /** Mbits/sec for level 9 */ |
#define GRK_BROADCAST_LEVEL_9_MSAMPLESSEC 9600U /** MSamples/sec for level 9 */ |
#define GRK_CALLCONV |
#define GRK_CBLKSTY_HT 0x040 |
high throughput block coding
Referenced by grk::CodeStreamCompress::init(), grk::FileFormatCompress::init(), and grk::CodeStreamDecompress::read_SPCod_SPCoc().
#define GRK_CBLKSTY_HT_MIXED 0x080 |
high throughput block coding - mixed
#define GRK_CBLKSTY_HT_PHLD 0x100 |
high throughput block coding - placeholder
#define GRK_CBLKSTY_LAZY 0x001 |
Selective arithmetic coding bypass.
Referenced by grk::T1::compress_cblk(), grk::T1::decompress_cblk(), grk::T1::enc_is_term_pass(), and grk::PacketParser::initSegment().
#define GRK_CBLKSTY_PTERM 0x010 |
Predictable termination.
Referenced by grk::T1::compress_cblk(), and grk::T1::decompress_cblk().
#define GRK_CBLKSTY_RESET 0x002 |
Reset context probabilities on coding pass boundaries.
Referenced by grk::T1::compress_cblk(), and grk::T1::decompress_cblk().
#define GRK_CBLKSTY_SEGSYM 0x020 |
Segmentation symbols are used.
Referenced by grk::T1::compress_cblk(), and grk::T1::dec_clnpass_check_segsym().
#define GRK_CBLKSTY_TERMALL 0x004 |
Termination on each coding pass.
Referenced by grk::T1::enc_is_term_pass(), and grk::PacketParser::initSegment().
#define GRK_CBLKSTY_VSC 0x008 |
Vertical stripe causal context.
Referenced by grk::T1::dec_clnpass(), grk::T1::dec_sigpass_mqc(), grk::T1::dec_sigpass_raw(), grk::T1::enc_clnpass(), and grk::T1::enc_sigpass().
#define GRK_CIE_D50 ((uint32_t)0x00443530) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_D65 ((uint32_t)0x00443635) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_D75 ((uint32_t)0x00443735) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_DAY ((((uint32_t)'C') << 24) + (((uint32_t)'T') << 16)) |
#define GRK_CIE_F11 ((uint32_t)0x00463131) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_F2 ((uint32_t)0x00004632) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_F7 ((uint32_t)0x00004637) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_SA ((uint32_t)0x00005341) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CIE_SC ((uint32_t)0x00005343) |
Referenced by grk::GrkImage::cieLabToRGB().
#define GRK_CINEMA_24_COMP 1041666 /** Maximum size per color component @ 24fps */ |
Referenced by grk::Profile::set_cinema_parameters().
#define GRK_CINEMA_24_CS 1302083 /** Maximum code stream length @ 24fps */ |
Referenced by grk::Profile::set_cinema_parameters().
#define GRK_CINEMA_48_COMP 520833 /** Maximum size per color component @ 48fps */ |
#define GRK_CINEMA_48_CS 651041 /** Maximum code stream length @ 48fps */ |
#define GRK_CINEMA_4K_DEFAULT_NUM_RESOLUTIONS 7 |
#define GRK_CINEMA_DCI_MAX_BANDWIDTH 250000000 |
JPEG 2000 cinema profile code stream and component size limits.
#define GRK_CUSTOM_CIELAB_SPACE 0x0 |
Referenced by grk::FileFormatDecompress::read_colr().
#define GRK_DECODE_ALL |
#define GRK_DECODE_HEADER (1 << 0) |
#define GRK_DECODE_POST_T1 (1 << 3) |
Referenced by grk::TileProcessor::decompressT2T1(), and grk::CodeStreamDecompress::findNextSOT().
#define GRK_DECODE_T1 (1 << 2) |
Referenced by grk::TileProcessor::decompressT2T1().
#define GRK_DECODE_T2 (1 << 1) |
Referenced by grk::TileProcessor::decompressT2T1().
#define GRK_DECOMPRESS_COMPRESSION_LEVEL_DEFAULT (UINT_MAX) |
#define GRK_DEFAULT_CIELAB_SPACE 0x44454600 /* 'DEF' */ |
#define GRK_EXTENSION_MCT 0x0100 /** Custom MCT support */ |
Referenced by grk_set_MCT(), grk::CodeStreamCompress::init(), and grk::CodeStreamCompress::init_header_writing().
#define GRK_EXTENSION_NONE 0x0000 /** No Part-2 extension */ |
JPEG 2000 Part-2 extensions.
Referenced by grk::CodeStreamCompress::init().
#define GRK_GET_IMF_OR_BROADCAST_PROFILE | ( | v | ) | ((v)&0x0f00) /** Extract profile without mainlevel/sublevel */ |
#define GRK_GET_IMF_SUBLEVEL | ( | v | ) | (((v) >> 4) & 0xf) /** Extract IMF sub level */ |
Referenced by grk::Profile::is_imf_compliant().
#define GRK_GET_LEVEL | ( | v | ) | ((v)&0xf) /** Extract (main) level */ |
Referenced by grk::Profile::is_broadcast_compliant(), and grk::Profile::is_imf_compliant().
#define GRK_IMF_MAINLEVEL_10_MSAMPLESSEC 19200U /** MSamples/sec for main level 10 */ |
#define GRK_IMF_MAINLEVEL_11_MSAMPLESSEC 38400U /** MSamples/sec for main level 11 */ |
#define GRK_IMF_MAINLEVEL_1_MSAMPLESSEC 65U /** MSamples/sec for main level 1 */ |
#define GRK_IMF_MAINLEVEL_2_MSAMPLESSEC 130U /** MSamples/sec for main level 2 */ |
#define GRK_IMF_MAINLEVEL_3_MSAMPLESSEC 195U /** MSamples/sec for main level 3 */ |
#define GRK_IMF_MAINLEVEL_4_MSAMPLESSEC 260U /** MSamples/sec for main level 4 */ |
#define GRK_IMF_MAINLEVEL_5_MSAMPLESSEC 520U /** MSamples/sec for main level 5 */ |
#define GRK_IMF_MAINLEVEL_6_MSAMPLESSEC 1200U /** MSamples/sec for main level 6 */ |
#define GRK_IMF_MAINLEVEL_7_MSAMPLESSEC 2400U /** MSamples/sec for main level 7 */ |
#define GRK_IMF_MAINLEVEL_8_MSAMPLESSEC 4800U /** MSamples/sec for main level 8 */ |
#define GRK_IMF_MAINLEVEL_9_MSAMPLESSEC 9600U /** MSamples/sec for main level 9 */ |
#define GRK_IMF_SUBLEVEL_1_MBITSSEC 200U /** Mbits/s for IMF sub level 1 */ |
Maximum compressed bit rate (Mbits/s) per IMF sub level.
#define GRK_IMF_SUBLEVEL_2_MBITSSEC 400U /** Mbits/s for IMF sub level 2 */ |
#define GRK_IMF_SUBLEVEL_3_MBITSSEC 800U /** Mbits/s for IMF sub level 3 */ |
#define GRK_IMF_SUBLEVEL_4_MBITSSEC 1600U /** Mbits/s for IMF sub level 4 */ |
#define GRK_IMF_SUBLEVEL_5_MBITSSEC 3200U /** Mbits/s for IMF sub level 5 */ |
#define GRK_IMF_SUBLEVEL_6_MBITSSEC 6400U /** Mbits/s for IMF sub level 6 */ |
#define GRK_IMF_SUBLEVEL_7_MBITSSEC 12800U /** Mbits/s for IMF sub level 7 */ |
#define GRK_IMF_SUBLEVEL_8_MBITSSEC 25600U /** Mbits/s for IMF sub level 8 */ |
#define GRK_IMF_SUBLEVEL_9_MBITSSEC 51200U /** Mbits/s for IMF sub level 9 */ |
#define GRK_IMF_SUBLEVEL_MAX 9U /** Maximum IMF sublevel */ |
#define GRK_IMG_INFO 1 /* Basic image information provided to the user */ |
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_IS_BROADCAST | ( | v | ) |
Referenced by grk::CodeStreamCompress::init(), and grk::SIZMarker::read().
#define GRK_IS_CINEMA | ( | v | ) | (((v) >= GRK_PROFILE_CINEMA_2K) && ((v) <= GRK_PROFILE_CINEMA_S4K)) |
#define GRK_IS_IMF | ( | v | ) |
Referenced by grk::PacketIter::enableTilePartGeneration(), grk::CodeStreamCompress::init(), and grk::SIZMarker::read().
#define GRK_IS_PART2 | ( | v | ) | ((v)&GRK_PROFILE_PART2) |
Referenced by grk_set_MCT(), and grk::CodeStreamCompress::init().
#define GRK_IS_STORAGE | ( | v | ) | ((v) == GRK_PROFILE_CINEMA_LTS) |
Referenced by grk::CodeStreamCompress::init().
#define GRK_J2K_MAX_DECOMP_LVLS |
Referenced by grk::CodeStreamDecompress::read_SPCod_SPCoc().
#define GRK_J2K_MAXBANDS (3 * GRK_J2K_MAXRLVLS - 2) /* Maximum number of sub-bands allowed by standard */ |
#define GRK_J2K_MAXRLVLS (GRK_J2K_MAX_DECOMP_LVLS + 1) /* Maximum number of resolution levels allowed by standard*/ |
Referenced by grk::CodeStreamCompress::compressValidation(), grk::PacketManager::getParams(), grk::IncludeTracker::IncludeTracker(), grk::CodeStreamCompress::init(), grk::PacketManager::PacketManager(), grk::CodeStreamDecompress::read_poc(), grk::ResIncludeBuffers::ResIncludeBuffers(), grk::TileComponentCodingParams::TileComponentCodingParams(), and grk::ResIncludeBuffers::~ResIncludeBuffers().
#define GRK_J2K_MH_IND 16 |
Codestream index based only on the main header.
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_J2K_MH_INFO 2 /* Codestream information based only on the main header */ |
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_J2K_TCH_INFO 8 |
Tile/Component information of all tiles.
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_J2K_TH_IND 32 |
Tile index based on the current tile.
#define GRK_J2K_TH_INFO 4 /* Tile information based on the current tile header */ |
#define GRK_JP2_IND 256 |
JP2 file index.
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_JP2_INFO 128 |
JP2 file information.
Referenced by grk::CodeStreamDecompress::dump().
#define GRK_JPH_RSIZ_FLAG 0x4000 |
for JPH, bit 14 of RSIZ must be set to 1
Referenced by grk::CodeStreamCompress::init().
#define GRK_LEVEL_MAX 11U /** Maximum (main) level */ |
Referenced by grk::Profile::is_broadcast_compliant(), and grk::Profile::is_imf_compliant().
#define GRK_MAX_COMMENT_LENGTH (UINT16_MAX - 2) |
Referenced by grk::CodeStreamCompress::init(), and grk::CodeStreamCompress::write_com().
#define GRK_MAX_LAYERS 100 /* Maximum number of quality layers */ |
#define GRK_MAX_PASSES (3 * (GRK_MAX_SUPPORTED_IMAGE_PRECISION + BIBO_EXTRA_BITS) - 2) |
#define GRK_MAX_SUPPORTED_IMAGE_PRECISION 16 /* Maximum supported precision in library */ |
#define GRK_NUM_ASOC_BOXES_SUPPORTED 256 |
Referenced by grk::FileFormatDecompress::serializeAsoc().
#define GRK_NUM_COMMENTS_SUPPORTED 256 |
Referenced by grk::CodeStreamDecompress::read_com().
#define GRK_PATH_LEN 4096 /* Maximum allowed filename size */ |
#define GRK_PLUGIN_DECODE_CLEAN (1 << 4) |
#define GRK_PLUGIN_STATE_DEBUG 0x1 |
#define GRK_PLUGIN_STATE_DWT_QUANTIZATION 0x4 |
#define GRK_PLUGIN_STATE_MCT_ONLY 0x8 |
Referenced by grk::TileProcessor::doCompress().
#define GRK_PLUGIN_STATE_NO_DEBUG 0x0 |
Referenced by grk_plugin_get_debug_state().
#define GRK_PLUGIN_STATE_PRE_TR1 0x2 |
Referenced by grk::TileProcessor::pcrdBisectSimple().
#define GRK_PROFILE_0 0x0001 /** Profile 0 as described in 15444-1,Table A.45 */ |
#define GRK_PROFILE_1 0x0002 /** Profile 1 as described in 15444-1,Table A.45 */ |
#define GRK_PROFILE_BC_MASK 0x030F /** Mask for broadcast profile including main level */ |
#define GRK_PROFILE_BC_MULTI 0x0200 /** Multi Tile Broadcast profile defined in 15444-1 AMD3 */ |
Referenced by grk::Profile::is_broadcast_compliant().
#define GRK_PROFILE_BC_MULTI_R 0x0300 /** Multi Tile Reversible Broadcast profile defined in 15444-1 AMD3 */ |
Referenced by grk::Profile::set_broadcast_parameters().
#define GRK_PROFILE_BC_SINGLE 0x0100 /** Single Tile Broadcast profile defined in 15444-1 AMD3 */ |
Referenced by grk::Profile::is_broadcast_compliant().
#define GRK_PROFILE_CINEMA_2K 0x0003 /** 2K cinema profile defined in 15444-1 AMD1 */ |
Referenced by grk::Profile::is_cinema_compliant(), and grk::Profile::set_cinema_parameters().
#define GRK_PROFILE_CINEMA_4K 0x0004 /** 4K cinema profile defined in 15444-1 AMD1 */ |
#define GRK_PROFILE_CINEMA_LTS 0x0007 /** Long term storage cinema profile defined in 15444-1 AMD2 */ |
Referenced by grk::SIZMarker::read().
#define GRK_PROFILE_CINEMA_S2K 0x0005 /** Scalable 2K cinema profile defined in 15444-1 AMD2 */ |
Referenced by grk::CodeStreamCompress::init().
#define GRK_PROFILE_CINEMA_S4K 0x0006 /** Scalable 4K cinema profile defined in 15444-1 AMD2 */ |
Referenced by grk::CodeStreamCompress::init().
#define GRK_PROFILE_IMF_2K 0x0400 /** 2K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_IMF_2K_R 0x0700 /** 2K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_IMF_4K 0x0500 /** 4K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_IMF_4K_R 0x0800 /** 4K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_IMF_8K 0x0600 /** 8K Single Tile Lossy IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_IMF_8K_R 0x0900 /** 8K Single/Multi Tile Reversible IMF profile defined in 15444-1 AMD8 */ |
#define GRK_PROFILE_MASK 0x0FFF /** Mask for profile bits */ |
Referenced by grk::SIZMarker::read().
#define GRK_PROFILE_NONE 0x0000 /** no profile, conform to 15444-1 */ |
Referenced by grk_compress_set_default_params(), and grk::CodeStreamCompress::init().
#define GRK_PROFILE_PART2 0x8000 /** At least 1 extension defined in 15444-2 (Part-2) */ |
#define GRK_PROFILE_PART2_EXTENSIONS_MASK 0x3FFF |
#define GRK_RANDOM_ACCESS_PLM 4 /* use PLM marker if present */ |
Referenced by grk_decompress_set_default_params().
#define GRK_RANDOM_ACCESS_PLT 1 /* use PLT marker if present */ |
Toggle random access markers.
Referenced by grk_decompress_set_default_params().
#define GRK_RANDOM_ACCESS_TLM 2 /* use TLM marker if present */ |
Referenced by grk_decompress_set_default_params(), and grk::CodeStreamDecompress::read_tlm().
typedef enum _GRK_CHANNEL_ASSOC GRK_CHANNEL_ASSOC |
typedef struct _grk_channel_definition grk_channel_definition |
Channel definitions and number of definitions.
typedef struct _grk_channel_description grk_channel_description |
Channel definition: channel index, type, association.
typedef enum _GRK_CHANNEL_TYPE GRK_CHANNEL_TYPE |
typedef grk_object grk_codec |
typedef enum _GRK_CODEC_FORMAT GRK_CODEC_FORMAT |
Supported JPEG 2000 formats.
typedef struct _grk_color grk_color |
ICC profile, palette, channel definition.
typedef enum _GRK_COLOR_SPACE GRK_COLOR_SPACE |
Supported color spaces.
typedef struct _grk_component_mapping_comp grk_component_mapping_comp |
Note: "component" refers to an image component as decompressed from the code stream, while "channel" refers to a component resulting from the application of a Palette box LUT and a Component mapping box.
Component mappings: component index, mapping type, palette column
typedef struct _grk_cparameters grk_cparameters |
Compress parameters.
typedef struct _grk_decompress_core_params grk_decompress_core_params |
Core decompression parameters.
typedef struct _grk_decompress_params grk_decompress_parameters |
Decompression parameters.
typedef enum _GRK_ENUM_COLOUR_SPACE GRK_ENUM_COLOUR_SPACE |
typedef struct _grk_header_info grk_header_info |
Header info.
typedef struct _grk_image grk_image |
typedef struct _grk_image_comp grk_image_comp |
Image component.
typedef struct _grk_image_meta grk_image_meta |
typedef struct _grk_io_buf grk_io_buf |
typedef bool(* grk_io_callback) (uint32_t threadId, grk_io_buf buffer, void *io_user_data) |
typedef struct _grk_io_init grk_io_init |
typedef bool(* grk_io_pixels_callback) (uint32_t threadId, grk_io_buf buffer, void *user_data) |
typedef void(* grk_io_register_reclaim_callback) (grk_io_init io_init, grk_io_callback reclaim_callback, void *io_user_data, void *reclaim_user_data) |
typedef void(* grk_msg_callback) (const char *msg, void *client_data) |
Logging callback.
msg | message |
client_data | client data passed to callback |
typedef struct _grk_object grk_object |
Grok ref-counted object.
typedef struct _grk_palette_data grk_palette_data |
Palette data.
typedef struct _grk_plugin_band grk_plugin_band |
Plugin band.
typedef struct _grk_plugin_code_block grk_plugin_code_block |
Plugin code block.
typedef struct grk_plugin_compress_batch_info grk_plugin_compress_batch_info |
typedef uint64_t(* GRK_PLUGIN_COMPRESS_USER_CALLBACK) (grk_plugin_compress_user_callback_info *info) |
typedef struct grk_plugin_compress_user_callback_info grk_plugin_compress_user_callback_info |
typedef int32_t(* grk_plugin_decompress_callback) (grk_plugin_decompress_callback_info *info) |
typedef struct _grk_plugin_init_info grk_plugin_init_info |
typedef struct _grk_plugin_load_info grk_plugin_load_info |
typedef struct _grk_plugin_pass grk_plugin_pass |
Plugin pass.
typedef struct _grk_plugin_precinct grk_plugin_precinct |
Plugin precinct.
typedef struct _grk_plugin_resolution grk_plugin_resolution |
Plugin resolution.
typedef struct _grk_plugin_tile grk_plugin_tile |
Plugin tile.
typedef struct grk_plugin_tile_component grk_plugin_tile_component |
Plugin tile component.
typedef struct _grk_precision grk_precision |
Precision.
typedef enum _grk_precision_mode grk_precision_mode |
Precision mode.
typedef enum _GRK_PROG_ORDER GRK_PROG_ORDER |
Progression order.
typedef struct _grk_progression grk_progression |
Progression order change.
typedef enum _GRK_RATE_CONTROL_ALGORITHM GRK_RATE_CONTROL_ALGORITHM |
Rate control algorithms GRK_RATE_CONTROL_BISECT: bisect with all truncation points GRK_RATE_CONTROL_PCRD_OPT: bisect with only feasible truncation points.
typedef struct _grk_raw_comp_cparameters grk_raw_comp_cparameters |
RAW component compress parameters.
typedef struct _grk_raw_cparameters grk_raw_cparameters |
RAW image compress parameters.
typedef void(* grk_stream_free_user_data_fn) (void *user_data) |
free user data callback
@user_data user data
typedef struct _grk_stream_params grk_stream_params |
JPEG 2000 stream parameters.
Client must populate one of the following options :
typedef size_t(* grk_stream_read_fn) (uint8_t *buffer, size_t numBytes, void *user_data) |
read stream callback
@buffer buffer to write stream to @numBytes number of bytes to write to buffer @user_data user data
typedef bool(* grk_stream_seek_fn) (uint64_t offset, void *user_data) |
seek (absolute) callback
@offset absolute stream offset @user_data user data
typedef size_t(* grk_stream_write_fn) (const uint8_t *buffer, size_t numBytes, void *user_data) |
write stream callback
@buffer buffer to read stream from @numBytes number of bytes to read from buffer @user_data user data
typedef enum _GRK_SUPPORTED_FILE_FMT GRK_SUPPORTED_FILE_FMT |
All supported file formats.
typedef enum _GRK_TILE_CACHE_STRATEGY GRK_TILE_CACHE_STRATEGY |
typedef int(* GROK_INIT_DECOMPRESSORS) (grk_header_info *header_info, grk_image *image) |
enum _GRK_CHANNEL_ASSOC |
enum _GRK_CHANNEL_TYPE |
enum _GRK_CODEC_FORMAT |
enum _GRK_COLOR_SPACE |
enum _grk_precision_mode |
enum _GRK_PROG_ORDER |
Progression order.
GRK_API uint64_t GRK_CALLCONV grk_compress | ( | grk_codec * | codec, |
grk_plugin_tile * | tile ) |
Compress an image into a JPEG 2000 code stream using plugin.
codec | compression codec |
tile | plugin tile |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API grk_codec *GRK_CALLCONV grk_compress_init | ( | grk_stream_params * | stream_params, |
grk_cparameters * | parameters, | ||
grk_image * | p_image ) |
Set up the compressor parameters using the current image and user parameters.
codec | compression codec |
parameters | compression parameters |
image | input image |
References _grk_stream_params::buf, _grk_stream_params::buf_len, grk::create_mem_stream(), grk::Logger::error(), _grk_stream_params::file, GrkCodec::getImpl(), GRK_CODEC_J2K, GRK_CODEC_JP2, grk_compress_create(), grk_compress_start(), GRK_FMT_J2K, GRK_FMT_JP2, grk_object_unref(), grk::grk_read(), grk_stream_create_file_stream(), grk_stream_create_stream(), grk::Logger::logger_, and _grk_stream_params::write_fn.
GRK_API void GRK_CALLCONV grk_compress_set_default_params | ( | grk_cparameters * | parameters | ) |
Set compressing parameters to default values:
Lossless Single tile Size of precinct : 2^15 x 2^15 (i.e. single precinct) Size of code block : 64 x 64 Number of resolutions: 6 No SOP marker in the code stream No EPH marker in the code stream No mode switches Progression order: LRCP No ROI upshifted Image origin lies at (0,0) Tile origin lies at (0,0) Reversible DWT 5-3 transform
parameters | Compression parameters |
References grk::GRK_COMP_PARAM_DEFAULT_CBLOCKH, grk::GRK_COMP_PARAM_DEFAULT_CBLOCKW, grk::GRK_DEFAULT_NUMRESOLUTION, grk::GRK_DEFAULT_PROG_ORDER, GRK_FMT_UNK, GRK_PROFILE_NONE, and grk::grk_read().
GRK_API bool GRK_CALLCONV grk_decompress | ( | grk_codec * | codec, |
grk_plugin_tile * | tile ) |
Decompress image from a JPEG 2000 code stream.
codec | decompression codec |
tile | tile struct from plugin |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API bool GRK_CALLCONV grk_decompress_detect_format | ( | const char * | fileName, |
GRK_CODEC_FORMAT * | fmt ) |
Detect jpeg 2000 format from file Format is either GRK_FMT_J2K or GRK_FMT_JP2.
fileName | file name |
fmt | pointer to detected format |
References grk_decompress_buffer_detect_format(), and grk::grk_read().
GRK_API grk_image *GRK_CALLCONV grk_decompress_get_composited_image | ( | grk_codec * | codec | ) |
Get decompressed composite image.
codec | decompression codec |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API grk_image *GRK_CALLCONV grk_decompress_get_tile_image | ( | grk_codec * | codec, |
uint16_t | tileIndex ) |
Get decompressed tile image.
codec | decompression codec |
tileIndex | tile index |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API grk_codec *GRK_CALLCONV grk_decompress_init | ( | grk_stream_params * | stream_params, |
grk_decompress_core_params * | core_params ) |
Initialize decompressor.
stream_params | source stream parameters |
core_params | decompress core parameters |
References _grk_stream_params::buf, _grk_stream_params::buf_len, _grk_stream_params::file, GrkCodec::getImpl(), grk_decompress_create_from_buffer(), grk_decompress_create_from_callbacks(), grk_decompress_create_from_file(), grk_object_unref(), grk::grk_read(), and _grk_stream_params::read_fn.
GRK_API bool GRK_CALLCONV grk_decompress_read_header | ( | grk_codec * | codec, |
grk_header_info * | header_info ) |
Decompress JPEG 2000 header.
codec | decompression codec |
header_info | information read from JPEG 2000 header. |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API void GRK_CALLCONV grk_decompress_set_default_params | ( | grk_decompress_parameters * | parameters | ) |
Initialize decompress parameters with default values.
parameters | decompression parameters |
References GRK_RANDOM_ACCESS_PLM, GRK_RANDOM_ACCESS_PLT, GRK_RANDOM_ACCESS_TLM, grk::grk_read(), and GRK_TILE_CACHE_NONE.
GRK_API bool GRK_CALLCONV grk_decompress_set_window | ( | grk_codec * | codec, |
float | start_x, | ||
float | start_y, | ||
float | end_x, | ||
float | end_y ) |
Set the given area to be decompressed.
This function should be called right after grk_decompress_read_header is called, and before any tile header is read.
codec | decompression codec |
start_x | left position of the rectangle to decompress (in image coordinates). |
end_x | the right position of the rectangle to decompress (in image coordinates). |
start_y | up position of the rectangle to decompress (in image coordinates). |
end_y | bottom position of the rectangle to decompress (in image coordinates). |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API bool GRK_CALLCONV grk_decompress_tile | ( | grk_codec * | codec, |
uint16_t | tileIndex ) |
Decompress a specific tile.
codec | decompression codec |
tileIndex | index of the tile to be decompressed |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API void GRK_CALLCONV grk_deinitialize | ( | ) |
De-initialize library.
References ExecSingleton::destroy(), and grk_plugin_cleanup().
GRK_API void GRK_CALLCONV grk_dump_codec | ( | grk_codec * | codec, |
uint32_t | info_flag, | ||
FILE * | output_stream ) |
Dump codec information to file.
codec | decompression codec |
info_flag | type of information dump. |
output_stream | codec information is dumped to output stream |
References GrkCodec::getImpl(), and grk::grk_read().
GRK_API grk_image_meta *GRK_CALLCONV grk_image_meta_new | ( | void | ) |
Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::FileFormatCompress::init().
GRK_API grk_image *GRK_CALLCONV grk_image_new | ( | uint16_t | numcmpts, |
grk_image_comp * | cmptparms, | ||
GRK_COLOR_SPACE | clrspc, | ||
bool | alloc_data ) |
Create image.
numcmpts | number of components |
cmptparms | component parameters |
clrspc | image color space |
alloc_data | if true, allocate component data buffers |
References grk::GrkImage::create(), and grk::grk_read().
GRK_API void GRK_CALLCONV grk_initialize | ( | const char * | pluginPath, |
uint32_t | numthreads, | ||
bool | verbose ) |
Initialize library.
pluginPath | path to plugin |
numthreads | number of threads to use for compress/decompress |
References grk_plugin_load(), grk::grk_read(), ExecSingleton::instance(), is_plugin_initialized, _grk_plugin_load_info::pluginPath, and _grk_plugin_load_info::verbose.
GRK_API grk_object *GRK_CALLCONV grk_object_ref | ( | grk_object * | obj | ) |
Increment ref count.
References _grk_object::wrapper.
Referenced by grk::GrkImage::copyHeader(), and grk::FileFormatCompress::init().
GRK_API void GRK_CALLCONV grk_object_unref | ( | grk_object * | obj | ) |
References grk::GrkObjectWrapper::unref(), and _grk_object::wrapper.
Referenced by grk::GrkImage::cieLabToRGB(), grk::CodeStreamDecompress::createOutputImage(), grk::TileProcessor::generateImage(), grk_compress_init(), grk_decompress_create_from_buffer(), grk_decompress_create_from_callbacks(), grk_decompress_create_from_file(), grk_decompress_init(), grk::TileProcessor::release(), grk::GrkImage::sycc420_to_rgb(), grk::GrkImage::sycc422_to_rgb(), grk::GrkImage::sycc444_to_rgb(), grk::CodeStream::~CodeStream(), grk::CodeStreamDecompress::~CodeStreamDecompress(), grk::FileFormatCompress::~FileFormatCompress(), GrkCodec::~GrkCodec(), grk::GrkImage::~GrkImage(), grk::Strip::~Strip(), and grk::TileCache::~TileCache().
GRK_API int32_t GRK_CALLCONV grk_plugin_batch_compress | ( | grk_plugin_compress_batch_info | info | ) |
Batch compress with plugin.
input_dir | directory holding input images |
output_dir | directory holding compressed output images |
compress_parameters | compress parameters |
callback | callback |
References grk_plugin_compress_batch_info::callback, grk_plugin_internal_encode_callback(), grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_batch_encode_method_name, pluginLoaded, and userEncodeCallback.
GRK_API int32_t GRK_CALLCONV grk_plugin_batch_decompress | ( | void | ) |
Initiate batch decompress.
References grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_batch_decode_method_name, and pluginLoaded.
GRK_API void GRK_CALLCONV grk_plugin_cleanup | ( | void | ) |
Release plugin resources.
References grk::minpf_cleanup_plugin_manager(), and pluginLoaded.
Referenced by grk_deinitialize().
GRK_API int32_t GRK_CALLCONV grk_plugin_compress | ( | grk_cparameters * | compress_parameters, |
GRK_PLUGIN_COMPRESS_USER_CALLBACK | callback ) |
Compress with plugin.
compress_parameters | compress parameters |
callback | callback |
References grk_plugin_internal_encode_callback(), grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_encode_method_name, pluginLoaded, and userEncodeCallback.
GRK_API int32_t GRK_CALLCONV grk_plugin_decompress | ( | grk_decompress_parameters * | decompress_parameters, |
grk_plugin_decompress_callback | callback ) |
Decompress with plugin.
decompress_parameters | decompress parameters |
callback | callback |
References decodeCallback, grk_plugin_internal_decode_callback(), grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_decode_method_name, and pluginLoaded.
GRK_API uint32_t GRK_CALLCONV grk_plugin_get_debug_state | ( | ) |
Get debug state of plugin.
References GRK_PLUGIN_STATE_NO_DEBUG, grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_get_debug_state_method_name, and pluginLoaded.
Referenced by grk::compress_synch_with_plugin(), grk::TileProcessor::doCompress(), grk::TileProcessor::init(), grk::TileProcessor::pcrdBisectSimple(), and grk::tile_equals().
GRK_API bool GRK_CALLCONV grk_plugin_init | ( | grk_plugin_init_info | initInfo | ) |
Initialize plugin.
References grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_init_method_name, and pluginLoaded.
GRK_API int32_t GRK_CALLCONV grk_plugin_init_batch_decompress | ( | const char * | input_dir, |
const char * | output_dir, | ||
grk_decompress_parameters * | decompress_parameters, | ||
grk_plugin_decompress_callback | callback ) |
Initialize batch decompress.
input_dir | input directory holding compressed images |
output_dir | output directory holding decompressed images |
decompress_parameters | decompress parameters |
callback | callback |
References decodeCallback, grk_plugin_internal_decode_callback(), grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_init_batch_decode_method_name, and pluginLoaded.
GRK_API bool GRK_CALLCONV grk_plugin_load | ( | grk_plugin_load_info | info | ) |
Load plugin.
info | plugin loading info |
References grk::grk_read(), grk::minpf_cleanup_plugin_manager(), grk::minpf_get_dynamic_library_extension(), grk::minpf_load_from_path(), pathSeparator(), pluginLoaded, _grk_plugin_load_info::pluginPath, and _grk_plugin_load_info::verbose.
Referenced by grk_initialize().
GRK_API void GRK_CALLCONV grk_plugin_stop_batch_compress | ( | void | ) |
Stop batch compress.
References grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_stop_batch_encode_method_name, and pluginLoaded.
GRK_API void GRK_CALLCONV grk_plugin_stop_batch_decompress | ( | void | ) |
Stop batch decompress.
References grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_stop_batch_decode_method_name, and pluginLoaded.
GRK_API void GRK_CALLCONV grk_plugin_wait_for_batch_complete | ( | void | ) |
Wait for batch job to complete.
References funcPluginWaitForBatchComplete, grk::grk_read(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_wait_for_batch_complete_method_name, and pluginLoaded.
GRK_API void GRK_CALLCONV grk_set_default_stream_params | ( | grk_stream_params * | params | ) |
Initialize stream parameters with default values.
parameters | stream parameters |
References grk::grk_read().
GRK_API bool GRK_CALLCONV grk_set_MCT | ( | grk_cparameters * | parameters, |
float * | encodingMatrix, | ||
int32_t * | dc_shift, | ||
uint32_t | nbComp ) |
Set the MCT matrix to use.
parameters | the parameters to change. |
encodingMatrix | the compressing matrix. |
dc_shift | the dc shift coefficients to use. |
nbComp | the number of components of the image. |
References GRK_EXTENSION_MCT, GRK_IS_PART2, grk::grk_malloc(), GRK_PROFILE_PART2, and grk::grk_read().
GRK_API void GRK_CALLCONV grk_set_msg_handlers | ( | grk_msg_callback | info_callback, |
void * | info_user_data, | ||
grk_msg_callback | warn_callback, | ||
void * | warn_user_data, | ||
grk_msg_callback | error_callback, | ||
void * | error_user_data ) |
GRK_API const char *GRK_CALLCONV grk_version | ( | void | ) |