OpenJPEG  2.2.0
Functions
j2kheader_manager.h File Reference
#include "byte_manager.h"
#include "index_manager.h"

Go to the source code of this file.

Functions

OPJ_BOOL get_mainheader_from_j2kstream (Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD)
 get main header information from j2k codestream More...
 
OPJ_BOOL modify_mainheader (Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen)
 modify main header in j2k codestream to fit with the new number of decompositions More...
 
OPJ_BOOL modify_tileheader (Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen)
 modify tile header in j2k codestream to fit with the tile part length, and new number of decompositions for multi-componet images More...
 

Function Documentation

OPJ_BOOL get_mainheader_from_j2kstream ( Byte_t j2kstream,
SIZmarker_param_t SIZ,
CODmarker_param_t COD 
)

get main header information from j2k codestream

Parameters
[in]j2kstreamj2k codestream
[out]SIZSIZ marker pointer
[out]CODCOD marker pointer
Returns
if succeeded (true) or failed (false)

References big2(), FCGI_stderr, get_CODmkrdata_from_j2kstream(), get_SIZmkrdata_from_j2kstream(), CODmarker_param::Lcod, SIZmarker_param::Lsiz, OPJ_FALSE, and OPJ_TRUE.

Referenced by get_SIZ_from_jpipstream(), recons_codestream_from_JPPstream(), and recons_codestream_from_JPTstream().

OPJ_BOOL modify_mainheader ( Byte_t j2kstream,
int  numOfdecomp,
SIZmarker_param_t  SIZ,
CODmarker_param_t  COD,
Byte8_t j2klen 
)

modify main header in j2k codestream to fit with the new number of decompositions

Parameters
[in]j2kstreamj2k codestream
[in]numOfdecompthe New number of decompositions
[in]SIZoriginal SIZ marker information
[in]CODoriginal COD marker information
[out]j2klenpointer to the length of j2k code stream
Returns
if succeeded (true) or failed (false)

References FCGI_stderr, CODmarker_param::Lcod, SIZmarker_param::Lsiz, modify_CODmkrstream(), modify_SIZmkrstream(), CODmarker_param::numOfdecomp, OPJ_FALSE, and OPJ_TRUE.

Referenced by recons_codestream_from_JPPstream().

OPJ_BOOL modify_tileheader ( Byte_t j2kstream,
Byte8_t  SOToffset,
int  numOfdecomp,
Byte2_t  Csiz,
Byte8_t j2klen 
)

modify tile header in j2k codestream to fit with the tile part length, and new number of decompositions for multi-componet images

Parameters
[in]j2kstreamj2k codestream
[in]SOToffsetoffset of SOT marker from the beginning of j2kstream
[in]numOfdecompthe New number of decompositions, -1 if the same as original
[in]Csiznumber of components
[out]j2klenpointer to the length of j2k code stream
Returns
if succeeded (true) or failed (false)

References FCGI_stderr, modify_4Bytecode(), modify_COCmkrstream(), OPJ_FALSE, and OPJ_TRUE.

Referenced by recons_codestream_from_JPPstream().