j2k.h File Reference

The JPEG-2000 Codestream Reader/Writer (J2K). More...

Go to the source code of this file.

Data Structures

struct  opj_stepsize
 Quantization stepsize. More...
struct  opj_tccp
 Tile-component coding parameters. More...
struct  opj_mct_data
 FIXME DOC. More...
struct  opj_simple_mcc_decorrelation_data
 FIXME DOC. More...
struct  opj_tcp
 Tile coding parameters : this structure is used to store coding/decoding parameters common to all tiles (information like COD, COC in main header). More...
struct  opj_encoding_param
struct  opj_decoding_param
struct  opj_cp
 Coding parameters. More...
struct  opj_j2k_dec
struct  opj_j2k_enc
struct  opj_j2k
 JPEG-2000 codestream reader/writer. More...

Defines

#define J2K_CP_CSTY_PRT   0x01
#define J2K_CP_CSTY_SOP   0x02
#define J2K_CP_CSTY_EPH   0x04
#define J2K_CCP_CSTY_PRT   0x01
#define J2K_CCP_CBLKSTY_LAZY   0x01
 Selective arithmetic coding bypass.
#define J2K_CCP_CBLKSTY_RESET   0x02
 Reset context probabilities on coding pass boundaries.
#define J2K_CCP_CBLKSTY_TERMALL   0x04
 Termination on each coding pass.
#define J2K_CCP_CBLKSTY_VSC   0x08
 Vertically stripe causal context.
#define J2K_CCP_CBLKSTY_PTERM   0x10
 Predictable termination.
#define J2K_CCP_CBLKSTY_SEGSYM   0x20
 Segmentation symbols are used.
#define J2K_CCP_QNTSTY_NOQNT   0
#define J2K_CCP_QNTSTY_SIQNT   1
#define J2K_CCP_QNTSTY_SEQNT   2
#define OPJ_J2K_DEFAULT_CBLK_DATA_SIZE   8192
#define J2K_MS_SOC   0xff4f
 SOC marker value.
#define J2K_MS_SOT   0xff90
 SOT marker value.
#define J2K_MS_SOD   0xff93
 SOD marker value.
#define J2K_MS_EOC   0xffd9
 EOC marker value.
#define J2K_MS_SIZ   0xff51
 SIZ marker value.
#define J2K_MS_COD   0xff52
 COD marker value.
#define J2K_MS_COC   0xff53
 COC marker value.
#define J2K_MS_RGN   0xff5e
 RGN marker value.
#define J2K_MS_QCD   0xff5c
 QCD marker value.
#define J2K_MS_QCC   0xff5d
 QCC marker value.
#define J2K_MS_POC   0xff5f
 POC marker value.
#define J2K_MS_TLM   0xff55
 TLM marker value.
#define J2K_MS_PLM   0xff57
 PLM marker value.
#define J2K_MS_PLT   0xff58
 PLT marker value.
#define J2K_MS_PPM   0xff60
 PPM marker value.
#define J2K_MS_PPT   0xff61
 PPT marker value.
#define J2K_MS_SOP   0xff91
 SOP marker value.
#define J2K_MS_EPH   0xff92
 EPH marker value.
#define J2K_MS_CRG   0xff63
 CRG marker value.
#define J2K_MS_COM   0xff64
 COM marker value.
#define J2K_MS_CBD   0xff78
 CBD marker value.
#define J2K_MS_MCC   0xff75
 MCC marker value.
#define J2K_MS_MCT   0xff74
 MCT marker value.
#define J2K_MS_MCO   0xff77
 MCO marker value.
#define J2K_MS_UNK   0
 UNKNOWN marker value.
#define J2K_MS_EPC   0xff68
 EPC marker value (Part 11: JPEG 2000 for Wireless).
#define J2K_MS_EPB   0xff66
 EPB marker value (Part 11: JPEG 2000 for Wireless).
#define J2K_MS_ESD   0xff67
 ESD marker value (Part 11: JPEG 2000 for Wireless).
