OPJ_UINT32 len;
opj_jp2_box_t *box;
int num_box = 0;
- opj_bool EPHused;
+ OPJ_BOOL EPHused;
OPJ_BYTE l_data_header [4];
lenp = -1;
return len;
}
-opj_bool opj_check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio,
+OPJ_BOOL opj_check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
OPJ_BYTE l_data_header [4];
- opj_bool EPHused = OPJ_FALSE;
+ OPJ_BOOL EPHused = OPJ_FALSE;
int i=0;
OPJ_OFF_T org_pos;
unsigned int Scod;
* @param[in] cio file output handle
* @return true if EPH is used
*/
-opj_bool opj_check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio,
+OPJ_BOOL opj_check_EPHuse( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
#endif /* !CIDX_MANAGER_H_ */
* @param[in] cio file output handle
* @return length of ppix box
*/
-int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
* @param[in] cio file output handle
* @return length of ppix box
*/
-int opj_write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_phix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/*
int opj_write_mainmhix( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
-int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
-int opj_write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int opj_write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_stream_private_t *cio,
* @return length of faix box
*/
-int opj_write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_phix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
OPJ_BYTE l_data_header [8];
}
-int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_phixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
int tileno, version, i, nmax, size_of_coding; /* 4 or 8 */
for( layno=0; layno<numOflayers; layno++){
switch ( cstr_info.prog){
- case LRCP:
+ case OPJ_LRCP:
packet = tile_Idx->packet[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno];
break;
- case RLCP:
+ case OPJ_RLCP:
packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno];
break;
- case RPCL:
+ case OPJ_RPCL:
packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno];
break;
- case PCRL:
+ case OPJ_PCRL:
packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno];
break;
- case CPRL:
+ case OPJ_CPRL:
packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno];
break;
default:
*/
-int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_ppix( int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
OPJ_BYTE l_data_header [4];
-int opj_write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
+int opj_write_ppixfaix( int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
OPJ_BYTE l_data_header [8];
for( layno=0; layno<numOflayers; layno++){
switch ( cstr_info.prog){
- case LRCP:
+ case OPJ_LRCP:
packet = tile_Idx->packet[ ((layno*numOfres+resno)*cstr_info.numcomps+compno)*numOfprec+precno];
break;
- case RLCP:
+ case OPJ_RLCP:
packet = tile_Idx->packet[ ((resno*numOflayers+layno)*cstr_info.numcomps+compno)*numOfprec+precno];
break;
- case RPCL:
+ case OPJ_RPCL:
packet = tile_Idx->packet[ ((resno*numOfprec+precno)*cstr_info.numcomps+compno)*numOflayers+layno];
break;
- case PCRL:
+ case OPJ_PCRL:
packet = tile_Idx->packet[ ((precno*cstr_info.numcomps+compno)*numOfres+resno)*numOflayers + layno];
break;
- case CPRL:
+ case OPJ_CPRL:
packet = tile_Idx->packet[ ((compno*numOfprec+precno)*numOfres+resno)*numOflayers + layno];
break;
default:
* @param[in] length length of data
* @param[in] maxlenPerFrame maximum data length to send per frame
*/
-void send_responsedata_on_aux( opj_bool istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T length, OPJ_SIZE_T maxlenPerFrame);
+void send_responsedata_on_aux( OPJ_BOOL istcp, auxtrans_param_t auxtrans, const char cid[], void *data, OPJ_SIZE_T length, OPJ_SIZE_T maxlenPerFrame);
#endif /* !AUXTRANS_MANAGER_H_ */
return cachemodellist;
}
-cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, target_param_t *target, opj_bool reqJPP)
+cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, target_param_t *target, OPJ_BOOL reqJPP)
{
cachemodel_param_t *cachemodel;
faixbox_param_t *tilepart;
tilepart = target->codeidx->tilepart;
numOftiles = get_m( tilepart);
numOfelem = get_nmax( tilepart)*numOftiles;
- cachemodel->tp_model = (opj_bool *)opj_calloc( 1, numOfelem*sizeof(opj_bool));
- cachemodel->th_model = (opj_bool *)opj_calloc( 1, numOftiles*sizeof(opj_bool));
- cachemodel->pp_model = (opj_bool **)opj_malloc( target->codeidx->SIZ.Csiz*sizeof(opj_bool *));
+ cachemodel->tp_model = (OPJ_BOOL *)opj_calloc( 1, numOfelem*sizeof(OPJ_BOOL));
+ cachemodel->th_model = (OPJ_BOOL *)opj_calloc( 1, numOftiles*sizeof(OPJ_BOOL));
+ cachemodel->pp_model = (OPJ_BOOL **)opj_malloc( target->codeidx->SIZ.Csiz*sizeof(OPJ_BOOL *));
for( i=0; i<target->codeidx->SIZ.Csiz; i++){
precpacket = target->codeidx->precpacket[i];
- cachemodel->pp_model[i] = (opj_bool *)opj_calloc( 1, get_nmax(precpacket)*get_m(precpacket)*sizeof(opj_bool));
+ cachemodel->pp_model[i] = (OPJ_BOOL *)opj_calloc( 1, get_nmax(precpacket)*get_m(precpacket)*sizeof(OPJ_BOOL));
}
cachemodel->next = NULL;
opj_free( *cachemodel);
}
-opj_bool is_allsent( cachemodel_param_t cachemodel)
+OPJ_BOOL is_allsent( cachemodel_param_t cachemodel)
{
target_param_t *target;
Byte8_t TPnum; /* num of tile parts in each tile */
/** Cache model parameters*/
typedef struct cachemodel_param{
target_param_t *target; /**< reference pointer to the target*/
- opj_bool jppstream; /**< return type, true: JPP-stream, false: JPT-stream*/
- opj_bool mhead_model; /**< main header model, if sent, 1, else 0*/
- opj_bool *tp_model; /**< dynamic array pointer of tile part model, if sent, 1, else 0*/
- opj_bool *th_model; /**< dynamic array pointer of tile header model*/
- opj_bool **pp_model; /**< dynamic array pointer of precint packet model*/
+ OPJ_BOOL jppstream; /**< return type, true: JPP-stream, false: JPT-stream*/
+ OPJ_BOOL mhead_model; /**< main header model, if sent, 1, else 0*/
+ OPJ_BOOL *tp_model; /**< dynamic array pointer of tile part model, if sent, 1, else 0*/
+ OPJ_BOOL *th_model; /**< dynamic array pointer of tile header model*/
+ OPJ_BOOL **pp_model; /**< dynamic array pointer of precint packet model*/
struct cachemodel_param *next; /**< pointer to the next cache model*/
} cachemodel_param_t;
* @param[in] reqJPP if JPP-stream is desired true, JPT-stream false
* @return pointer to the generated cache model
*/
-cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, target_param_t *target, opj_bool reqJPP);
+cachemodel_param_t * gene_cachemodel( cachemodellist_param_t *cachemodellist, target_param_t *target, OPJ_BOOL reqJPP);
/**
* @param[in] cachemodel cache model
* @return true if sent all, false otherwise
*/
-opj_bool is_allsent( cachemodel_param_t cachemodel);
+OPJ_BOOL is_allsent( cachemodel_param_t cachemodel);
/**
send_stream( connected_socket, responce, 9);
}
-void response_signal( SOCKET connected_socket, opj_bool succeed)
+void response_signal( SOCKET connected_socket, OPJ_BOOL succeed)
{
Byte_t code;
* @param [in] connected_socket file descriptor of the connected socket
* @param [in] succeed whether if the requested process succeeded
*/
-void response_signal( SOCKET connected_socket, opj_bool succeed);
+void response_signal( SOCKET connected_socket, OPJ_BOOL succeed);
#endif /* !IMGSOCK_MANAGER_H_ */
* @param[in] toplev_boxlist top level box list
* @return if correct (true) or wrong (false)
*/
-opj_bool check_JP2boxidx( boxlist_param_t *toplev_boxlist);
+OPJ_BOOL check_JP2boxidx( boxlist_param_t *toplev_boxlist);
/**
* set code index parameters (parse cidx box)
* @param[out] codeidx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_cidxdata( box_param_t *cidx_box, index_param_t *codeidx);
+OPJ_BOOL set_cidxdata( box_param_t *cidx_box, index_param_t *codeidx);
index_param_t * parse_jp2file( int fd)
{
if( COD.YPsiz) opj_free( COD.YPsiz);
}
-opj_bool check_JP2boxidx( boxlist_param_t *toplev_boxlist)
+OPJ_BOOL check_JP2boxidx( boxlist_param_t *toplev_boxlist)
{
box_param_t *iptr, *fidx, *prxy;
box_param_t *cidx, *jp2c;
* @param[out] jp2idx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_cptrdata( box_param_t *cidx_box, index_param_t *jp2idx);
+OPJ_BOOL set_cptrdata( box_param_t *cidx_box, index_param_t *jp2idx);
/**
* set code index parameters from mhix box for main header
* @param[out] jp2idx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_mainmhixdata( box_param_t *cidx_box, codestream_param_t codestream, index_param_t *jp2idx);
+OPJ_BOOL set_mainmhixdata( box_param_t *cidx_box, codestream_param_t codestream, index_param_t *jp2idx);
/**
* set code index parameters from tpix box
* @param[out] jp2idx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_tpixdata( box_param_t *cidx_box, index_param_t *jp2idx);
+OPJ_BOOL set_tpixdata( box_param_t *cidx_box, index_param_t *jp2idx);
/**
* set code index parameters from thix box
* @param[out] jp2idx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_thixdata( box_param_t *cidx_box, index_param_t *jp2idx);
+OPJ_BOOL set_thixdata( box_param_t *cidx_box, index_param_t *jp2idx);
/**
* set code index parameters from ppix box
* @param[out] jp2idx pointer to index parameters
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_ppixdata( box_param_t *cidx_box, index_param_t *jp2idx);
+OPJ_BOOL set_ppixdata( box_param_t *cidx_box, index_param_t *jp2idx);
-opj_bool set_cidxdata( box_param_t *cidx_box, index_param_t *jp2idx)
+OPJ_BOOL set_cidxdata( box_param_t *cidx_box, index_param_t *jp2idx)
{
box_param_t *manf_box;
manfbox_param_t *manf;
return OPJ_TRUE;
}
-opj_bool set_cptrdata( box_param_t *cidx_box, index_param_t *jp2idx)
+OPJ_BOOL set_cptrdata( box_param_t *cidx_box, index_param_t *jp2idx)
{
box_param_t *box; /**< cptr box*/
Byte2_t dr, cont;
* @param[out] SIZ SIZ marker parameters pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_SIZmkrdata( markeridx_param_t *sizmkidx, codestream_param_t codestream, SIZmarker_param_t *SIZ);
+OPJ_BOOL set_SIZmkrdata( markeridx_param_t *sizmkidx, codestream_param_t codestream, SIZmarker_param_t *SIZ);
/**
* set code index parameters from COD marker in codestream
* @param[out] COD COD marker parameters pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool set_CODmkrdata( markeridx_param_t *codmkidx, codestream_param_t codestream, CODmarker_param_t *COD);
+OPJ_BOOL set_CODmkrdata( markeridx_param_t *codmkidx, codestream_param_t codestream, CODmarker_param_t *COD);
-opj_bool set_mainmhixdata( box_param_t *cidx_box, codestream_param_t codestream, index_param_t *jp2idx)
+OPJ_BOOL set_mainmhixdata( box_param_t *cidx_box, codestream_param_t codestream, index_param_t *jp2idx)
{
box_param_t *mhix_box;
mhixbox_param_t *mhix;
return OPJ_TRUE;
}
-opj_bool set_tpixdata( box_param_t *cidx_box, index_param_t *jp2idx)
+OPJ_BOOL set_tpixdata( box_param_t *cidx_box, index_param_t *jp2idx)
{
box_param_t *tpix_box; /**< tpix box*/
box_param_t *faix_box; /**< faix box*/
return OPJ_TRUE;
}
-opj_bool set_thixdata( box_param_t *cidx_box, index_param_t *jp2idx)
+OPJ_BOOL set_thixdata( box_param_t *cidx_box, index_param_t *jp2idx)
{
box_param_t *thix_box, *manf_box, *mhix_box;
manfbox_param_t *manf;
return OPJ_TRUE;
}
-opj_bool set_ppixdata( box_param_t *cidx_box, index_param_t *jp2idx)
+OPJ_BOOL set_ppixdata( box_param_t *cidx_box, index_param_t *jp2idx)
{
box_param_t *ppix_box, *faix_box, *manf_box;
manfbox_param_t *manf; /**< manf*/
return OPJ_TRUE;
}
-opj_bool set_SIZmkrdata( markeridx_param_t *sizmkidx, codestream_param_t codestream, SIZmarker_param_t *SIZ)
+OPJ_BOOL set_SIZmkrdata( markeridx_param_t *sizmkidx, codestream_param_t codestream, SIZmarker_param_t *SIZ)
{
marker_param_t sizmkr;
int i;
return OPJ_TRUE;
}
-opj_bool set_CODmkrdata( markeridx_param_t *codmkidx, codestream_param_t codestream, CODmarker_param_t *COD)
+OPJ_BOOL set_CODmkrdata( markeridx_param_t *codmkidx, codestream_param_t codestream, CODmarker_param_t *COD)
{
marker_param_t codmkr;
int i;
return n2;
}
-opj_bool isJPTfeasible( index_param_t index)
+OPJ_BOOL isJPTfeasible( index_param_t index)
{
if( 1 < get_nmax( index.tilepart))
return OPJ_TRUE;
* @param[in] index index parameters
* @return true if JPT-stream is feasible
*/
-opj_bool isJPTfeasible( index_param_t index);
+OPJ_BOOL isJPTfeasible( index_param_t index);
#endif /* !INDEX_MANAGER_H_ */
SIZmarker_param_t get_SIZmkrdata_from_j2kstream( Byte_t *SIZstream);
CODmarker_param_t get_CODmkrdata_from_j2kstream( Byte_t *CODstream);
-opj_bool get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD)
+OPJ_BOOL get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD)
{
if( *j2kstream++ != 0xff || *j2kstream++ != 0x4f){
fprintf( FCGI_stderr, "Error, j2kstream is not starting with SOC marker\n");
}
-opj_bool modify_SIZmkrstream( SIZmarker_param_t SIZ, int difOfdecomplev, Byte_t *SIZstream);
+OPJ_BOOL modify_SIZmkrstream( SIZmarker_param_t SIZ, int difOfdecomplev, Byte_t *SIZstream);
Byte2_t modify_CODmkrstream( CODmarker_param_t COD, int numOfdecomp, Byte_t *CODstream);
-opj_bool modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen)
+OPJ_BOOL modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen)
{
Byte2_t newLcod;
return OPJ_TRUE;
}
-opj_bool modify_SIZmkrstream( SIZmarker_param_t SIZ, int difOfdecomplev, Byte_t *SIZstream)
+OPJ_BOOL modify_SIZmkrstream( SIZmarker_param_t SIZ, int difOfdecomplev, Byte_t *SIZstream)
{
int i;
return newLcod;
}
-opj_bool modify_COCmkrstream( int numOfdecomp, Byte_t *COCstream, Byte2_t Csiz, Byte2_t *oldLcoc, Byte2_t *newLcoc);
+OPJ_BOOL modify_COCmkrstream( int numOfdecomp, Byte_t *COCstream, Byte2_t Csiz, Byte2_t *oldLcoc, Byte2_t *newLcoc);
-opj_bool modify_tileheader( Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen)
+OPJ_BOOL modify_tileheader( Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen)
{
Byte4_t Psot; /* tile part length ref A.4.2 Start of tile-part SOT */
Byte_t *thstream, *SOTstream, *Psot_stream;
return OPJ_TRUE;
}
-opj_bool modify_COCmkrstream( int numOfdecomp, Byte_t *COCstream, Byte2_t Csiz, Byte2_t *oldLcoc, Byte2_t *newLcoc)
+OPJ_BOOL modify_COCmkrstream( int numOfdecomp, Byte_t *COCstream, Byte2_t Csiz, Byte2_t *oldLcoc, Byte2_t *newLcoc)
{
if( numOfdecomp < 0 || numOfdecomp > 255 ) return OPJ_FALSE;
if( *COCstream++ != 0xff || *COCstream++ != 0x53){
* @param[out] COD COD marker pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD);
+OPJ_BOOL get_mainheader_from_j2kstream( Byte_t *j2kstream, SIZmarker_param_t *SIZ, CODmarker_param_t *COD);
/**
* modify main header in j2k codestream to fit with the new number of decompositions
* @param[out] j2klen pointer to the length of j2k code stream
* @return if succeeded (true) or failed (false)
*/
-opj_bool modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, Byte8_t *j2klen);
+OPJ_BOOL modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SIZ, CODmarker_param_t COD, 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
* @param[out] j2klen pointer to the length of j2k code stream
* @return if succeeded (true) or failed (false)
*/
-opj_bool modify_tileheader( Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen);
+OPJ_BOOL modify_tileheader( Byte_t *j2kstream, Byte8_t SOToffset, int numOfdecomp, Byte2_t Csiz, Byte8_t *j2klen);
#endif /* !J2KHEADER_MANAGER_H_ */
/* JPEG-2000 codestream */
/* get a decoder handle */
- l_codec = opj_create_decompress(CODEC_J2K);
+ l_codec = opj_create_decompress(OPJ_CODEC_J2K);
/* catch events using our callbacks and give a local context */
opj_set_info_handler(l_codec, info_callback,00);
return jp2stream;
}
-opj_bool isJPPstream( Byte8_t csn, msgqueue_param_t *msgqueue);
+OPJ_BOOL isJPPstream( Byte8_t csn, msgqueue_param_t *msgqueue);
Byte_t * recons_codestream_from_JPTstream( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, int fw, int fh, Byte8_t *j2klen);
Byte_t * recons_codestream_from_JPPstream( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, int fw, int fh, Byte8_t *j2klen);
return recons_codestream_from_JPTstream( msgqueue, jpipstream, csn, fw, fh, codelen);
}
-opj_bool isJPPstream( Byte8_t csn, msgqueue_param_t *msgqueue)
+OPJ_BOOL isJPPstream( Byte8_t csn, msgqueue_param_t *msgqueue)
{
message_param_t *msg;
}
Byte_t * add_mainhead_msgstream( msgqueue_param_t *msgqueue, Byte_t *origstream, Byte_t *j2kstream, Byte8_t csn, Byte8_t *j2klen);
-Byte8_t get_last_tileID( msgqueue_param_t *msgqueue, Byte8_t csn, opj_bool isJPPstream);
+Byte8_t get_last_tileID( msgqueue_param_t *msgqueue, Byte8_t csn, OPJ_BOOL isJPPstream);
Byte_t * add_emptytilestream( const Byte8_t tileID, Byte_t *j2kstream, Byte8_t *j2klen);
Byte_t * recons_codestream_from_JPTstream( msgqueue_param_t *msgqueue, Byte_t *jpipstream, Byte8_t csn, int fw, int fh, Byte8_t *j2klen)
{
Byte_t *j2kstream = NULL;
Byte8_t last_tileID, tileID;
- opj_bool found;
+ OPJ_BOOL found;
Byte8_t binOffset;
message_param_t *ptr;
SIZmarker_param_t SIZ;
Byte_t *j2kstream = NULL;
Byte8_t tileID, last_tileID;
Byte8_t SOToffset;
- opj_bool foundTH;
+ OPJ_BOOL foundTH;
Byte8_t binOffset;
message_param_t *ptr;
SIZmarker_param_t SIZ;
int *max_reslev, Byte8_t *j2klen)
{
switch( COD.prog_order){
- case LRCP:
+ case OPJ_LRCP:
return recons_LRCPbitstream( msgqueue, jpipstream, j2kstream, csn, tileID, SIZ, COD, mindeclev, max_reslev, j2klen);
- case RLCP:
+ case OPJ_RLCP:
return recons_RLCPbitstream( msgqueue, jpipstream, j2kstream, csn, tileID, SIZ, COD, mindeclev, max_reslev, j2klen);
- case RPCL:
+ case OPJ_RPCL:
return recons_RPCLbitstream( msgqueue, jpipstream, j2kstream, csn, tileID, SIZ, COD, mindeclev, max_reslev, j2klen);
- case PCRL:
+ case OPJ_PCRL:
return recons_PCRLbitstream( msgqueue, jpipstream, j2kstream, csn, tileID, SIZ, COD, mindeclev, max_reslev, j2klen);
- case CPRL:
+ case OPJ_CPRL:
return recons_CPRLbitstream( msgqueue, jpipstream, j2kstream, csn, tileID, SIZ, COD, mindeclev, max_reslev, j2klen);
default:
fprintf( FCGI_stderr, "Error, progression order not supported\n");
{
Byte8_t seqID, precID, binOffset;
message_param_t *ptr;
- opj_bool foundPrec;
+ OPJ_BOOL foundPrec;
int l;
seqID = comp_seqID( tileID, SIZ, COD, res_idx, prct_idx);
{
Byte8_t precID, binOffset;
message_param_t *ptr;
- opj_bool foundPrec;
+ OPJ_BOOL foundPrec;
precID = comp_precinct_id( (int)tileID, comp_idx, (int)seqID, (int)SIZ.Csiz, (int)SIZ.XTnum*(int)SIZ.YTnum);
return seqID;
}
-Byte8_t get_last_tileID( msgqueue_param_t *msgqueue, Byte8_t csn, opj_bool isJPPstream)
+Byte8_t get_last_tileID( msgqueue_param_t *msgqueue, Byte8_t csn, OPJ_BOOL isJPPstream)
{
Byte8_t last_tileID = 0;
message_param_t *msg;
#endif /*SERVER*/
-opj_bool identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target)
+OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target)
{
if( query_param.tid){
if( strcmp( query_param.tid, "0") != 0 ){
}
}
-opj_bool associate_channel( query_param_t query_param,
+OPJ_BOOL associate_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
session_param_t **cursession,
channel_param_t **curchannel)
return OPJ_TRUE;
}
-opj_bool open_channel( query_param_t query_param,
+OPJ_BOOL open_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
auxtrans_param_t auxtrans,
target_param_t *target,
return OPJ_TRUE;
}
-opj_bool close_channel( query_param_t query_param,
+OPJ_BOOL close_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
session_param_t **cursession,
channel_param_t **curchannel)
* @param[in,out] msgqueue message queue pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool enqueue_metabins( query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue);
+OPJ_BOOL enqueue_metabins( query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue);
-opj_bool gene_JPIPstream( query_param_t query_param,
+OPJ_BOOL gene_JPIPstream( query_param_t query_param,
target_param_t *target,
session_param_t *cursession,
channel_param_t *curchannel,
* @param[in] msgqueue message queue
* @return
*/
-void enqueue_precincts( int xmin, int xmax, int ymin, int ymax, int tile_id, int level, int lastcomp, opj_bool *comps, int layers, msgqueue_param_t *msgqueue);
+void enqueue_precincts( int xmin, int xmax, int ymin, int ymax, int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue);
/**
* enqueue all precincts inside a tile into the queue
* @param[in] msgqueue message queue
* @return
*/
-void enqueue_allprecincts( int tile_id, int level, int lastcomp, opj_bool *comps, int layers, msgqueue_param_t *msgqueue);
+void enqueue_allprecincts( int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue);
void enqueue_imagedata( query_param_t query_param, msgqueue_param_t *msgqueue)
{
}
-void enqueue_precincts( int xmin, int xmax, int ymin, int ymax, int tile_id, int level, int lastcomp, opj_bool *comps, int layers, msgqueue_param_t *msgqueue)
+void enqueue_precincts( int xmin, int xmax, int ymin, int ymax, int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue)
{
index_param_t *codeidx;
int c, u, v, res_lev, dec_lev;
}
}
-void enqueue_allprecincts( int tile_id, int level, int lastcomp, opj_bool *comps, int layers, msgqueue_param_t *msgqueue)
+void enqueue_allprecincts( int tile_id, int level, int lastcomp, OPJ_BOOL *comps, int layers, msgqueue_param_t *msgqueue)
{
index_param_t *codeidx;
int c, i, res_lev, dec_lev;
}
}
-opj_bool enqueue_metabins( query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue)
+OPJ_BOOL enqueue_metabins( query_param_t query_param, metadatalist_param_t *metadatalist, msgqueue_param_t *msgqueue)
{
int i;
for( i=0; query_param.box_type[i][0]!=0 && i<MAX_NUMOFBOX; i++){
* @param[out] target address of target pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target);
+OPJ_BOOL identify_target( query_param_t query_param, targetlist_param_t *targetlist, target_param_t **target);
/**
* REQUEST: channel association
* @param[out] curchannel address of the associated channel pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool associate_channel( query_param_t query_param,
+OPJ_BOOL associate_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
session_param_t **cursession,
channel_param_t **curchannel);
* @param[in,out] curchannel address of the associated/opened channel pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool open_channel( query_param_t query_param,
+OPJ_BOOL open_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
auxtrans_param_t auxtrans,
target_param_t *target,
* @param[in,out] curchannel address of the deleting channel pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool close_channel( query_param_t query_param,
+OPJ_BOOL close_channel( query_param_t query_param,
sessionlist_param_t *sessionlist,
session_param_t **cursession,
channel_param_t **curchannel);
* @param[out] msgqueue address of the message queue pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool gene_JPIPstream( query_param_t query_param,
+OPJ_BOOL gene_JPIPstream( query_param_t query_param,
target_param_t *target,
session_param_t *cursession,
channel_param_t *curchannel,
#define logstream stderr
#endif /*SERVER*/
-msgqueue_param_t * gene_msgqueue( opj_bool stateless, cachemodel_param_t *cachemodel)
+msgqueue_param_t * gene_msgqueue( OPJ_BOOL stateless, cachemodel_param_t *cachemodel)
{
msgqueue_param_t *msgqueue;
{
cachemodel_param_t *cachemodel;
target_param_t *target;
- opj_bool *tp_model;
+ OPJ_BOOL *tp_model;
Byte8_t numOftparts; /* num of tile parts par tile*/
Byte8_t numOftiles;
index_param_t *codeidx;
/** message parameters */
typedef struct message_param{
- opj_bool last_byte; /**< if message contains the last byte of the data-bin*/
+ OPJ_BOOL last_byte; /**< if message contains the last byte of the data-bin*/
Byte8_t in_class_id; /**< in-class identifier A.2.3*/
Byte8_t class_id; /**< class identifiers */
Byte8_t csn; /**< index of the codestream*/
typedef struct msgqueue_param{
message_param_t *first; /**< first message pointer of the list*/
message_param_t *last; /**< last message pointer of the list*/
- opj_bool stateless; /**< if this is a stateless message queue*/
+ OPJ_BOOL stateless; /**< if this is a stateless message queue*/
cachemodel_param_t *cachemodel; /**< reference cachemodel pointer*/
} msgqueue_param_t;
* @param[in] cachemodel cachemodel pointer
* @return generated message queue pointer
*/
-msgqueue_param_t * gene_msgqueue( opj_bool stateless, cachemodel_param_t *cachemodel);
+msgqueue_param_t * gene_msgqueue( OPJ_BOOL stateless, cachemodel_param_t *cachemodel);
/**
* delete message queue
return qr;
}
-opj_bool process_JPIPrequest( server_record_t *rec, QR_t *qr)
+OPJ_BOOL process_JPIPrequest( server_record_t *rec, QR_t *qr)
{
target_param_t *target = NULL;
session_param_t *cursession = NULL;
}
-void local_log( opj_bool query, opj_bool messages, opj_bool sessions, opj_bool targets, QR_t *qr, server_record_t *rec)
+void local_log( OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions, OPJ_BOOL targets, QR_t *qr, server_record_t *rec)
{
if( query)
print_queryparam( *qr->query);
return client;
}
-opj_bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec)
+OPJ_BOOL OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec)
{
- opj_bool quit = OPJ_FALSE;
+ OPJ_BOOL quit = OPJ_FALSE;
msgtype_t msgtype = identify_clientmsg( client);
switch( msgtype){
}
-jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( opj_bool jp2)
+jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( OPJ_BOOL jp2)
{
jpip_dec_param_t *dec;
}
-opj_bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec)
+OPJ_BOOL OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec)
{
int infd;
dec->jp2kstream = recons_j2k( dec->msgqueue, dec->jpipstream, dec->msgqueue->first->csn, 0, 0, &dec->jp2klen);
}
-opj_bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
+OPJ_BOOL OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec)
{
int outfd;
return OPJ_TRUE;
}
-void OPJ_CALLCONV output_log( opj_bool messages, opj_bool metadata, opj_bool ihdrbox, jpip_dec_param_t *dec)
+void OPJ_CALLCONV output_log( OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec)
{
if( messages)
print_msgqueue( dec->msgqueue);
* @param[in] qr query/response data pointer
* @return true if succeed, otherwise false
*/
-opj_bool process_JPIPrequest( server_record_t *rec, QR_t *qr);
+OPJ_BOOL process_JPIPrequest( server_record_t *rec, QR_t *qr);
/**
* 3rd process; send response data JPT/JPP-stream
* @param[in] qr query/response data pointer
* @param[in] rec server static record pinter
*/
-void local_log( opj_bool query, opj_bool messages, opj_bool sessions, opj_bool targets, QR_t *qr, server_record_t *rec);
+void local_log( OPJ_BOOL query, OPJ_BOOL messages, OPJ_BOOL sessions, OPJ_BOOL targets, QR_t *qr, server_record_t *rec);
#endif /*SERVER*/
* @param[in] rec decoding server static record pointer
* @return true if succeed
*/
-OPJ_API opj_bool OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec);
+OPJ_API OPJ_BOOL OPJ_CALLCONV handle_clientreq( client_t client, dec_server_record_t *rec);
#endif /*SERVER*/
* @param[in] jp2 true in case of jp2 file encoding, else j2k file encoding
* @return JPIP decoding parameters pointer
*/
-OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( opj_bool jp2);
+OPJ_API jpip_dec_param_t * OPJ_CALLCONV init_jpipdecoder( OPJ_BOOL jp2);
/**
* Destroy jpip decoding parameters
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-OPJ_API opj_bool OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec);
+OPJ_API OPJ_BOOL OPJ_CALLCONV fread_jpip( const char fname[], jpip_dec_param_t *dec);
/**
* Decode jpip codestream
* @param[in] dec JPIP decoding parameters pointer
* @return true if succeed
*/
-OPJ_API opj_bool OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
+OPJ_API OPJ_BOOL OPJ_CALLCONV fwrite_jp2k( const char fname[], jpip_dec_param_t *dec);
/**
* Option; print out parameter values to stderr
* @param[in] ihdrbox true if image header data is to be printed out
* @param[in] dec JPIP decoding parameters pointer
*/
-OPJ_API void OPJ_CALLCONV output_log( opj_bool messages, opj_bool metadata, opj_bool ihdrbox, jpip_dec_param_t *dec);
+OPJ_API void OPJ_CALLCONV output_log( OPJ_BOOL messages, OPJ_BOOL metadata, OPJ_BOOL ihdrbox, jpip_dec_param_t *dec);
/*
* test the format of index (cidx) box in JP2 file
}
query_param->lastcomp = stop > aux ? stop : aux;
- query_param->comps = (opj_bool *)opj_calloc( 1, (OPJ_SIZE_T)(query_param->lastcomp+1)*sizeof(opj_bool));
+ query_param->comps = (OPJ_BOOL *)opj_calloc( 1, (OPJ_SIZE_T)(query_param->lastcomp+1)*sizeof(OPJ_BOOL));
for( i=start; i<=stop; i++)
query_param->comps[i]=OPJ_TRUE;
int rx, ry, rw, rh; /**< roi region */
int layers; /**< quality layers */
int lastcomp; /**< last component number */
- opj_bool *comps; /**< components (dynamic array) for jpp-stream, null means all components */
+ OPJ_BOOL *comps; /**< components (dynamic array) for jpp-stream, null means all components */
char *cid; /**< channel identifier */
cnew_transport_t cnew; /**< transport name if there is new channel request, else non */
char *cclose; /**< list of closing channel identifiers, separated by '\\0' */
int numOfcclose; /**< number of closing channels */
char box_type[MAX_NUMOFBOX][4]; /**< interested box-types */
int limit[MAX_NUMOFBOX]; /**< limit value, -1: skeleton request "r", 0: entire contents */
- opj_bool w[MAX_NUMOFBOX]; /**< Metadata request qualifier flags */
- opj_bool s[MAX_NUMOFBOX];
- opj_bool g[MAX_NUMOFBOX];
- opj_bool a[MAX_NUMOFBOX];
- opj_bool priority[MAX_NUMOFBOX]; /**< priority flag */
+ OPJ_BOOL w[MAX_NUMOFBOX]; /**< Metadata request qualifier flags */
+ OPJ_BOOL s[MAX_NUMOFBOX];
+ OPJ_BOOL g[MAX_NUMOFBOX];
+ OPJ_BOOL a[MAX_NUMOFBOX];
+ OPJ_BOOL priority[MAX_NUMOFBOX]; /**< priority flag */
int root_bin; /**< root-bin */
int max_depth; /**< max-depth */
- opj_bool metadata_only; /**< metadata-only request */
+ OPJ_BOOL metadata_only; /**< metadata-only request */
image_return_t return_type; /**< image return type */
int len; /**< maximum response length */
} query_param_t;
return session;
}
-opj_bool search_session_and_channel( char cid[],
+OPJ_BOOL search_session_and_channel( char cid[],
sessionlist_param_t *sessionlist,
session_param_t **foundsession,
channel_param_t **foundchannel)
session->cachemodellist->last = cachemodel;
}
-opj_bool delete_session( session_param_t **session, sessionlist_param_t *sessionlist)
+OPJ_BOOL delete_session( session_param_t **session, sessionlist_param_t *sessionlist)
{
session_param_t *ptr;
* @param[in,out] foundchannel address of the found channel pointer
* @return if the channel is found (true) or not (false)
*/
-opj_bool search_session_and_channel( char cid[],
+OPJ_BOOL search_session_and_channel( char cid[],
sessionlist_param_t *sessionlist,
session_param_t **foundsession,
channel_param_t **foundchannel);
* @param[in] sessionlist session list pointer
* @return if succeeded (true) or failed (false)
*/
-opj_bool delete_session( session_param_t **session, sessionlist_param_t *sessionlist);
+OPJ_BOOL delete_session( session_param_t **session, sessionlist_param_t *sessionlist);
/**
int csn; /**< codestream number */
index_param_t *codeidx; /**< index information of codestream */
int num_of_use; /**< numbers of sessions refering to this target */
- opj_bool jppstream; /**< if this target can return JPP-stream */
- opj_bool jptstream; /**< if this target can return JPP-stream */
+ OPJ_BOOL jppstream; /**< if this target can return JPP-stream */
+ OPJ_BOOL jptstream; /**< if this target can return JPP-stream */
struct target_param *next; /**< pointer to the next target */
} target_param_t;