OpenJPEG 1.5.1
openjpeg.h File Reference

Go to the source code of this file.

Data Structures

struct  opj_event_mgr
 Message handler object used for. More...
 
struct  opj_poc
 Progression order changes. More...
 
struct  opj_cparameters
 Compression parameters. More...
 
struct  opj_dparameters
 Decompression parameters. More...
 
struct  opj_common_struct
 
struct  opj_cinfo
 Compression context info. More...
 
struct  opj_dinfo
 Decompression context info. More...
 
struct  opj_cio
 Byte input-output stream (CIO) More...
 
struct  opj_image_comp
 Defines a single image component. More...
 
struct  opj_image
 Defines image data and characteristics. More...
 
struct  opj_image_comptparm
 Component parameters structure used by the opj_image_create function. More...
 
struct  opj_packet_info
 Index structure : Information concerning a packet inside tile. More...
 
struct  opj_marker_info_t
 Marker structure. More...
 
struct  opj_tp_info
 Index structure : Information concerning tile-parts. More...
 
struct  opj_tile_info
 Index structure : information regarding tiles. More...
 
struct  opj_codestream_info
 Index structure of the codestream. More...
 

Macros

#define OPJ_API
 
#define OPJ_CALLCONV
 
#define OPJ_TRUE   1
 
#define OPJ_FALSE   0
 
#define OPJ_ARG_NOT_USED(x)
 
#define OPJ_PATH_LEN   4096
 Maximum allowed size for filenames.
 
#define J2K_MAXRLVLS   33
 Number of maximum resolution level authorized.
 
#define J2K_MAXBANDS   (3*J2K_MAXRLVLS-2)
 Number of maximum sub-band linked to number of resolution level.
 
#define JPWL_MAX_NO_TILESPECS   16
 Maximum number of tile parts expected by JPWL: increase at your will.
 
#define JPWL_MAX_NO_PACKSPECS   16
 Maximum number of packet parts expected by JPWL: increase at your will.
 
#define JPWL_MAX_NO_MARKERS   512
 Maximum number of JPWL markers: increase at your will.
 
#define JPWL_PRIVATEINDEX_NAME   "jpwl_index_privatefilename"
 index file name used when JPWL is on
 
#define JPWL_EXPECTED_COMPONENTS   3
 Expect this number of components, so you'll find better the first EPB.
 
#define JPWL_MAXIMUM_TILES   8192
 Expect this maximum number of tiles, to avoid some crashes.
 
#define JPWL_MAXIMUM_HAMMING   2
 Expect this maximum number of bit errors in marker id's.
 
#define JPWL_MAXIMUM_EPB_ROOM   65450
 Expect this maximum number of bytes for composition of EPBs.
 
#define ENUMCS_SRGB   16
 
#define ENUMCS_GRAY   17
 
#define ENUMCS_SYCC   18
 
#define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG   0x0001
 
#define opj_common_fields
 Common fields between JPEG-2000 compression and decompression master structs.
 
#define OPJ_STREAM_READ   0x0001
 The stream was opened for reading.
 
#define OPJ_STREAM_WRITE   0x0002
 The stream was opened for writing.
 

Typedefs

typedef int opj_bool
 
typedef enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
 Rsiz Capabilities.
 
typedef enum CINEMA_MODE OPJ_CINEMA_MODE
 Digital cinema operation mode.
 
typedef enum PROG_ORDER OPJ_PROG_ORDER
 Progression order.
 
typedef enum COLOR_SPACE OPJ_COLOR_SPACE
 Supported image color spaces.
 
typedef enum CODEC_FORMAT OPJ_CODEC_FORMAT
 Supported codec.
 
typedef enum LIMIT_DECODING OPJ_LIMIT_DECODING
 Limit decoding to certain portions of the codestream.
 
typedef void(* opj_msg_callback) (const char *msg, void *client_data)
 Callback function prototype for events.
 
typedef struct opj_event_mgr opj_event_mgr_t
 Message handler object used for.
 
typedef struct opj_poc opj_poc_t
 Progression order changes.
 
typedef struct opj_cparameters opj_cparameters_t
 Compression parameters.
 
typedef struct opj_dparameters opj_dparameters_t
 Decompression parameters.
 
typedef struct opj_common_struct opj_common_struct_t
 
typedef opj_common_struct_topj_common_ptr
 
typedef struct opj_cinfo opj_cinfo_t
 Compression context info.
 
typedef struct opj_dinfo opj_dinfo_t
 Decompression context info.
 
typedef struct opj_cio opj_cio_t
 Byte input-output stream (CIO)
 
typedef struct opj_image_comp opj_image_comp_t
 Defines a single image component.
 
typedef struct opj_image opj_image_t
 Defines image data and characteristics.
 
typedef struct opj_image_comptparm opj_image_cmptparm_t
 Component parameters structure used by the opj_image_create function.
 
typedef struct opj_packet_info opj_packet_info_t
 Index structure : Information concerning a packet inside tile.
 
typedef struct opj_marker_info_t opj_marker_info_t
 Marker structure.
 
typedef struct opj_tp_info opj_tp_info_t
 Index structure : Information concerning tile-parts.
 
typedef struct opj_tile_info opj_tile_info_t
 Index structure : information regarding tiles.
 
typedef struct opj_codestream_info opj_codestream_info_t
 Index structure of the codestream.
 

Enumerations

enum  RSIZ_CAPABILITIES { STD_RSIZ = 0 , CINEMA2K = 3 , CINEMA4K = 4 }
 Rsiz Capabilities. More...
 
enum  CINEMA_MODE { OFF = 0 , CINEMA2K_24 = 1 , CINEMA2K_48 = 2 , CINEMA4K_24 = 3 }
 Digital cinema operation mode. More...
 
enum  PROG_ORDER {
  PROG_UNKNOWN = -1 , LRCP = 0 , RLCP = 1 , RPCL = 2 ,
  PCRL = 3 , CPRL = 4
}
 Progression order. More...
 
enum  COLOR_SPACE {
  CLRSPC_UNKNOWN = -1 , CLRSPC_UNSPECIFIED = 0 , CLRSPC_SRGB = 1 , CLRSPC_GRAY = 2 ,
  CLRSPC_SYCC = 3
}
 Supported image color spaces. More...
 
enum  CODEC_FORMAT { CODEC_UNKNOWN = -1 , CODEC_J2K = 0 , CODEC_JPT = 1 , CODEC_JP2 = 2 }
 Supported codec. More...
 
enum  LIMIT_DECODING { NO_LIMITATION = 0 , LIMIT_TO_MAIN_HEADER = 1 , DECODE_ALL_BUT_PACKETS = 2 }
 Limit decoding to certain portions of the codestream. More...
 

Functions

