"L. Spiro Engine"
Classes | Public Types | Static Public Member Functions | Protected Types | Static Protected Member Functions | Static Protected Attributes

lsi::CJ2k Class Reference

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

#include <LSIJ2k.h>

List of all members.

Classes

struct  opj_cp
struct  opj_dec_mstabent_t
struct  opj_j2k
struct  opj_stepsize
struct  opj_tccp
struct  opj_tcp

Public Types

enum  J2K_STATUS {
  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_ERR = 0x0080
}
enum  T2_MODE { THRESH_CALC = 0, FINAL_PASS = 1 }
typedef enum lsi::CJ2k::J2K_STATUS J2K_STATUS
typedef enum lsi::CJ2k::T2_MODE J2K_T2_MODE
typedef struct
lsi::CJ2k::opj_stepsize 
opj_stepsize_t
typedef struct lsi::CJ2k::opj_tccp opj_tccp_t
typedef struct lsi::CJ2k::opj_tcp opj_tcp_t
typedef struct lsi::CJ2k::opj_cp opj_cp_t
typedef struct lsi::CJ2k::opj_j2k opj_j2k_t

Static Public Member Functions

static opj_j2k_t *LSE_CALL j2k_create_decompress (CJpegCommonStructs::opj_common_ptr _cpInfoC)
static LSVOID LSE_CALL j2k_destroy_decompress (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_setup_decoder (opj_j2k_t *_pjJ2k, CJpegCommonStructs::opj_dparameters_t *_pdParameters)
static CJpegImage::opj_image_t
*LSE_CALL 
j2k_decode (opj_j2k_t *_pjJ2k, CCio::opj_cio_t *_pcCio, CJpegCommonStructs::opj_codestream_info_t *_pciCStrInfo)
static CJpegImage::opj_image_t
*LSE_CALL 
j2k_decode_jpt_stream (opj_j2k_t *_pjJ2k, CCio::opj_cio_t *_pcCio, CJpegCommonStructs::opj_codestream_info_t *_pciCStrInfo)
static opj_j2k_t *LSE_CALL j2k_create_compress (CJpegCommonStructs::opj_common_ptr _cpInfo)
static LSVOID LSE_CALL j2k_destroy_compress (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_setup_encoder (opj_j2k_t *_pjJ2k, CJpegCommonStructs::opj_cparameters_t *_pcpParameters, CJpegImage::opj_image_t *_piImage)
static const LSCHAR *LSE_CALL j2k_convert_progression_order (OPJ_PROG_ORDER _poOrder)
static LSBOOL LSE_CALL j2k_encode (opj_j2k_t *_pjJ2k, CCio::opj_cio_t *_pcCio, CJpegImage::opj_image_t *_piImage, CJpegCommonStructs::opj_codestream_info_t *_pciCStrInfo)

Protected Types

typedef struct
lsi::CJ2k::opj_dec_mstabent_t
LPopj_dec_mstabent_t
typedef struct
lsi::CJ2k::opj_dec_mstabent_t 
LPCopj_dec_mstabent_t

Static Protected Member Functions

static opj_dec_mstabent_t *LSE_CALL j2k_dec_mstab_lookup (LSINT32 _i32Id)
static LSVOID LSE_CALL j2k_write_soc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_soc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_siz (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_siz (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_com (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_com (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_cox (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo)
static LSVOID LSE_CALL j2k_read_cox (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo)
static LSVOID LSE_CALL j2k_write_cod (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_cod (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_coc (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo)
static LSVOID LSE_CALL j2k_read_coc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_qcx (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo)
static LSVOID LSE_CALL j2k_read_qcx (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo, LSINT32 _i32Len)
static LSVOID LSE_CALL j2k_write_qcd (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_qcd (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_qcc (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo)
static LSVOID LSE_CALL j2k_read_qcc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_poc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_poc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_crg (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_tlm (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_plm (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_plt (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_ppm (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_ppt (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_tlm (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_sot (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_sot (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_sod (opj_j2k_t *_pjJ2k, LSVOID *_i32TileCoder)
static LSVOID LSE_CALL j2k_read_sod (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_rgn (opj_j2k_t *_pjJ2k, LSINT32 _i32CompNo, LSINT32 _i32TileNo)
static LSVOID LSE_CALL j2k_read_rgn (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_write_eoc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_eoc (opj_j2k_t *_pjJ2k)
static LSVOID LSE_CALL j2k_read_unk (opj_j2k_t *_pjJ2k)
static LSINT32 LSE_CALL j2k_get_num_tp (opj_cp_t *_pcCp, LSINT32 _i32PiNo, LSINT32 _i32TileNo)
static LSINT32 LSE_CALL j2k_calculate_tp (opj_cp_t *_pcCp, CJpegImage::opj_image_t *_piImage, opj_j2k_t *_pjJ2k)

Static Protected Attributes

static opj_dec_mstabent_t j2k_dec_mstab []

Detailed Description

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

Class CJ2k Description: The JPEG-2000 Codestream Reader/Writer (J2K).


Member Typedef Documentation

Values that specify the status of the decoding process when decoding the main header. These values may be combined with a | operator.

T2 encoding mode.

Coding parameters

JPEG-2000 codestream reader/writer.

Quantization stepsize

Tile-component coding parameters

Tile coding parameters: this structure is used to store coding/decoding parameters common to all tiles (information like COD, COC in main header).


Member Enumeration Documentation

Values that specify the status of the decoding process when decoding the main header. These values may be combined with a | operator.

Enumerator:
J2K_STATE_MHSOC 

A SOC marker is expected.

J2K_STATE_MHSIZ 

A SIZ marker is expected.

J2K_STATE_MH 

The decoding process is in the main header.

J2K_STATE_TPHSOT 

The decoding process is in a tile part header and expects a SOT marker.

J2K_STATE_TPH 

The decoding process is in a tile part header.

J2K_STATE_MT 

The EOC marker has just been read.

J2K_STATE_NEOC 

The decoding process must not expect a EOC marker because the codestream is truncated.

J2K_STATE_ERR 

The decoding process has encountered an error.

T2 encoding mode.

Enumerator:
FINAL_PASS 

Function called in Rate allocation process.


Member Function Documentation

static LSINT32 LSE_CALL lsi::CJ2k::j2k_calculate_tp ( opj_cp_t _pcCp,
CJpegImage::opj_image_t _piImage,
opj_j2k_t _pjJ2k 
) [static, protected]

Memory allocation for TLM marker.

Parameters:
_pcCpUndocumented function from the OpenJpeg Library.
_i32ImageNumCompUndocumented function from the OpenJpeg Library.
_piImageUndocumented function from the OpenJpeg Library.
_pjJ2kUndocumented function from the OpenJpeg Library.
Returns:
Undocumented return from the OpenJpeg Library.
static const LSCHAR* LSE_CALL lsi::CJ2k::j2k_convert_progression_order ( OPJ_PROG_ORDER  _poOrder) [static]

Converts an enum type progression order to string type.

Parameters:
_poOrderUndocumented parameter.
Returns:
Undocumented return.
static opj_j2k_t* LSE_CALL lsi::CJ2k::j2k_create_compress ( CJpegCommonStructs::opj_common_ptr  _cpInfo) [static]

Creates a J2K compression structure.

Parameters:
_cpInfoCodec context info.
Returns:
Returns a handle to a J2K compressor if successful, returns NULL otherwise.
static opj_j2k_t* LSE_CALL lsi::CJ2k::j2k_create_decompress ( CJpegCommonStructs::opj_common_ptr  _cpInfoC) [static]

Creates a J2K decompression structure.

Parameters:
_cpInfoCCodec context info.
Returns:
Returns a handle to a J2K decompressor if successful, returns NULL otherwise.
static opj_dec_mstabent_t* LSE_CALL lsi::CJ2k::j2k_dec_mstab_lookup ( LSINT32  _i32Id) [static, protected]

Read the lookup table containing all the marker, status and action.

Parameters:
_i32IdMarker value.
Returns:
Undocumented return.
static CJpegImage::opj_image_t* LSE_CALL lsi::CJ2k::j2k_decode ( opj_j2k_t _pjJ2k,
CCio::opj_cio_t *  _pcCio,
CJpegCommonStructs::opj_codestream_info_t _pciCStrInfo 
) [static]

Decode an image from a JPEG-2000 codestream.

Parameters:
_pjJ2kJ2K decompressor handle.
_pcCioInput buffer stream.
_pciCStrInfoCodestream information structure if required, NULL otherwise.
Returns:
Returns a decoded image if successful, returns NULL otherwise.
static CJpegImage::opj_image_t* LSE_CALL lsi::CJ2k::j2k_decode_jpt_stream ( opj_j2k_t _pjJ2k,
CCio::opj_cio_t *  _pcCio,
CJpegCommonStructs::opj_codestream_info_t _pciCStrInfo 
) [static]

Decode an image form a JPT-stream (JPEG 2000, JPIP).

Parameters:
_pjJ2kJ2K decompressor handle.
_pcCioInput buffer stream.
_pciCStrInfoCodestream information structure if required, NULL otherwise.
Returns:
Returns a decoded image if successful, returns NULL otherwise.
static LSVOID LSE_CALL lsi::CJ2k::j2k_destroy_compress ( opj_j2k_t _pjJ2k) [static]

Destroy a J2K compressor handle.

Parameters:
_pjJ2kJ2K compressor handle to destroy.
static LSVOID LSE_CALL lsi::CJ2k::j2k_destroy_decompress ( opj_j2k_t _pjJ2k) [static]

Destroy a J2K decompressor handle.

Parameters:
_pjJ2kJ2K decompressor handle to destroy.
static LSBOOL LSE_CALL lsi::CJ2k::j2k_encode ( opj_j2k_t _pjJ2k,
CCio::opj_cio_t *  _pcCio,
CJpegImage::opj_image_t _piImage,
CJpegCommonStructs::opj_codestream_info_t _pciCStrInfo 
) [static]

Encode an image into a JPEG-2000 codestream.

Parameters:
_pjJ2kJ2K compressor handle.
_pcCioOutput buffer stream.
_piImageImage to encode.
_pciCStrInfoCodestream information structure if required, NULL otherwise.
Returns:
Returns true if successful, returns false otherwise.
static LSINT32 LSE_CALL lsi::CJ2k::j2k_get_num_tp ( opj_cp_t _pcCp,
LSINT32  _i32PiNo,
LSINT32  _i32TileNo 
) [static, protected]

Undocumented function from the OpenJpeg Library.

Parameters:
_pcCpUndocumented function from the OpenJpeg Library.
_i32PiNoUndocumented function from the OpenJpeg Library.
_i32TileNoUndocumented function from the OpenJpeg Library.
Returns:
Undocumented return from the OpenJpeg Library.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_coc ( opj_j2k_t _pjJ2k) [static, protected]

Read the COC marker (coding style component).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_cod ( opj_j2k_t _pjJ2k) [static, protected]

Read the COD marker (coding style default).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_com ( opj_j2k_t _pjJ2k) [static, protected]

Read the COM marker (comment).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_cox ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo 
) [static, protected]

Read the value concerning the specified component in the marker COD and COC.

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information read.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_crg ( opj_j2k_t _pjJ2k) [static, protected]

Read the CRG marker (component registration).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_eoc ( opj_j2k_t _pjJ2k) [static, protected]

Read the EOC marker (end of codestream).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_plm ( opj_j2k_t _pjJ2k) [static, protected]

Read the PLM marker (packet length, main header).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_plt ( opj_j2k_t _pjJ2k) [static, protected]

Read the PLT marker (packet length, tile-part header).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_poc ( opj_j2k_t _pjJ2k) [static, protected]

Read the POC marker (progression order change).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_ppm ( opj_j2k_t _pjJ2k) [static, protected]

Read the PPM marker (packet packet headers, main header).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_ppt ( opj_j2k_t _pjJ2k) [static, protected]

Read the PPT marker (packet packet headers, tile-part header).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_qcc ( opj_j2k_t _pjJ2k) [static, protected]

Read the QCC marker (quantization component).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_qcd ( opj_j2k_t _pjJ2k) [static, protected]

Read the QCD marker (quantization default).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_qcx ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo,
LSINT32  _i32Len 
) [static, protected]

Read the value concerning the specified component in the marker QCD and QCC.

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concern by the information read.
_i32LenLength of the information in the QCX part of the marker QCD/QCC.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_rgn ( opj_j2k_t _pjJ2k) [static, protected]

Read the RGN marker (region-of-interest).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_siz ( opj_j2k_t _pjJ2k) [static, protected]

Read the SIZ marker (image and tile size).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_soc ( opj_j2k_t _pjJ2k) [static, protected]

Read the SOC marker (Start of Codestream).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_sod ( opj_j2k_t _pjJ2k) [static, protected]

Read the SOD marker (start of data).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_sot ( opj_j2k_t _pjJ2k) [static, protected]

Read the SOT marker (start of tile-part).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_tlm ( opj_j2k_t _pjJ2k) [static, protected]

Read the TLM marker (tile-part lengths).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_read_unk ( opj_j2k_t _pjJ2k) [static, protected]

Read an unknown marker.

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_setup_decoder ( opj_j2k_t _pjJ2k,
CJpegCommonStructs::opj_dparameters_t _pdParameters 
) [static]

Setup the decoder decoding parameters using user parameters. Decoding parameters are returned in _pjJ2k->cp.

Parameters:
_pjJ2kJ2K decompressor handle.
_pdParametersdecompression _pdParameters.
static LSVOID LSE_CALL lsi::CJ2k::j2k_setup_encoder ( opj_j2k_t _pjJ2k,
CJpegCommonStructs::opj_cparameters_t _pcpParameters,
CJpegImage::opj_image_t _piImage 
) [static]

Setup the encoder parameters using the current image and using user parameters. Coding parameters are returned in _pjJ2k->cp.

Parameters:
_pjJ2kJ2K compressor handle.
_pcpParameterscompression parameters.
_piImageinput filled image.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_coc ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo 
) [static, protected]

Write the COC marker (coding style component).

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information written.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_cod ( opj_j2k_t _pjJ2k) [static, protected]

Write the COD marker (coding style default).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_com ( opj_j2k_t _pjJ2k) [static, protected]

Write the COM marker (comment).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_cox ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo 
) [static, protected]

Write the value concerning the specified component in the marker COD and COC.

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information written.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_eoc ( opj_j2k_t _pjJ2k) [static, protected]

Write the EOC marker (end of codestream).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_poc ( opj_j2k_t _pjJ2k) [static, protected]

Write the POC marker (progression order change).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_qcc ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo 
) [static, protected]

Write the QCC marker (quantization component).

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information written.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_qcd ( opj_j2k_t _pjJ2k) [static, protected]

Write the QCD marker (quantization default).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_qcx ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo 
) [static, protected]

Write the value concerning the specified component in the marker QCD and QCC.

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information written.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_rgn ( opj_j2k_t _pjJ2k,
LSINT32  _i32CompNo,
LSINT32  _i32TileNo 
) [static, protected]

Write the RGN marker (region-of-interest).

Parameters:
_pjJ2kJ2K handle.
_i32CompNoNumber of the component concerned by the information written.
_i32TileNoNumber of the tile concerned by the information written.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_siz ( opj_j2k_t _pjJ2k) [static, protected]

Write the SIZ marker (image and tile size).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_soc ( opj_j2k_t _pjJ2k) [static, protected]

Write the SOC marker (Start Of Codestream).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_sod ( opj_j2k_t _pjJ2k,
LSVOID *  _i32TileCoder 
) [static, protected]

Write the SOD marker (start of data).

Parameters:
_pjJ2kJ2K handle.
_i32TileCoderPointer to a TCD handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_sot ( opj_j2k_t _pjJ2k) [static, protected]

Write the SOT marker (start of tile-part).

Parameters:
_pjJ2kJ2K handle.
static LSVOID LSE_CALL lsi::CJ2k::j2k_write_tlm ( opj_j2k_t _pjJ2k) [static, protected]

Write the TLM marker (Mainheader).

Parameters:
_pjJ2kJ2K handle.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator