|
Grok 15.1.0
|
#include <sys/stat.h>#include <unistd.h>#include <sys/mman.h>#include <fcntl.h>#include "grk_includes.h"Classes | |
| struct | GrkCodec |
| struct | InitState |
Functions | |
| static bool | grk_compress_start (grk_object *codec) |
| Start compressing image. | |
| static grk_stream * | grk_stream_create_file_stream (const char *fname, size_t buffer_size, bool is_read_stream) |
| Create stream from a file identified with its filename with a specific buffer size. | |
| static grk_stream * | grk_stream_create_stream (grk_stream_params *stream_params) |
| static grk_stream * | grk_stream_new (size_t buffer_size, bool is_input) |
| grk_object * | grk_decompress_create (grk_stream *stream) |
| static void | infoCallback (const char *msg, void *client_data) |
| static void | debugCallback (const char *msg, void *client_data) |
| static void | traceCallback (const char *msg, void *client_data) |
| static void | warningCallback (const char *msg, void *client_data) |
| static void | errorCallback (const char *msg, void *client_data) |
| bool | grk_initialize (const char *pluginPath, uint32_t numThreads) |
| Initializes Grok library Must be called before any Grok API calls. | |
| GRK_API void GRK_CALLCONV | grk_deinitialize () |
| De-initializes Grok library Not usually necessary to explicitly call this to de-initialize. | |
| GRK_API grk_object *GRK_CALLCONV | grk_object_ref (grk_object *obj) |
| Increments ref count. | |
| GRK_API void GRK_CALLCONV | grk_object_unref (grk_object *obj) |
| GRK_API void GRK_CALLCONV | grk_set_msg_handlers (grk_msg_handlers msg_handlers) |
| Sets log message handlers. | |
| static size_t | grk_read_from_file (uint8_t *buffer, size_t numBytes, void *p_file) |
| static uint64_t | grk_get_data_length_from_file (void *filePtr) |
| static size_t | grk_write_to_file (const uint8_t *buffer, size_t numBytes, void *p_file) |
| static bool | grk_seek_in_file (uint64_t numBytes, void *p_user_data) |
| const char *GRK_CALLCONV | grk_version (void) |
| Gets library version. | |
| grk_image *GRK_CALLCONV | grk_image_new (uint16_t numcmpts, grk_image_comp *cmptparms, GRK_COLOR_SPACE clrspc, bool alloc_data) |
| Creates image. | |
| grk_image_meta *GRK_CALLCONV | grk_image_meta_new (void) |
| Creates meta. | |
| bool | grk_decompress_buffer_detect_format (uint8_t *buffer, size_t len, GRK_CODEC_FORMAT *fmt) |
| Detect jpeg 2000 format from buffer Format is either GRK_FMT_J2K or GRK_FMT_JP2. | |
| bool GRK_CALLCONV | grk_decompress_detect_format (const char *fileName, GRK_CODEC_FORMAT *fmt) |
| Detects JPEG 2000 format from file Format is either GRK_FMT_J2K, GRK_FMT_JP2 or GRK_FMT_MJ2. | |
| static grk_object * | grk_decompress_create_from_buffer (uint8_t *buf, size_t len) |
| static grk_object * | grk_decompress_create_from_callbacks (grk_stream_params *stream_params) |
| static grk_object * | grk_decompress_create_from_file (const char *file_name) |
| grk_object *GRK_CALLCONV | grk_decompress_init (grk_stream_params *stream_params, grk_decompress_parameters *params) |
| Initializes decompressor. | |
| bool GRK_CALLCONV | grk_decompress_read_header (grk_object *codecWrapper, grk_header_info *header_info) |
| Decompresses JPEG 2000 header. | |
| bool GRK_CALLCONV | grk_decompress_set_window (grk_object *codecWrapper, double start_x, double start_y, double end_x, double end_y) |
| Specifies area to be decompressed. | |
| bool GRK_CALLCONV | grk_decompress (grk_object *codecWrapper, grk_plugin_tile *tile) |
| Decompresses image from a JPEG 2000 code stream. | |
| void GRK_CALLCONV | grk_decompress_wait (grk_object *codecWrapper) |
| bool GRK_CALLCONV | grk_decompress_tile (grk_object *codecWrapper, uint16_t tile_index) |
| Decompresses a specific tile. | |
| void GRK_CALLCONV | grk_dump_codec (grk_object *codecWrapper, uint32_t info_flag, FILE *output_stream) |
| Dumps codec information to file. | |
| bool | grk_set_MCT (grk_cparameters *parameters, const float *pEncodingMatrix, int32_t *p_dc_shift, uint32_t pNbComp) |
| Sets MCT matrix. | |
| grk_image *GRK_CALLCONV | grk_decompress_get_tile_image (grk_object *codecWrapper, uint16_t tile_index) |
| grk_progression_state GRK_CALLCONV | grk_decompress_get_progression_state (grk_object *codec, uint16_t tile_index) |
| Gets grk_progression_state for a tile. | |
| bool GRK_CALLCONV | grk_decompress_set_progression_state (grk_object *codec, grk_progression_state state) |
| Sets grk_progression_state for a tile. | |
| grk_image *GRK_CALLCONV | grk_decompress_get_image (grk_object *codecWrapper) |
| Gets decompressed image. | |
| grk_object *GRK_CALLCONV | grk_compress_create (GRK_CODEC_FORMAT p_format, grk_stream *stream) |
| void GRK_CALLCONV | grk_compress_set_default_params (grk_cparameters *parameters) |
| Sets compression parameters to default values: Lossless Single tile Size of precinct : 2^15 x 2^15 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. | |
| grk_object *GRK_CALLCONV | grk_compress_init (grk_stream_params *stream_params, grk_cparameters *parameters, grk_image *image) |
| Initializes compression process. | |
| bool GRK_CALLCONV | grk_decompress_update (grk_decompress_parameters *params, grk_object *codec) |
| Updates decompressor. | |
| uint64_t GRK_CALLCONV | grk_compress (grk_object *codecWrapper, grk_plugin_tile *tile) |
| Compresses an image into a JPEG 2000 code stream using plugin. | |
| static void | grkFree_file (void *p_user_data) |
| static const char * | pathSeparator () |
| bool GRK_CALLCONV | grk_plugin_load (grk_plugin_load_info info) |
| Loads plugin. | |
| uint32_t GRK_CALLCONV | grk_plugin_get_debug_state () |
| Gets debug state of plugin. | |
| void GRK_CALLCONV | grk_plugin_cleanup (void) |
| Cleans up plugin resources. | |
| GRK_API bool GRK_CALLCONV | grk_plugin_init (grk_plugin_init_info initInfo) |
| Initializes plugin. | |
| uint64_t | grk_plugin_internal_encode_callback (grk_plugin_compress_user_callback_info *info) |
| int32_t GRK_CALLCONV | grk_plugin_compress (grk_cparameters *compress_parameters, GRK_PLUGIN_COMPRESS_USER_CALLBACK callback) |
| Compresses with plugin. | |
| int32_t GRK_CALLCONV | grk_plugin_batch_compress (grk_plugin_compress_batch_info info) |
| Batch-compresses with plugin. | |
| GRK_API void GRK_CALLCONV | grk_plugin_wait_for_batch_complete (void) |
| Waits for batch job to complete. | |
| void GRK_CALLCONV | grk_plugin_stop_batch_compress (void) |
| Stops batch compress. | |
| int32_t | grk_plugin_internal_decode_callback (PluginDecodeCallbackInfo *info) |
| int32_t GRK_CALLCONV | grk_plugin_decompress (grk_decompress_parameters *decompress_parameters, grk_plugin_decompress_callback callback) |
| Decompresses single image with plugin. | |
| 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) |
| Initializes batch decompress with plugin. | |
| int32_t GRK_CALLCONV | grk_plugin_batch_decompress (void) |
| Initiates batch decompress. | |
| void GRK_CALLCONV | grk_plugin_stop_batch_decompress (void) |
| Stops batch decompress. | |
| void | grk_stream_set_read_function (grk_stream *stream, grk_stream_read_fn func) |
| Set read function. | |
| void | grk_stream_set_seek_function (grk_stream *stream, grk_stream_seek_fn func) |
| Set (absolute) seek function (stream must be seekable) | |
| void | grk_stream_set_write_function (grk_stream *stream, grk_stream_write_fn func) |
| Set write function. | |
| void | grk_stream_set_user_data (grk_stream *stream, void *p_data, grk_stream_free_user_data_fn func) |
| Set user data for JPEG 2000 stream. | |
| void | grk_stream_set_user_data_length (grk_stream *stream, uint64_t data_length) |
| Set the length of the user data for the stream. | |
Variables | |
| static InitState | initState_ |
| static const char * | JP2_RFC3745_MAGIC = "\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a" |
| static const char * | J2K_CODESTREAM_MAGIC = "\xff\x4f\xff\x51" |
| static const char * | plugin_get_debug_state_method_name = "plugin_get_debug_state" |
| static const char * | plugin_init_method_name = "plugin_init" |
| static const char * | plugin_encode_method_name = "plugin_encode" |
| static const char * | plugin_batch_encode_method_name = "plugin_batch_encode" |
| static const char * | plugin_stop_batch_encode_method_name = "plugin_stop_batch_encode" |
| static const char * | plugin_wait_for_batch_complete_method_name = "plugin_wait_for_batch_complete" |
| static const char * | plugin_decode_method_name = "plugin_decompress" |
| static const char * | plugin_init_batch_decode_method_name = "plugin_init_batch_decompress" |
| static const char * | plugin_batch_decode_method_name = "plugin_batch_decompress" |
| static const char * | plugin_stop_batch_decode_method_name = "plugin_stop_batch_decompress" |
| bool | pluginLoaded = false |
| GRK_PLUGIN_COMPRESS_USER_CALLBACK | userEncodeCallback = 0 |
| PLUGIN_WAIT_FOR_BATCH_COMPLETE | funcPluginWaitForBatchComplete = nullptr |
| grk_plugin_decompress_callback | decodeCallback = 0 |
|
static |
Referenced by grk_initialize().
|
static |
Referenced by grk_initialize().
| uint64_t GRK_CALLCONV grk_compress | ( | grk_object * | codec, |
| grk_plugin_tile * | tile ) |
Compresses an image into a JPEG 2000 code stream using plugin.
| codec | compression codec (see grk_object) |
| tile | plugin tile (see grk_plugin_tile) |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| grk_object *GRK_CALLCONV grk_compress_create | ( | GRK_CODEC_FORMAT | p_format, |
| grk_stream * | stream ) |
References GrkCodec::compressor_, grk::BufferedStream::getImpl(), GRK_CALLCONV, GRK_CODEC_J2K, GRK_CODEC_JP2, and GrkCodec::obj.
Referenced by grk_compress_init().
| grk_object *GRK_CALLCONV grk_compress_init | ( | grk_stream_params * | stream_params, |
| grk_cparameters * | parameters, | ||
| grk_image * | image ) |
Initializes compression process.
| stream_params | Stream parameters (see grk_stream_params) |
| parameters | Compression parameters (see grk_cparameters) |
| image | Input image (see grk_image) |
References grk::create_mem_stream(), GrkCodec::getImpl(), GRK_CALLCONV, GRK_CODEC_J2K, GRK_CODEC_JP2, grk_compress_create(), grk_compress_start(), GRK_FMT_J2K, GRK_FMT_JP2, grk_object_unref(), grk_stream_create_file_stream(), grk_stream_create_stream(), and grk::grklog.
| void GRK_CALLCONV grk_compress_set_default_params | ( | grk_cparameters * | parameters | ) |
Sets compression parameters to default values: Lossless Single tile Size of precinct : 2^15 x 2^15 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 (see grk_cparameters) |
References GRK_CALLCONV, grk::GRK_COMP_PARAM_DEFAULT_CBLOCKH, grk::GRK_COMP_PARAM_DEFAULT_CBLOCKW, grk::GRK_DEFAULT_NUMRESOLUTION, grk::GRK_DEFAULT_PROG_ORDER, GRK_FMT_UNK, and GRK_PROFILE_NONE.
|
static |
Start compressing image.
| codec | compression codec |
References GrkCodec::getImpl().
Referenced by grk_compress_init().
| bool GRK_CALLCONV grk_decompress | ( | grk_object * | codec, |
| grk_plugin_tile * | tile ) |
Decompresses image from a JPEG 2000 code stream.
| codec | decompression codec (see grk_object) |
| tile | tile struct from plugin (see grk_plugin_tile) |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| bool grk_decompress_buffer_detect_format | ( | uint8_t * | buffer, |
| size_t | len, | ||
| GRK_CODEC_FORMAT * | fmt ) |
Detect jpeg 2000 format from buffer Format is either GRK_FMT_J2K or GRK_FMT_JP2.
| buffer | buffer |
| len | buffer length |
| fmt | pointer to detected format |
References GRK_CODEC_J2K, GRK_CODEC_JP2, GRK_CODEC_UNK, grk::grklog, J2K_CODESTREAM_MAGIC, and JP2_RFC3745_MAGIC.
Referenced by grk::create_mem_stream(), grk_decompress_detect_format(), grk_stream_create_file_stream(), and grk_stream_create_stream().
| grk_object * grk_decompress_create | ( | grk_stream * | stream | ) |
|
static |
References grk::create_mem_stream(), grk_decompress_create(), grk_object_unref(), and grk::grklog.
Referenced by grk_decompress_init().
|
static |
References grk_decompress_create(), grk_object_unref(), grk_stream_create_stream(), and grk::grklog.
Referenced by grk_decompress_init().
|
static |
References grk_decompress_create(), grk_object_unref(), grk_stream_create_file_stream(), and grk::grklog.
Referenced by grk_decompress_init().
| bool GRK_CALLCONV grk_decompress_detect_format | ( | const char * | file_name, |
| GRK_CODEC_FORMAT * | fmt ) |
Detects JPEG 2000 format from file Format is either GRK_FMT_J2K, GRK_FMT_JP2 or GRK_FMT_MJ2.
| file_name | file name |
| fmt | pointer to detected format (see GRK_CODEC_FORMAT) |
References GRK_CALLCONV, grk_decompress_buffer_detect_format(), and grk::grklog.
| grk_image *GRK_CALLCONV grk_decompress_get_image | ( | grk_object * | codec | ) |
Gets decompressed image.
| codec | decompression codec (see grk_object) |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| grk_progression_state GRK_CALLCONV grk_decompress_get_progression_state | ( | grk_object * | codec, |
| uint16_t | tile_index ) |
Gets grk_progression_state for a tile.
| codec | codec (see grk_object) |
| tile_index | tile index |
References GRK_CALLCONV.
| grk_image *GRK_CALLCONV grk_decompress_get_tile_image | ( | grk_object * | codecWrapper, |
| uint16_t | tile_index ) |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| grk_object *GRK_CALLCONV grk_decompress_init | ( | grk_stream_params * | stream_params, |
| grk_decompress_parameters * | params ) |
Initializes decompressor.
| stream_params | source stream parameters (see grk_stream_params) |
| params | decompress parameters (see grk_decompress_parameters) object will be created, otherwise the codec object stored in *codec will be re-initialized |
References GrkCodec::getImpl(), GRK_CALLCONV, grk_decompress_create_from_buffer(), grk_decompress_create_from_callbacks(), grk_decompress_create_from_file(), and grk_object_unref().
| bool GRK_CALLCONV grk_decompress_read_header | ( | grk_object * | codec, |
| grk_header_info * | header_info ) |
Decompresses JPEG 2000 header.
| codec | decompression codec (see grk_object) |
| header_info | information read from JPEG 2000 header (see grk_header_info) |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| bool GRK_CALLCONV grk_decompress_set_progression_state | ( | grk_object * | codec, |
| grk_progression_state | state ) |
Sets grk_progression_state for a tile.
| codec | codec (see grk_object) |
| state | grk_progression_state |
References GRK_CALLCONV.
| bool GRK_CALLCONV grk_decompress_set_window | ( | grk_object * | codec, |
| double | start_x, | ||
| double | start_y, | ||
| double | end_x, | ||
| double | end_y ) |
Specifies 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 (see grk_object) |
| 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_CALLCONV.
| bool GRK_CALLCONV grk_decompress_tile | ( | grk_object * | codec, |
| uint16_t | tile_index ) |
Decompresses a specific tile.
| codec | decompression codec (see grk_object) |
| tile_index | index of the tile to be decompressed |
References GrkCodec::getImpl(), and GRK_CALLCONV.
| bool GRK_CALLCONV grk_decompress_update | ( | grk_decompress_parameters * | params, |
| grk_object * | codec ) |
Updates decompressor.
| params | decompress parameters (see grk_decompress_parameters) |
| codec | codec (see grk_object) |
References GRK_CALLCONV.
| void GRK_CALLCONV grk_decompress_wait | ( | grk_object * | codecWrapper | ) |
References GRK_CALLCONV.
| GRK_API void GRK_CALLCONV grk_deinitialize | ( | ) |
De-initializes Grok library Not usually necessary to explicitly call this to de-initialize.
References ExecSingleton::destroy(), GRK_API, GRK_CALLCONV, and grk_plugin_cleanup().
| void GRK_CALLCONV grk_dump_codec | ( | grk_object * | codec, |
| uint32_t | info_flag, | ||
| FILE * | output_stream ) |
Dumps codec information to file.
| codec | decompression codec (see grk_object) |
| info_flag | type of information dump. |
| output_stream | codec information is dumped to output stream |
References GrkCodec::getImpl(), and GRK_CALLCONV.
|
static |
References GRK_FSEEK, and GRK_FTELL.
Referenced by grk_stream_create_file_stream().
| grk_image_meta *GRK_CALLCONV grk_image_meta_new | ( | void | ) |
Creates meta.
References GRK_CALLCONV.
Referenced by grk::CodeStreamDecompress::CodeStreamDecompress(), and grk::FileFormatCompress::init().
| grk_image *GRK_CALLCONV grk_image_new | ( | uint16_t | numcmpts, |
| grk_image_comp * | cmptparms, | ||
| GRK_COLOR_SPACE | clrspc, | ||
| bool | alloc_data ) |
Creates image.
| numcmpts | number of components |
| cmptparms | component parameters (see grk_image_comp) |
| clrspc | image color space (see GRK_COLOR_SPACE) |
| alloc_data | if true, allocate component data buffers |
References grk::GrkImage::create(), and GRK_CALLCONV.
| bool grk_initialize | ( | const char * | pluginPath, |
| uint32_t | num_threads ) |
Initializes Grok library Must be called before any Grok API calls.
| pluginPath | path to plugin |
| num_threads | number of threads to use for compress/decompress |
References ExecSingleton::create(), debugCallback(), errorCallback(), grk_plugin_load(), grk_set_msg_handlers(), grk::grklog, infoCallback(), initState_, traceCallback(), and warningCallback().
| GRK_API grk_object *GRK_CALLCONV grk_object_ref | ( | grk_object * | obj | ) |
Increments ref count.
| obj | Grok object (see grk_object) |
References GRK_API, and GRK_CALLCONV.
Referenced by grk::GrkImage::copyHeader(), and grk::FileFormatCompress::init().
| GRK_API void GRK_CALLCONV grk_object_unref | ( | grk_object * | obj | ) |
References GRK_API, GRK_CALLCONV, and grk::GrkObjectWrapper::unref().
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(), and grk::TileCache::~TileCache().
| int32_t GRK_CALLCONV grk_plugin_batch_compress | ( | grk_plugin_compress_batch_info | info | ) |
Batch-compresses with plugin.
| info | batch compress info (see grk_plugin_compress_batch_info) |
References grk_plugin_compress_batch_info::callback, GRK_CALLCONV, grk_plugin_internal_encode_callback(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_batch_encode_method_name, pluginLoaded, and userEncodeCallback.
| int32_t GRK_CALLCONV grk_plugin_batch_decompress | ( | void | ) |
Initiates batch decompress.
References GRK_CALLCONV, grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_batch_decode_method_name, and pluginLoaded.
| void GRK_CALLCONV grk_plugin_cleanup | ( | void | ) |
Cleans up plugin resources.
References GRK_CALLCONV, grk::minpf_cleanup_plugin_manager(), and pluginLoaded.
Referenced by grk_deinitialize().
| int32_t GRK_CALLCONV grk_plugin_compress | ( | grk_cparameters * | compress_parameters, |
| GRK_PLUGIN_COMPRESS_USER_CALLBACK | callback ) |
Compresses with plugin.
| compress_parameters | compress parameters (see grk_cparameters) |
| callback | callback (see GRK_PLUGIN_COMPRESS_USER_CALLBACK) |
References GRK_CALLCONV, grk_plugin_internal_encode_callback(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_encode_method_name, pluginLoaded, and userEncodeCallback.
| int32_t GRK_CALLCONV grk_plugin_decompress | ( | grk_decompress_parameters * | decompress_parameters, |
| grk_plugin_decompress_callback | callback ) |
Decompresses single image with plugin.
| decompress_parameters | decompress parameters (see grk_decompress_parameters) |
| callback | callback (see grk_plugin_decompress_callback) |
References decodeCallback, GRK_CALLCONV, grk_plugin_internal_decode_callback(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_decode_method_name, and pluginLoaded.
| uint32_t GRK_CALLCONV grk_plugin_get_debug_state | ( | ) |
Gets debug state of plugin.
References GRK_CALLCONV, GRK_PLUGIN_STATE_NO_DEBUG, 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 | init_info | ) |
Initializes plugin.
| init_info | plugin init info (see grk_plugin_init_info) |
References GRK_API, GRK_CALLCONV, grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_init_method_name, and pluginLoaded.
| 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 ) |
Initializes batch decompress with plugin.
| input_dir | input directory holding compressed images |
| output_dir | output directory holding decompressed images |
| decompress_parameters | decompress parameters (see grk_decompress_parameters) |
| callback | callback (see grk_plugin_decompress_callback) |
References decodeCallback, GRK_CALLCONV, grk_plugin_internal_decode_callback(), grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_init_batch_decode_method_name, and pluginLoaded.
| int32_t grk_plugin_internal_decode_callback | ( | PluginDecodeCallbackInfo * | info | ) |
References grk::PluginDecodeCallbackInfo::cod_format, grk::PluginDecodeCallbackInfo::codec, grk::PluginDecodeCallbackInfo::decod_format, decodeCallback, grk::PluginDecodeCallbackInfo::decompress_flags, grk::PluginDecodeCallbackInfo::decompressor_parameters, grk::PluginDecodeCallbackInfo::header_info, grk::PluginDecodeCallbackInfo::image, grk::PluginDecodeCallbackInfo::init_decompressors_func, grk::PluginDecodeCallbackInfo::inputFile, grk::PluginDecodeCallbackInfo::outputFile, grk::PluginDecodeCallbackInfo::plugin_owns_image, and grk::PluginDecodeCallbackInfo::tile.
Referenced by grk_plugin_decompress(), and grk_plugin_init_batch_decompress().
| uint64_t grk_plugin_internal_encode_callback | ( | grk_plugin_compress_user_callback_info * | info | ) |
References userEncodeCallback.
Referenced by grk_plugin_batch_compress(), and grk_plugin_compress().
| bool GRK_CALLCONV grk_plugin_load | ( | grk_plugin_load_info | info | ) |
Loads plugin.
| info | plugin loading info (see grk_plugin_load_info) |
References GRK_CALLCONV, grk::minpf_cleanup_plugin_manager(), grk::minpf_get_dynamic_library_extension(), grk::minpf_load_from_path(), pathSeparator(), and pluginLoaded.
Referenced by grk_initialize().
| void GRK_CALLCONV grk_plugin_stop_batch_compress | ( | void | ) |
Stops batch compress.
References GRK_CALLCONV, grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_stop_batch_encode_method_name, and pluginLoaded.
| void GRK_CALLCONV grk_plugin_stop_batch_decompress | ( | void | ) |
Stops batch decompress.
References GRK_CALLCONV, 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 | ) |
Waits for batch job to complete.
References funcPluginWaitForBatchComplete, GRK_API, GRK_CALLCONV, grk::minpf_get_plugin_manager(), grk::minpf_get_symbol(), plugin_wait_for_batch_complete_method_name, and pluginLoaded.
|
static |
Referenced by grk_stream_create_file_stream().
|
static |
References GRK_FSEEK.
Referenced by grk_stream_create_file_stream().
| bool grk_set_MCT | ( | grk_cparameters * | parameters, |
| const float * | encoding_matrix, | ||
| int32_t * | dc_shift, | ||
| uint32_t | nb_comp ) |
Sets MCT matrix.
| parameters | compression parameters (see grk_cparameters) |
| encoding_matrix | matrix |
| dc_shift | dc shift coefficients to use |
| nb_comp | number of components of the image. |
References GRK_EXTENSION_MCT, GRK_IS_PART2, grk::grk_malloc(), and GRK_PROFILE_PART2.
| GRK_API void GRK_CALLCONV grk_set_msg_handlers | ( | grk_msg_handlers | msg_handlers | ) |
Sets log message handlers.
| msg_handlers | see grk_msg_handlers |
References GRK_API, GRK_CALLCONV, and grk::grklog.
Referenced by grk_initialize().
|
static |
Create stream from a file identified with its filename with a specific buffer size.
| fname | the name of the file to stream |
| buffer_size | size of the chunk used to stream |
| is_read_stream | whether the stream is a read stream (true) or not (false) |
References grk::BufferedStream::getImpl(), grk_decompress_buffer_detect_format(), grk_get_data_length_from_file(), grk_read_from_file(), grk_seek_in_file(), grk_stream_new(), grk_stream_set_read_function(), grk_stream_set_seek_function(), grk_stream_set_user_data(), grk_stream_set_user_data_length(), grk_stream_set_write_function(), grk_write_to_file(), grkFree_file(), and grk::grklog.
Referenced by grk_compress_init(), and grk_decompress_create_from_file().
|
static |
References grk::BufferedStream::getImpl(), grk_decompress_buffer_detect_format(), grk_stream_new(), grk_stream_set_read_function(), grk_stream_set_seek_function(), grk_stream_set_user_data(), grk_stream_set_user_data_length(), grk_stream_set_write_function(), and grk::grklog.
Referenced by grk_compress_init(), and grk_decompress_create_from_callbacks().
|
static |
Referenced by grk_stream_create_file_stream(), and grk_stream_create_stream().
| void grk_stream_set_read_function | ( | grk_stream * | stream, |
| grk_stream_read_fn | func ) |
Set read function.
| stream | JPEG 2000 stream |
| func | read function |
References grk::BufferedStream::getImpl(), and GROK_STREAM_STATUS_INPUT.
Referenced by grk_stream_create_file_stream(), grk_stream_create_stream(), and grk::set_up_mem_stream().
| void grk_stream_set_seek_function | ( | grk_stream * | stream, |
| grk_stream_seek_fn | func ) |
Set (absolute) seek function (stream must be seekable)
| stream | JPEG 2000 stream |
| func | (absolute) seek function. |
References grk::BufferedStream::getImpl().
Referenced by grk_stream_create_file_stream(), grk_stream_create_stream(), and grk::set_up_mem_stream().
| void grk_stream_set_user_data | ( | grk_stream * | stream, |
| void * | data, | ||
| grk_stream_free_user_data_fn | func ) |
Set user data for JPEG 2000 stream.
| stream | JPEG 2000 stream |
| data | user data |
| func | function to free data when grk_object_unref() is called. |
References grk::BufferedStream::getImpl().
Referenced by grk::create_mem_stream(), grk_stream_create_file_stream(), and grk_stream_create_stream().
| void grk_stream_set_user_data_length | ( | grk_stream * | stream, |
| uint64_t | data_length ) |
Set the length of the user data for the stream.
| stream | JPEG 2000 stream |
| data_length | length of data. |
References grk::BufferedStream::getImpl().
Referenced by grk_stream_create_file_stream(), grk_stream_create_stream(), and grk::set_up_mem_stream().
| void grk_stream_set_write_function | ( | grk_stream * | stream, |
| grk_stream_write_fn | func ) |
Set write function.
| stream | JPEG 2000 stream |
| func | write function |
References grk::BufferedStream::getImpl(), and GROK_STREAM_STATUS_OUTPUT.
Referenced by grk_stream_create_file_stream(), grk_stream_create_stream(), and grk::set_up_mem_stream().
| const char *GRK_CALLCONV grk_version | ( | void | ) |
|
static |
Referenced by grk_stream_create_file_stream().
|
static |
Referenced by grk_stream_create_file_stream().
|
static |
Referenced by grk_initialize().
|
static |
Referenced by grk_plugin_load().
|
static |
Referenced by grk_initialize().
|
static |
Referenced by grk_initialize().
| grk_plugin_decompress_callback decodeCallback = 0 |
| PLUGIN_WAIT_FOR_BATCH_COMPLETE funcPluginWaitForBatchComplete = nullptr |
Referenced by grk_plugin_wait_for_batch_complete().
|
static |
Referenced by grk_initialize().
|
static |
Referenced by grk_decompress_buffer_detect_format().
|
static |
Referenced by grk_decompress_buffer_detect_format().
|
static |
Referenced by grk_plugin_batch_decompress().
|
static |
Referenced by grk_plugin_batch_compress().
|
static |
Referenced by grk_plugin_decompress().
|
static |
Referenced by grk_plugin_compress().
|
static |
Referenced by grk_plugin_get_debug_state().
|
static |
Referenced by grk_plugin_init_batch_decompress().
|
static |
Referenced by grk_plugin_init().
|
static |
Referenced by grk_plugin_stop_batch_decompress().
|
static |
Referenced by grk_plugin_stop_batch_compress().
|
static |
Referenced by grk_plugin_wait_for_batch_complete().
| bool pluginLoaded = false |
Referenced by grk_plugin_batch_compress(), grk_plugin_batch_decompress(), grk_plugin_cleanup(), grk_plugin_compress(), grk_plugin_decompress(), grk_plugin_get_debug_state(), grk_plugin_init(), grk_plugin_init_batch_decompress(), grk_plugin_load(), grk_plugin_stop_batch_compress(), grk_plugin_stop_batch_decompress(), and grk_plugin_wait_for_batch_complete().
| GRK_PLUGIN_COMPRESS_USER_CALLBACK userEncodeCallback = 0 |
Referenced by grk_plugin_batch_compress(), grk_plugin_compress(), and grk_plugin_internal_encode_callback().