#define J2K_MS_RED   0xff69
 RED marker value (Part 11: JPEG 2000 for Wireless).
#define J2K_MS_SEC   0xff65
 SEC marker value (Part 8: Secure JPEG 2000).
#define J2K_MS_INSEC   0xff94
 INSEC marker value (Part 8: Secure JPEG 2000).

Typedefs

typedef enum MCT_ELEMENT_TYPE J2K_MCT_ELEMENT_TYPE
 Type of elements storing in the MCT data.
typedef enum MCT_ARRAY_TYPE J2K_MCT_ARRAY_TYPE
 Type of MCT array.
typedef enum T2_MODE J2K_T2_MODE
 T2 encoding mode.
typedef struct opj_stepsize opj_stepsize_t
 Quantization stepsize.
typedef struct opj_tccp opj_tccp_t
 Tile-component coding parameters.
typedef struct opj_mct_data opj_mct_data_t
 FIXME DOC.
typedef struct
opj_simple_mcc_decorrelation_data 
opj_simple_mcc_decorrelation_data_t
 FIXME DOC.
typedef struct opj_tcp opj_tcp_t
 Tile coding parameters : this structure is used to store coding/decoding parameters common to all tiles (information like COD, COC in main header).
typedef struct opj_encoding_param opj_encoding_param_t
typedef struct opj_decoding_param opj_decoding_param_t
typedef struct opj_cp opj_cp_t
 Coding parameters.
typedef struct opj_j2k_dec opj_j2k_dec_t
typedef struct opj_j2k_enc opj_j2k_enc_t
typedef struct opj_j2k opj_j2k_t
 JPEG-2000 codestream reader/writer.

Enumerations

enum  J2K_STATUS {
  J2K_STATE_NONE = 0x0000, J2K_STATE_MHSOC = 0x0001, J2K_STATE_MHSIZ = 0x0002, J2K_STATE_MH = 0x0004,
  J2K_STATE_TPHSOT = 0x0008, J2K_STATE_TPH = 0x0010, J2K_STATE_MT = 0x0020, J2K_STATE_NEOC = 0x0040,
  J2K_STATE_EOC = 0x0100, J2K_STATE_ERR = 0x8000
}
 Values that specify the status of the decoding process when decoding the main header. More...
enum  MCT_ELEMENT_TYPE { MCT_TYPE_INT16 = 0, MCT_TYPE_INT32 = 1, MCT_TYPE_FLOAT = 2, MCT_TYPE_DOUBLE = 3 }
 Type of elements storing in the MCT data. More...
enum  MCT_ARRAY_TYPE { MCT_TYPE_DEPENDENCY = 0, MCT_TYPE_DECORRELATION = 1, MCT_TYPE_OFFSET = 2 }
 Type of MCT array. More...
enum  T2_MODE { THRESH_CALC = 0, FINAL_PASS = 1 }
 T2 encoding mode. More...

Functions

OPJ_BOOL opj_j2k_end_decompress (opj_j2k_t *j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Ends the decompression procedures and possibiliy add data to be read after the codestream.
OPJ_BOOL opj_j2k_read_header (opj_stream_private_t *p_stream, opj_j2k_t *p_j2k, opj_image_t **p_image, opj_event_mgr_t *p_manager)
 Reads a jpeg2000 codestream header structure.
void opj_j2k_destroy (opj_j2k_t *p_j2k)
 Destroys a jpeg2000 codec.
void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind)
 Destroys a codestream index structure.
