#ifdef _WIN32
#include <windows.h>
#endif
#include "opj_includes.h"
OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec,
opj_msg_callback p_callback,
void * p_user_data)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec,
opj_msg_callback p_callback,
void * p_user_data)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec,
opj_msg_callback p_callback,
void * p_user_data)
{ … }
static OPJ_SIZE_T opj_read_from_file(void * p_buffer, OPJ_SIZE_T p_nb_bytes,
void * p_user_data)
{ … }
static OPJ_UINT64 opj_get_data_length_from_file(void * p_user_data)
{ … }
static OPJ_SIZE_T opj_write_from_file(void * p_buffer, OPJ_SIZE_T p_nb_bytes,
void * p_user_data)
{ … }
static OPJ_OFF_T opj_skip_from_file(OPJ_OFF_T p_nb_bytes, void * p_user_data)
{ … }
static OPJ_BOOL opj_seek_from_file(OPJ_OFF_T p_nb_bytes, void * p_user_data)
{ … }
static void opj_close_from_file(void* p_user_data)
{ … }
#ifdef _WIN32
#ifndef OPJ_STATIC
BOOL APIENTRY
DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved);
BOOL APIENTRY
DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
OPJ_ARG_NOT_USED(lpReserved);
OPJ_ARG_NOT_USED(hModule);
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH :
break;
case DLL_PROCESS_DETACH :
break;
case DLL_THREAD_ATTACH :
case DLL_THREAD_DETACH :
break;
}
return TRUE;
}
#endif
#endif
const char* OPJ_CALLCONV opj_version(void)
{ … }
opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
{ … }
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t
*parameters)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec,
int num_threads)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
opj_dparameters_t *parameters
)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
OPJ_BOOL strict)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream,
opj_codec_t *p_codec,
opj_image_t **p_image)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec,
OPJ_UINT32 numcomps,
const OPJ_UINT32* comps_indices,
OPJ_BOOL apply_color_transforms)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_codec,
opj_stream_t *p_stream,
opj_image_t* p_image)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec,
opj_image_t* p_image,
OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
OPJ_INT32 p_end_x, OPJ_INT32 p_end_y
)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(opj_codec_t *p_codec,
opj_stream_t * p_stream,
OPJ_UINT32 * p_tile_index,
OPJ_UINT32 * p_data_size,
OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
OPJ_UINT32 * p_nb_comps,
OPJ_BOOL * p_should_go_on)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size,
opj_stream_t *p_stream
)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(opj_codec_t *p_codec,
opj_stream_t *p_stream,
opj_image_t *p_image,
OPJ_UINT32 tile_index)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec,
OPJ_UINT32 res_factor)
{ … }
opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
{ … }
void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t
*parameters)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec,
opj_cparameters_t *parameters,
opj_image_t *p_image)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(opj_codec_t *p_codec,
const char* const* options)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_start_compress(opj_codec_t *p_codec,
opj_image_t * p_image,
opj_stream_t *p_stream)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_end_compress(opj_codec_t *p_codec,
opj_stream_t *p_stream)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec,
opj_stream_t *p_stream)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
OPJ_FLOAT32 * pEncodingMatrix,
OPJ_INT32 * p_dc_shift, OPJ_UINT32 pNbComp)
{ … }
OPJ_BOOL OPJ_CALLCONV opj_write_tile(opj_codec_t *p_codec,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size,
opj_stream_t *p_stream)
{ … }
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
{ … }
void OPJ_CALLCONV opj_dump_codec(opj_codec_t *p_codec,
OPJ_INT32 info_flag,
FILE* output_stream)
{ … }
opj_codestream_info_v2_t* OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec)
{ … }
void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info)
{ … }
opj_codestream_index_t * OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec)
{ … }
void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
{ … }
opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream(
const char *fname, OPJ_BOOL p_is_read_stream)
{ … }
opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream(
const char *fname,
OPJ_SIZE_T p_size,
OPJ_BOOL p_is_read_stream)
{ … }
void* OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size)
{ … }
void OPJ_CALLCONV opj_image_data_free(void* ptr)
{ … }