jp2_pclr->channel_size = channel_size;
jp2_pclr->entries = entries;
jp2_pclr->nr_entries = nr_entries;
- jp2_pclr->nr_channels = nr_channels;
+ jp2_pclr->nr_channels = (OPJ_BYTE) l_value;
jp2_pclr->cmap = NULL;
jp2->color.jp2_pclr = jp2_pclr;
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager )
{
- unsigned int j2k_codestream_exit;
- unsigned char l_data_header [8];
+ OPJ_OFF_T j2k_codestream_exit;
+ OPJ_BYTE l_data_header [8];
// preconditions
assert(jp2 != 00);
assert(opj_stream_has_seek(cio));
j2k_codestream_exit = opj_stream_tell(cio);
- opj_write_bytes(l_data_header,j2k_codestream_exit - jp2->j2k_codestream_offset,4); /* size of codestream */
+ opj_write_bytes(l_data_header,
+ (OPJ_UINT32) (j2k_codestream_exit - jp2->j2k_codestream_offset),
+ 4); /* size of codestream */
opj_write_bytes(l_data_header + 4,JP2_JP2C,4); /* JP2C */
if (! opj_stream_seek(cio,jp2->j2k_codestream_offset,p_manager)) {
void jp2_setup_encoder( opj_jp2_v2_t *jp2,
opj_cparameters_t *parameters,
opj_image_t *image,
- opj_event_mgr_t * p_manager) {
- int i;
+ opj_event_mgr_t * p_manager)
+{
+ OPJ_UINT32 i;
int depth_0, sign;
if(!jp2 || !parameters || !image)
*/
typedef struct opj_jp2_cdef_info
{
- unsigned short cn, typ, asoc;
+ OPJ_UINT16 cn, typ, asoc;
} opj_jp2_cdef_info_t;
/**
typedef struct opj_jp2_cdef
{
opj_jp2_cdef_info_t *info;
- unsigned short n;
+ OPJ_UINT16 n;
} opj_jp2_cdef_t;
/**
*/
typedef struct opj_jp2_cmap_comp
{
- unsigned short cmp;
- unsigned char mtyp, pcol;
+ OPJ_UINT16 cmp;
+ OPJ_BYTE mtyp, pcol;
} opj_jp2_cmap_comp_t;
/**
*/
typedef struct opj_jp2_pclr
{
- unsigned int *entries;
- unsigned char *channel_sign;
- unsigned char *channel_size;
+ OPJ_INT32 *entries;
+ OPJ_BYTE *channel_sign;
+ OPJ_BYTE *channel_size;
opj_jp2_cmap_comp_t *cmap;
- unsigned short nr_entries, nr_channels;
+ OPJ_UINT16 nr_entries;
+ OPJ_BYTE nr_channels;
} opj_jp2_pclr_t;
/**
*/
typedef struct opj_jp2_color
{
- unsigned char *icc_profile_buf;
- int icc_profile_len;
+ OPJ_BYTE *icc_profile_buf;
+ OPJ_UINT32 icc_profile_len;
opj_jp2_cdef_t *jp2_cdef;
opj_jp2_pclr_t *jp2_pclr;
- unsigned char jp2_has_colr;
+ OPJ_BYTE jp2_has_colr;
} opj_jp2_color_t;
/**
OPJ_UINT32 numcl;
OPJ_UINT32 *cl;
opj_jp2_comps_t *comps;
- OPJ_UINT32 j2k_codestream_offset;
+ OPJ_OFF_T j2k_codestream_offset;
OPJ_UINT32 jp2_state;
OPJ_UINT32 jp2_img_state;