OPJ_API const char *OPJ_CALLCONV opj_version (void)
 
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_create (int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
 Create an image.
 
OPJ_API void OPJ_CALLCONV opj_image_destroy (opj_image_t *image)
 Deallocate any resources associated with an image.
 
OPJ_API opj_cio_t *OPJ_CALLCONV opj_cio_open (opj_common_ptr cinfo, unsigned char *buffer, int length)
 Open and allocate a memory stream for read / write.
 
OPJ_API void OPJ_CALLCONV opj_cio_close (opj_cio_t *cio)
 Close and free a CIO handle.
 
OPJ_API int OPJ_CALLCONV cio_tell (opj_cio_t *cio)
 Get position in byte stream.
 
OPJ_API void OPJ_CALLCONV cio_seek (opj_cio_t *cio, int pos)
 Set position in byte stream.
 
OPJ_API opj_event_mgr_t *OPJ_CALLCONV opj_set_event_mgr (opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context)
 
OPJ_API opj_dinfo_t *OPJ_CALLCONV opj_create_decompress (OPJ_CODEC_FORMAT format)
 Creates a J2K/JPT/JP2 decompression structure.
 
OPJ_API void OPJ_CALLCONV opj_destroy_decompress (opj_dinfo_t *dinfo)
 Destroy a decompressor handle.
 
OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters (opj_dparameters_t *parameters)
 Set decoding parameters to default values.
 
OPJ_API void OPJ_CALLCONV opj_setup_decoder (opj_dinfo_t *dinfo, opj_dparameters_t *parameters)
 Setup the decoder decoding parameters using user parameters.
 
OPJ_API opj_image_t *OPJ_CALLCONV opj_decode (opj_dinfo_t *dinfo, opj_cio_t *cio)
 Decode an image from a JPEG-2000 codestream.
 
OPJ_API opj_image_t *OPJ_CALLCONV opj_decode_with_info (opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
 Decode an image from a JPEG-2000 codestream and extract the codestream information.
 
OPJ_API opj_cinfo_t *OPJ_CALLCONV opj_create_compress (OPJ_CODEC_FORMAT format)
 Creates a J2K/JP2 compression structure.
 
OPJ_API void OPJ_CALLCONV opj_destroy_compress (opj_cinfo_t *cinfo)
 Destroy a compressor handle.
 
OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters (opj_cparameters_t *parameters)
 Set encoding parameters to default values, that means :
 
OPJ_API void OPJ_CALLCONV opj_setup_encoder (opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image)
 Setup the encoder parameters using the current image and using user parameters.
 
OPJ_API opj_bool OPJ_CALLCONV opj_encode (opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index)
 Encode an image into a JPEG-2000 codestream 3.
 
OPJ_API opj_bool OPJ_CALLCONV opj_encode_with_info (opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
 Encode an image into a JPEG-2000 codestream and extract the codestream information.
 
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info (opj_codestream_info_t *cstr_info)
 Destroy Codestream information after compression or decompression.
 

Macro Definition Documentation

◆ ENUMCS_GRAY

#define ENUMCS_GRAY   17

◆ ENUMCS_SRGB

#define ENUMCS_SRGB   16

◆ ENUMCS_SYCC

#define ENUMCS_SYCC   18

◆ J2K_MAXBANDS

#define J2K_MAXBANDS   (3*J2K_MAXRLVLS-2)

Number of maximum sub-band linked to number of resolution level.

Referenced by j2k_read_qcx().

◆ J2K_MAXRLVLS

#define J2K_MAXRLVLS   33

Number of maximum resolution level authorized.

Referenced by j2k_read_cox().

◆ JPWL_EXPECTED_COMPONENTS

#define JPWL_EXPECTED_COMPONENTS   3

Expect this number of components, so you'll find better the first EPB.

Referenced by opj_set_default_decoder_parameters().

◆ JPWL_MAX_NO_MARKERS

#define JPWL_MAX_NO_MARKERS   512

Maximum number of JPWL markers: increase at your will.

Referenced by jpwl_encode(), jpwl_epbs_add(), and jpwl_prepare_marks().

◆ JPWL_MAX_NO_PACKSPECS

#define JPWL_MAX_NO_PACKSPECS   16

Maximum number of packet parts expected by JPWL: increase at your will.

Referenced by j2k_setup_encoder(), jpwl_prepare_marks(), and opj_set_default_encoder_parameters().

◆ JPWL_MAX_NO_TILESPECS

#define JPWL_MAX_NO_TILESPECS   16

Maximum number of tile parts expected by JPWL: increase at your will.

Referenced by j2k_setup_encoder(), jpwl_prepare_marks(), and opj_set_default_encoder_parameters().

◆ JPWL_MAXIMUM_EPB_ROOM

#define JPWL_MAXIMUM_EPB_ROOM   65450

Expect this maximum number of bytes for composition of EPBs.

Referenced by jpwl_epbs_add().

◆ JPWL_MAXIMUM_HAMMING

#define JPWL_MAXIMUM_HAMMING   2

Expect this maximum number of bit errors in marker id's.

Referenced by j2k_read_unk().

◆ JPWL_MAXIMUM_TILES

#define JPWL_MAXIMUM_TILES   8192

Expect this maximum number of tiles, to avoid some crashes.

Referenced by opj_set_default_decoder_parameters().

◆ JPWL_PRIVATEINDEX_NAME

#define JPWL_PRIVATEINDEX_NAME   "jpwl_index_privatefilename"

index file name used when JPWL is on

◆ OPJ_API

#define OPJ_API

◆ OPJ_ARG_NOT_USED

◆ OPJ_CALLCONV

#define OPJ_CALLCONV

◆ opj_common_fields

#define opj_common_fields
Value:
opj_event_mgr_t *event_mgr; \
void * client_data; \
opj_bool is_decompressor; \
OPJ_CODEC_FORMAT codec_format; \
void *j2k_handle; \
void *jp2_handle; \
void *mj2_handle
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
int opj_bool
Definition openjpeg.h:63
Message handler object used for.
Definition openjpeg.h:183

Common fields between JPEG-2000 compression and decompression master structs.

pointer to the MJ2 codec

◆ OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG

#define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG   0x0001

Referenced by jp2_setup_decoder().

◆ OPJ_FALSE

◆ OPJ_PATH_LEN

#define OPJ_PATH_LEN   4096

Maximum allowed size for filenames.

◆ OPJ_STREAM_READ

#define OPJ_STREAM_READ   0x0001

The stream was opened for reading.

Referenced by opj_cio_open().

◆ OPJ_STREAM_WRITE

#define OPJ_STREAM_WRITE   0x0002

The stream was opened for writing.

Referenced by opj_cio_close(), and opj_cio_open().

◆ OPJ_TRUE

Typedef Documentation

◆ opj_bool

typedef int opj_bool

◆ OPJ_CINEMA_MODE

Digital cinema operation mode.

◆ opj_cinfo_t

typedef struct opj_cinfo opj_cinfo_t

Compression context info.

◆ opj_cio_t

typedef struct opj_cio opj_cio_t

Byte input-output stream (CIO)

◆ OPJ_CODEC_FORMAT

Supported codec.

◆ opj_codestream_info_t

Index structure of the codestream.

◆ OPJ_COLOR_SPACE

Supported image color spaces.

◆ opj_common_ptr

◆ opj_common_struct_t

◆ opj_cparameters_t

Compression parameters.

◆ opj_dinfo_t

typedef struct opj_dinfo opj_dinfo_t

Decompression context info.

◆ opj_dparameters_t

Decompression parameters.

◆ opj_event_mgr_t

Message handler object used for.

  • Error messages
  • Warning messages
  • Debugging messages

◆ opj_image_cmptparm_t

Component parameters structure used by the opj_image_create function.

◆ opj_image_comp_t

Defines a single image component.

◆ opj_image_t

typedef struct opj_image opj_image_t

Defines image data and characteristics.

◆ OPJ_LIMIT_DECODING

Limit decoding to certain portions of the codestream.

◆ opj_marker_info_t

typedef struct opj_marker_info_t opj_marker_info_t

Marker structure.

◆ opj_msg_callback

typedef void(* opj_msg_callback) (const char *msg, void *client_data)

Callback function prototype for events.

Parameters
msgEvent message
client_data

◆ opj_packet_info_t

Index structure : Information concerning a packet inside tile.

◆ opj_poc_t

typedef struct opj_poc opj_poc_t

Progression order changes.

◆ OPJ_PROG_ORDER

typedef enum PROG_ORDER OPJ_PROG_ORDER

Progression order.

◆ OPJ_RSIZ_CAPABILITIES

Rsiz Capabilities.

◆ opj_tile_info_t

Index structure : information regarding tiles.

◆ opj_tp_info_t

typedef struct opj_tp_info opj_tp_info_t

Index structure : Information concerning tile-parts.

Enumeration Type Documentation

◆ CINEMA_MODE

Digital cinema operation mode.

Enumerator
OFF 
CINEMA2K_24 

Not Digital Cinema.

CINEMA2K_48 

2K Digital Cinema at 24 fps

CINEMA4K_24 

2K Digital Cinema at 48 fps

◆ CODEC_FORMAT

Supported codec.

Enumerator
CODEC_UNKNOWN 

place-holder

CODEC_J2K 

JPEG-2000 codestream : read/write.

CODEC_JPT 

JPT-stream (JPEG 2000, JPIP) : read only.

CODEC_JP2 

JPEG-2000 file format : read/write.

◆ COLOR_SPACE

Supported image color spaces.

Enumerator
CLRSPC_UNKNOWN 

not supported by the library

CLRSPC_UNSPECIFIED 

not specified in the codestream

CLRSPC_SRGB 

sRGB

CLRSPC_GRAY 

grayscale

CLRSPC_SYCC 

YUV.

◆ LIMIT_DECODING

Limit decoding to certain portions of the codestream.

Enumerator
NO_LIMITATION 

No limitation for the decoding.

The entire codestream will de decoded

LIMIT_TO_MAIN_HEADER 

The decoding is limited to the Main Header.

DECODE_ALL_BUT_PACKETS 

Decode everything except the JPEG 2000 packets.

◆ PROG_ORDER

enum PROG_ORDER

Progression order.

Enumerator
PROG_UNKNOWN 

place-holder

LRCP 

layer-resolution-component-precinct order

RLCP 

resolution-layer-component-precinct order

RPCL 

resolution-precinct-component-layer order

PCRL 

precinct-component-resolution-layer order

CPRL 

component-precinct-resolution-layer order

◆ RSIZ_CAPABILITIES

Rsiz Capabilities.

Enumerator
STD_RSIZ 
CINEMA2K 

Standard JPEG2000 profile.

CINEMA4K 

Profile name for a 2K image.

Function Documentation

◆ cio_seek()

◆ cio_tell()

◆ opj_cio_close()

OPJ_API void OPJ_CALLCONV opj_cio_close ( opj_cio_t * cio)

Close and free a CIO handle.

Parameters
cioCIO handle to free

References opj_cio::buffer, opj_cio::openmode, opj_free, and OPJ_STREAM_WRITE.

◆ opj_cio_open()

OPJ_API opj_cio_t *OPJ_CALLCONV opj_cio_open ( opj_common_ptr cinfo,
unsigned char * buffer,
int length )

Open and allocate a memory stream for read / write.

On reading, the user must provide a buffer containing encoded data. The buffer will be wrapped by the returned CIO handle. On writing, buffer parameters must be set to 0: a buffer will be allocated by the library to contain encoded data.

Parameters
cinfoCodec context info
bufferReading: buffer address. Writing: NULL
lengthReading: buffer length. Writing: 0
Returns
Returns a CIO handle if successful, returns NULL otherwise

References opj_cio::bp, opj_cio::buffer, opj_cio::cinfo, CODEC_J2K, CODEC_JP2, opj_cio::end, EVT_ERROR, opj_cp::img_size, opj_cio::length, opj_cio::openmode, opj_event_msg(), opj_free, opj_malloc, OPJ_STREAM_READ, OPJ_STREAM_WRITE, and opj_cio::start.

◆ opj_create_compress()

OPJ_API opj_cinfo_t *OPJ_CALLCONV opj_create_compress ( OPJ_CODEC_FORMAT format)

Creates a J2K/JP2 compression structure.

Parameters
formatCoder to select
Returns
Returns a handle to a compressor if successful, returns NULL otherwise

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_create_compress(), jp2_create_compress(), opj_calloc, OPJ_FALSE, and opj_free.

◆ opj_create_decompress()

OPJ_API opj_dinfo_t *OPJ_CALLCONV opj_create_decompress ( OPJ_CODEC_FORMAT format)

Creates a J2K/JPT/JP2 decompression structure.

Parameters
formatDecoder to select
Returns
Returns a handle to a decompressor if successful, returns NULL otherwise

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_create_decompress(), jp2_create_decompress(), opj_calloc, opj_free, and OPJ_TRUE.

◆ opj_decode()

OPJ_API opj_image_t *OPJ_CALLCONV opj_decode ( opj_dinfo_t * dinfo,
opj_cio_t * cio )

Decode an image from a JPEG-2000 codestream.

Parameters
dinfodecompressor handle
cioInput buffer stream
Returns
Returns a decoded image if successful, returns NULL otherwise

References opj_decode_with_info().

◆ opj_decode_with_info()

OPJ_API opj_image_t *OPJ_CALLCONV opj_decode_with_info ( opj_dinfo_t * dinfo,
opj_cio_t * cio,
opj_codestream_info_t * cstr_info )

Decode an image from a JPEG-2000 codestream and extract the codestream information.

Parameters
dinfodecompressor handle
cioInput buffer stream
cstr_infoCodestream information structure if needed afterwards, NULL otherwise
Returns
Returns a decoded image if successful, returns NULL otherwise

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_decode(), j2k_decode_jpt_stream(), and opj_jp2_decode().

Referenced by opj_decode().

◆ opj_destroy_compress()

OPJ_API void OPJ_CALLCONV opj_destroy_compress ( opj_cinfo_t * cinfo)

Destroy a compressor handle.

Parameters
cinfocompressor handle to destroy

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_destroy_compress(), jp2_destroy_compress(), and opj_free.

◆ opj_destroy_cstr_info()

OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info ( opj_codestream_info_t * cstr_info)

Destroy Codestream information after compression or decompression.

Parameters
cstr_infoCodestream information structure

References opj_codestream_info::marker, opj_tile_info::marker, opj_codestream_info::numdecompos, opj_free, opj_tile_info::packet, opj_codestream_info::th, opj_tile_info::thresh, opj_codestream_info::tile, opj_tile_info::tp, and opj_codestream_info::tw.

◆ opj_destroy_decompress()

OPJ_API void OPJ_CALLCONV opj_destroy_decompress ( opj_dinfo_t * dinfo)

Destroy a decompressor handle.

Parameters
dinfodecompressor handle to destroy

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_destroy_decompress(), jp2_destroy_decompress(), and opj_free.

◆ opj_encode()

OPJ_API opj_bool OPJ_CALLCONV opj_encode ( opj_cinfo_t * cinfo,
opj_cio_t * cio,
opj_image_t * image,
char * index )

Encode an image into a JPEG-2000 codestream 3.

Parameters
cinfocompressor handle
cioOutput buffer stream
imageImage to encode
indexDepreacted -> Set to NULL. To extract index, used opj_encode_wci()
Returns
Returns true if successful, returns false otherwise

References EVT_WARNING, opj_encode_with_info(), and opj_event_msg().

◆ opj_encode_with_info()

OPJ_API opj_bool OPJ_CALLCONV opj_encode_with_info ( opj_cinfo_t * cinfo,
opj_cio_t * cio,
opj_image_t * image,
opj_codestream_info_t * cstr_info )

Encode an image into a JPEG-2000 codestream and extract the codestream information.

Parameters
cinfocompressor handle
cioOutput buffer stream
imageImage to encode
cstr_infoCodestream information structure if needed afterwards, NULL otherwise
Returns
Returns true if successful, returns false otherwise

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_encode(), OPJ_FALSE, and opj_jp2_encode().

Referenced by opj_encode().

◆ opj_image_create()

◆ opj_image_destroy()

OPJ_API void OPJ_CALLCONV opj_image_destroy ( opj_image_t * image)

Deallocate any resources associated with an image.

Parameters
imageimage to be destroyed

References opj_image::comps, opj_image_comp::data, opj_image::numcomps, and opj_free.

Referenced by j2k_decode(), j2k_decode_jpt_stream(), and opj_image_create().

◆ opj_set_default_decoder_parameters()

◆ opj_set_default_encoder_parameters()

OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters ( opj_cparameters_t * parameters)

Set encoding parameters to default values, that means :

  • Lossless
  • 1 tile
  • Size of precinct : 2^15 x 2^15 (means 1 precinct)
  • Size of code-block : 64 x 64
  • Number of resolutions: 6
  • No SOP marker in the codestream
  • No EPH marker in the codestream
  • No sub-sampling in x or y direction
  • No mode switch activated
  • Progression order: LRCP
  • No index file
  • No ROI upshifted
  • No offset of the origin of the image
  • No offset of the origin of the tiles
  • Reversible DWT 5-3
Parameters
parametersCompression parameters

References opj_cparameters::cblockh_init, opj_cparameters::cblockw_init, opj_cparameters::cod_format, opj_cparameters::cp_cinema, opj_cparameters::cp_disto_alloc, opj_cparameters::cp_fixed_alloc, opj_cparameters::cp_fixed_quality, opj_cparameters::cp_rsiz, opj_cparameters::decod_format, opj_cparameters::jpip_on, opj_cparameters::jpwl_epc_on, opj_cparameters::jpwl_hprot_MH, opj_cparameters::jpwl_hprot_TPH, opj_cparameters::jpwl_hprot_TPH_tileno, JPWL_MAX_NO_PACKSPECS, JPWL_MAX_NO_TILESPECS, opj_cparameters::jpwl_pprot, opj_cparameters::jpwl_pprot_packno, opj_cparameters::jpwl_pprot_tileno, opj_cparameters::jpwl_sens_addr, opj_cparameters::jpwl_sens_MH, opj_cparameters::jpwl_sens_range, opj_cparameters::jpwl_sens_size, opj_cparameters::jpwl_sens_TPH, opj_cparameters::jpwl_sens_TPH_tileno, LRCP, opj_cparameters::max_comp_size, opj_cparameters::numresolution, OFF, OPJ_FALSE, opj_cparameters::prog_order, opj_cparameters::roi_compno, STD_RSIZ, opj_cparameters::subsampling_dx, opj_cparameters::subsampling_dy, opj_cparameters::tcp_numlayers, opj_cparameters::tcp_rates, and opj_cparameters::tp_on.

◆ opj_set_event_mgr()

OPJ_API opj_event_mgr_t *OPJ_CALLCONV opj_set_event_mgr ( opj_common_ptr cinfo,
opj_event_mgr_t * event_mgr,
void * context )

◆ opj_setup_decoder()

OPJ_API void OPJ_CALLCONV opj_setup_decoder ( opj_dinfo_t * dinfo,
opj_dparameters_t * parameters )

Setup the decoder decoding parameters using user parameters.

Decoding parameters are returned in j2k->cp.

Parameters
dinfodecompressor handle
parametersdecompression parameters

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_setup_decoder(), and jp2_setup_decoder().

◆ opj_setup_encoder()

OPJ_API void OPJ_CALLCONV opj_setup_encoder ( opj_cinfo_t * cinfo,
opj_cparameters_t * parameters,
opj_image_t * image )

Setup the encoder parameters using the current image and using user parameters.

Parameters
cinfoCompressor handle
parametersCompression parameters
imageInput filled image

References CODEC_J2K, CODEC_JP2, CODEC_JPT, CODEC_UNKNOWN, j2k_setup_encoder(), and jp2_setup_encoder().

◆ opj_version()

OPJ_API const char *OPJ_CALLCONV opj_version ( void )