OPJ_BOOL opj_j2k_decode_tile (opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Decode tile data.
OPJ_BOOL opj_j2k_read_tile_header (opj_j2k_t *p_j2k, 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_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Reads a tile header.
OPJ_BOOL opj_j2k_set_decode_area (opj_j2k_t *p_j2k, 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_event_mgr_t *p_manager)
 Sets the given area to be decoded.
opj_j2k_topj_j2k_create_decompress (void)
 Creates a J2K decompression structure.
void j2k_dump (opj_j2k_t *p_j2k, OPJ_INT32 flag, FILE *out_stream)
 Dump some elements from the J2K decompression structure .
void j2k_dump_image_header (opj_image_t *image, OPJ_BOOL dev_dump_flag, FILE *out_stream)
 Dump an image header structure.
void j2k_dump_image_comp_header (opj_image_comp_t *comp, OPJ_BOOL dev_dump_flag, FILE *out_stream)
 Dump a component image header structure.
opj_codestream_info_v2_tj2k_get_cstr_info (opj_j2k_t *p_j2k)
 Get the codestream info from a JPEG2000 codec.
opj_codestream_index_tj2k_get_cstr_index (opj_j2k_t *p_j2k)
 Get the codestream index from a JPEG2000 codec.
OPJ_BOOL opj_j2k_decode (opj_j2k_t *j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
 Decode an image from a JPEG-2000 codestream.
OPJ_BOOL opj_j2k_get_tile (opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index)
OPJ_BOOL opj_j2k_set_decoded_resolution_factor (opj_j2k_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
OPJ_BOOL opj_j2k_write_tile (opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Writes a tile.
OPJ_BOOL opj_j2k_encode (opj_j2k_t *p_j2k, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
 Encodes an image into a JPEG-2000 codestream.
OPJ_BOOL opj_j2k_start_compress (opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
 Starts a compression scheme, i.e.
OPJ_BOOL opj_j2k_end_compress (opj_j2k_t *p_j2k, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
 Ends the compression procedures and possibiliy add data to be read after the codestream.
OPJ_BOOL opj_j2k_setup_mct_encoding (opj_tcp_t *p_tcp, opj_image_t *p_image)
Exported functions
void opj_j2k_setup_decoder (opj_j2k_t *j2k, opj_dparameters_t *parameters)
 Setup the decoder decoding parameters using user parameters.
opj_j2k_topj_j2k_create_compress (void)
 Creates a J2K compression structure.
void opj_j2k_setup_encoder (opj_j2k_t *p_j2k, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
char * opj_j2k_convert_progression_order (OPJ_PROG_ORDER prg_order)
 Converts an enum type progression order to string type.


Detailed Description

The JPEG-2000 Codestream Reader/Writer (J2K).

The functions in J2K.C have for goal to read/write the several parts of the codestream: markers and data.


Function Documentation

void j2k_destroy_cstr_index ( opj_codestream_index_t p_cstr_ind  ) 

Destroys a codestream index structure.

Parameters:
p_cstr_ind the codestream index parameter to destroy.

References opj_tile_index::marker, opj_codestream_index::marker, opj_codestream_index::nb_of_tiles, opj_free, opj_tile_index::packet_index, opj_codestream_index::tile_index, and opj_tile_index::tp_index.

Referenced by opj_destroy_cstr_index(), and opj_j2k_destroy().

void j2k_dump ( opj_j2k_t p_j2k,
OPJ_INT32  flag,
FILE *  out_stream 
)

Dump some elements from the J2K decompression structure .

Parameters:
p_j2k the jpeg2000 codec.
flag flag to describe what elments are dump.
out_stream output stream where dump the elements.

References j2k_dump_image_header(), opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, OPJ_IMG_INFO, opj_j2k_dump_MH_index(), opj_j2k_dump_MH_info(), opj_j2k_dump_tile_info(), OPJ_J2K_MH_IND, OPJ_J2K_MH_INFO, OPJ_J2K_TCH_INFO, OPJ_J2K_TH_IND, OPJ_J2K_TH_INFO, OPJ_JP2_IND, OPJ_JP2_INFO, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by jp2_dump(), and opj_create_decompress().

void j2k_dump_image_comp_header ( opj_image_comp_t comp,
OPJ_BOOL  dev_dump_flag,
FILE *  out_stream 
)

Dump a component image header structure.

Parameters:
comp the component image header to dump.
dev_dump_flag flag to describe if we are in the case of this function is use outside j2k_dump function
out_stream output stream where dump the elements.

References opj_image_comp::dx, opj_image_comp::dy, opj_image_comp::prec, and opj_image_comp::sgnd.

Referenced by j2k_dump_image_header().

void j2k_dump_image_header ( opj_image_t image,
OPJ_BOOL  dev_dump_flag,
FILE *  out_stream 
)

Dump an image header structure.

Parameters:
image the image header to dump.
dev_dump_flag flag to describe if we are in the case of this function is use outside j2k_dump function
out_stream output stream where dump the elements.

References opj_image::comps, j2k_dump_image_comp_header(), opj_image::numcomps, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by j2k_dump().

opj_codestream_index_t* j2k_get_cstr_index ( opj_j2k_t p_j2k  ) 

opj_codestream_info_v2_t* j2k_get_cstr_info ( opj_j2k_t p_j2k  ) 

Get the codestream info from a JPEG2000 codec.

Parameters:
p_j2k the component image header to dump.
Returns:
the codestream information extract from the jpg2000 codec

References opj_tccp::cblkh, opj_tccp_info::cblkh, opj_tccp::cblksty, opj_tccp_info::cblksty, opj_tccp::cblkw, opj_tccp_info::cblkw, opj_tccp::csty, opj_tccp_info::csty, opj_tcp::csty, opj_tile_v2_info::csty, opj_stepsize::expn, J2K_CCP_QNTSTY_SIQNT, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_codestream_info_v2::m_default_tile_info, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_stepsize::mant, opj_tcp::mct, opj_tile_v2_info::mct, opj_codestream_info_v2::nbcomps, opj_image::numcomps, opj_tccp::numgbits, opj_tccp_info::numgbits, opj_tcp::numlayers, opj_tile_v2_info::numlayers, opj_tccp::numresolutions, opj_tccp_info::numresolutions, opj_calloc, opj_destroy_cstr_info(), OPJ_J2K_MAXBANDS, OPJ_J2K_MAXRLVLS, opj_tccp::prch, opj_tccp_info::prch, opj_tccp::prcw, opj_tccp_info::prcw, opj_tcp::prg, opj_tile_v2_info::prg, opj_tccp::qmfbid, opj_tccp_info::qmfbid, opj_tccp::qntsty, opj_tccp_info::qntsty, opj_tccp::roishift, opj_tccp_info::roishift, opj_tccp::stepsizes, opj_tccp_info::stepsizes_expn, opj_tccp_info::stepsizes_mant, opj_tile_v2_info::tccp_info, opj_tcp::tccps, opj_cp::tdx, opj_codestream_info_v2::tdx, opj_cp::tdy, opj_codestream_info_v2::tdy, opj_cp::th, opj_codestream_info_v2::th, opj_codestream_info_v2::tile_info, opj_cp::tw, opj_codestream_info_v2::tw, opj_cp::tx0, opj_codestream_info_v2::tx0, opj_cp::ty0, and opj_codestream_info_v2::ty0.

Referenced by jp2_get_cstr_info(), and opj_create_decompress().

opj_j2k_t* opj_j2k_create_decompress ( void   ) 

OPJ_BOOL opj_j2k_decode ( opj_j2k_t j2k,
opj_stream_private_t p_stream,
opj_image_t p_image,
opj_event_mgr_t p_manager 
)

Decode an image from a JPEG-2000 codestream.

Parameters:
j2k J2K decompressor handle
p_stream FIXME DOC
p_image FIXME DOC
p_manager FIXME DOC
Returns:
FIXME DOC

References opj_image::comps, opj_image_comp::data, opj_image_comp::h, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_image::numcomps, opj_copy_image_header(), OPJ_FALSE, opj_image_create0(), opj_image_destroy(), opj_j2k_exec(), opj_j2k_setup_decoding(), OPJ_TRUE, opj_image_comp::resno_decoded, and opj_image_comp::w.

Referenced by opj_create_decompress(), and opj_jp2_decode().

OPJ_BOOL opj_j2k_decode_tile ( opj_j2k_t p_j2k,
OPJ_UINT32  p_tile_index,
OPJ_BYTE p_data,
OPJ_UINT32  p_data_size,
opj_stream_private_t p_stream,
opj_event_mgr_t p_manager 
)

void opj_j2k_destroy ( opj_j2k_t p_j2k  ) 

OPJ_BOOL opj_j2k_encode ( opj_j2k_t p_j2k,
opj_stream_private_t cio,
opj_event_mgr_t p_manager 
)

OPJ_BOOL opj_j2k_end_compress ( opj_j2k_t p_j2k,
opj_stream_private_t cio,
opj_event_mgr_t p_manager 
)

Ends the compression procedures and possibiliy add data to be read after the codestream.

References opj_j2k::m_procedure_list, OPJ_FALSE, opj_j2k_exec(), opj_j2k_setup_end_compress(), and OPJ_TRUE.

Referenced by opj_create_compress(), and opj_jp2_end_compress().

OPJ_BOOL opj_j2k_end_decompress ( opj_j2k_t j2k,
opj_stream_private_t p_stream,
opj_event_mgr_t p_manager 
)

Ends the decompression procedures and possibiliy add data to be read after the codestream.

References OPJ_TRUE.

Referenced by opj_create_decompress(), and opj_jp2_end_decompress().

OPJ_BOOL opj_j2k_get_tile ( opj_j2k_t p_j2k,
opj_stream_private_t p_stream,
opj_image_t p_image,
opj_event_mgr_t p_manager,
OPJ_UINT32  tile_index 
)

OPJ_BOOL opj_j2k_read_header ( opj_stream_private_t p_stream,
opj_j2k_t p_j2k,
opj_image_t **  p_image,
opj_event_mgr_t p_manager 
)

Reads a jpeg2000 codestream header structure.

Parameters:
p_stream the stream to read data from.
p_j2k the jpeg2000 codec.
p_image FIXME DOC
p_manager the user event manager.
Returns:
true if the box is valid.

References opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_validation_list, opj_copy_image_header(), OPJ_FALSE, opj_image_create0(), opj_image_destroy(), opj_j2k_allocate_tile_element_cstr_index(), opj_j2k_exec(), opj_j2k_setup_decoding_validation(), opj_j2k_setup_header_reading(), and OPJ_TRUE.

Referenced by opj_create_decompress(), and opj_jp2_read_header().

OPJ_BOOL opj_j2k_read_tile_header ( opj_j2k_t p_j2k,
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_go_on,
opj_stream_private_t p_stream,
opj_event_mgr_t p_manager 
)

Reads a tile header.

Parameters:
p_j2k the jpeg2000 codec.
p_tile_index FIXME DOC
p_data_size FIXME DOC
p_tile_x0 FIXME DOC
p_tile_y0 FIXME DOC
p_tile_x1 FIXME DOC
p_tile_y1 FIXME DOC
p_nb_comps FIXME DOC
p_go_on FIXME DOC
p_stream the stream to write data to.
p_manager the user event manager.

References opj_j2k::cstr_index, EVT_ERROR, EVT_INFO, opj_dec_memory_marker_handler::handler, opj_dec_memory_marker_handler::id, J2K_MS_EOC, J2K_MS_SOD, J2K_MS_SOT, J2K_STATE_EOC, J2K_STATE_NEOC, J2K_STATE_TPH, J2K_STATE_TPHSOT, opj_j2k_dec::m_can_decode, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_data, opj_j2k::m_decoder, opj_j2k_dec::m_header_data, opj_j2k_dec::m_header_data_size, opj_j2k_dec::m_last_sot_read_pos, opj_j2k_dec::m_skip_data, opj_j2k_dec::m_sot_length, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_tcd, opj_tcd_tile::numcomps, opj_event_msg(), OPJ_FALSE, opj_free, opj_j2k_add_tlmarker(), opj_j2k_get_marker_handler(), opj_j2k_read_sod(), opj_read_bytes, opj_realloc, opj_stream_get_number_byte_left(), opj_stream_read_data(), opj_stream_skip(), opj_stream_tell(), opj_tcd_get_decoded_tile_size(), opj_tcd_init_decode_tile(), OPJ_TRUE, opj_dec_memory_marker_handler::states, opj_tcd::tcd_image, opj_cp::tcps, opj_cp::th, opj_tcd_image::tiles, opj_cp::tw, opj_tcd_tile::x0, opj_tcd_tile::x1, opj_tcd_tile::y0, and opj_tcd_tile::y1.

Referenced by opj_create_decompress(), opj_j2k_decode_one_tile(), opj_j2k_decode_tiles(), and opj_jp2_read_tile_header().

OPJ_BOOL opj_j2k_set_decode_area ( opj_j2k_t p_j2k,
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_event_mgr_t p_manager 
)

Sets the given area to be decoded.

This function should be called right after opj_read_header and before any tile header reading.

Parameters:
p_j2k the jpeg2000 codec.
p_image FIXME DOC
p_start_x the left position of the rectangle to decode (in image coordinates).
p_start_y the up position of the rectangle to decode (in image coordinates).
p_end_x the right position of the rectangle to decode (in image coordinates).
p_end_y the bottom position of the rectangle to decode (in image coordinates).
p_manager the user event manager
Returns:
true if the area could be set.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_image_comp::factor, opj_image_comp::h, J2K_STATE_TPHSOT, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_discard_tiles, opj_j2k_dec::m_end_tile_x, opj_j2k_dec::m_end_tile_y, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_start_tile_x, opj_j2k_dec::m_start_tile_y, opj_j2k_dec::m_state, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_int_ceildiv(), opj_int_ceildivpow2(), OPJ_TRUE, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image_comp::w, opj_image_comp::x0, opj_image::x0, opj_image::x1, opj_image_comp::y0, opj_image::y0, and opj_image::y1.

Referenced by opj_create_decompress(), and opj_jp2_set_decode_area().

OPJ_BOOL opj_j2k_set_decoded_resolution_factor ( opj_j2k_t p_j2k,
OPJ_UINT32  res_factor,
opj_event_mgr_t p_manager 
)

OPJ_BOOL opj_j2k_setup_mct_encoding ( opj_tcp_t p_tcp,
opj_image_t p_image 
)

OPJ_BOOL opj_j2k_start_compress ( opj_j2k_t p_j2k,
opj_stream_private_t p_stream,
opj_image_t p_image,
opj_event_mgr_t p_manager 
)

Starts a compression scheme, i.e.

validates the codec parameters, writes the header.

Parameters:
p_j2k the jpeg2000 codec.
p_stream the stream object.
p_image FIXME DOC
p_manager the user event manager.
Returns:
true if the codec is valid.

References opj_image::comps, opj_image_comp::data, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_validation_list, opj_image::numcomps, opj_copy_image_header(), OPJ_FALSE, opj_image_create0(), opj_j2k_exec(), opj_j2k_setup_encoding_validation(), opj_j2k_setup_header_writing(), and OPJ_TRUE.

Referenced by opj_create_compress(), and opj_jp2_start_compress().

OPJ_BOOL opj_j2k_write_tile ( opj_j2k_t p_j2k,
OPJ_UINT32  p_tile_index,
OPJ_BYTE p_data,
OPJ_UINT32  p_data_size,
opj_stream_private_t p_stream,
opj_event_mgr_t p_manager 
)

Writes a tile.

Parameters:
p_j2k the jpeg2000 codec.
p_tile_index FIXME DOC
p_data FIXME DOC
p_data_size FIXME DOC
p_stream the stream to write data to.
p_manager the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, opj_j2k_post_write_tile(), opj_j2k_pre_write_tile(), and OPJ_TRUE.

Referenced by opj_create_compress(), and opj_jp2_write_tile().


Generated on Thu Jan 7 22:01:22 2016 for OpenJPEG by  doxygen 1.5.6