DocStructOPJv2 (original) (raw)

Introduction

Based on the work done by Jerome Fines in 2008, the OpenJPEG team has decided in June 2011 to merge the V2 branch in the trunk. The goal of this operation is to release an official version of this work which will become the reference for the future development. Here we will describe and discuss about the evolution of structures in OpenJPEG.

Main public structures

Structures found in openjpeg.h

opj_stream_t

Abstract JPEG2000 stream:

opj_codec_t

Abstract JPEG2000 codec (handle on the compressor or decompressor):

opj_dparameters_t / opj_cparameters_t

Structure provide for the users to give respectively decompression and compression parameters to the lib.

opj_image

Structure where are stored image information and image component structure

opj_image_comp_t

Structure where are stored image component information and data

opj_codestream_info_v2_t

Structure which give to the user the main information about the codestream included in the JPEG2000 file/stream:

opj_tile_info_v2_t

Structure which give visibility about the main tile compression parameters for one specific tile. The first part of this structure is common to all tile-component included in the tile:

opj_tccp_info_t

Structure which give visibility about low-level compression parameters for one tile component

opj_codestream_index_t

Structure which give to the user the main information about the position of main elements in the codestream included in the JPEG2000 file/stream:

opj_marker_info_t

Structure which store markers type and position and length in the codestream.

opj_tile_index_t

Structure which store the information about the index of elements in the tile:

opj_tp_index_t

Structure which store position of a tile-part and its header in the codestream

opj_packet_info_t

Structure which store information concerning a packet inside tile

Some private structures

We will described here the main structures used in openjpeg.c, cio.h, j2k.h and jp2.h

opj_stream_private_t

It is the main internal structure to manage the byte input/output on the stream. It give access to the user data (file or external stream) and the main functions to handle the stream (read, write, move in the stream). Its give access to the buffer.

opj_codec_private_t

It is the main codec handler used for compression or decompression. Its contains:

opj_compression_t

Move during the first part of merge but not used for the moment. It is the compression handlers generic to j2k or jp2 codec

opj_decompression_t

Structure which give access to all generic decompression handlers.

opj_event_mgr_t

Message handler object used to manage the messages (error, warning and info) to the lib user.

opj_j2k_v2_t

Internal J2K codestream reader/writer. It is the main place where we can find the elements used in the J2K compression/decompresion process. Here we will now describe the structures used in the decompression process :

opj_jp2_v2_t

Internal JP2 reader/writer structure. The JP2 codec must be considered as a set of boxes which enclose the J2K codestream. The goal of these boxes is to give clue to interpret the raw codestream. This structure follow this scheme and embedded a opj_j2k_v2_t structure. Moreover it is composed of: