[trunk] rename public symbols with OPJ_ prefix (enum part)
This commit is contained in:
parent
84c93c2fea
commit
21b0ccf859
|
@ -1141,11 +1141,11 @@ typedef struct j2k_prog_order{
|
|||
}j2k_prog_order_t;
|
||||
|
||||
j2k_prog_order_t j2k_prog_order_list[] = {
|
||||
{CPRL, "CPRL"},
|
||||
{LRCP, "LRCP"},
|
||||
{PCRL, "PCRL"},
|
||||
{RLCP, "RLCP"},
|
||||
{RPCL, "RPCL"},
|
||||
{OPJ_CPRL, "CPRL"},
|
||||
{OPJ_LRCP, "LRCP"},
|
||||
{OPJ_PCRL, "PCRL"},
|
||||
{OPJ_RLCP, "RLCP"},
|
||||
{OPJ_RPCL, "RPCL"},
|
||||
{(OPJ_PROG_ORDER)-1, ""}
|
||||
};
|
||||
|
||||
|
@ -9350,7 +9350,7 @@ void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k)
|
|||
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_image_components );
|
||||
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_tlm );
|
||||
|
||||
if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema == CINEMA4K_24) {
|
||||
if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema == OPJ_CINEMA4K_24) {
|
||||
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_poc );
|
||||
}
|
||||
}
|
||||
|
@ -9362,7 +9362,7 @@ void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k)
|
|||
}
|
||||
|
||||
/* DEVELOPER CORNER, insert your custom procedures */
|
||||
if (p_j2k->m_cp.rsiz & MCT) {
|
||||
if (p_j2k->m_cp.rsiz & OPJ_MCT) {
|
||||
opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_mct_data_group );
|
||||
}
|
||||
/* End of Developer Corner */
|
||||
|
|
|
@ -1138,13 +1138,13 @@ opj_bool opj_jp2_decode(opj_jp2_t *jp2,
|
|||
|
||||
/* Set Image Color Space */
|
||||
if (jp2->enumcs == 16)
|
||||
p_image->color_space = CLRSPC_SRGB;
|
||||
p_image->color_space = OPJ_CLRSPC_SRGB;
|
||||
else if (jp2->enumcs == 17)
|
||||
p_image->color_space = CLRSPC_GRAY;
|
||||
p_image->color_space = OPJ_CLRSPC_GRAY;
|
||||
else if (jp2->enumcs == 18)
|
||||
p_image->color_space = CLRSPC_SYCC;
|
||||
p_image->color_space = OPJ_CLRSPC_SYCC;
|
||||
else
|
||||
p_image->color_space = CLRSPC_UNKNOWN;
|
||||
p_image->color_space = OPJ_CLRSPC_UNKNOWN;
|
||||
|
||||
/* Apply the color space if needed */
|
||||
if(jp2->color.jp2_cdef) {
|
||||
|
@ -2317,13 +2317,13 @@ opj_bool opj_jp2_get_tile( opj_jp2_t *p_jp2,
|
|||
|
||||
/* Set Image Color Space */
|
||||
if (p_jp2->enumcs == 16)
|
||||
p_image->color_space = CLRSPC_SRGB;
|
||||
p_image->color_space = OPJ_CLRSPC_SRGB;
|
||||
else if (p_jp2->enumcs == 17)
|
||||
p_image->color_space = CLRSPC_GRAY;
|
||||
p_image->color_space = OPJ_CLRSPC_GRAY;
|
||||
else if (p_jp2->enumcs == 18)
|
||||
p_image->color_space = CLRSPC_SYCC;
|
||||
p_image->color_space = OPJ_CLRSPC_SYCC;
|
||||
else
|
||||
p_image->color_space = CLRSPC_UNKNOWN;
|
||||
p_image->color_space = OPJ_CLRSPC_UNKNOWN;
|
||||
|
||||
/* Apply the color space if needed */
|
||||
if(p_jp2->color.jp2_cdef) {
|
||||
|
|
|
@ -285,7 +285,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
|
|||
l_codec->is_decompressor = 1;
|
||||
|
||||
switch (p_format) {
|
||||
case CODEC_J2K:
|
||||
case OPJ_CODEC_J2K:
|
||||
l_codec->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) j2k_dump;
|
||||
|
||||
l_codec->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) j2k_get_cstr_info;
|
||||
|
@ -360,7 +360,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
|
|||
|
||||
break;
|
||||
|
||||
case CODEC_JP2:
|
||||
case OPJ_CODEC_JP2:
|
||||
/* get a JP2 decoder handle */
|
||||
l_codec->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) jp2_dump;
|
||||
|
||||
|
@ -435,8 +435,8 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
|
|||
}
|
||||
|
||||
break;
|
||||
case CODEC_UNKNOWN:
|
||||
case CODEC_JPT:
|
||||
case OPJ_CODEC_UNKNOWN:
|
||||
case OPJ_CODEC_JPT:
|
||||
default:
|
||||
opj_free(l_codec);
|
||||
return 00;
|
||||
|
@ -663,7 +663,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
|
|||
l_codec->is_decompressor = 0;
|
||||
|
||||
switch(p_format) {
|
||||
case CODEC_J2K:
|
||||
case OPJ_CODEC_J2K:
|
||||
l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *,
|
||||
struct opj_stream_private *,
|
||||
struct opj_event_mgr * )) opj_j2k_encode_v2;
|
||||
|
@ -699,7 +699,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
|
|||
|
||||
break;
|
||||
|
||||
case CODEC_JP2:
|
||||
case OPJ_CODEC_JP2:
|
||||
/* get a JP2 decoder handle */
|
||||
l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *,
|
||||
struct opj_stream_private *,
|
||||
|
@ -736,8 +736,8 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
|
|||
|
||||
break;
|
||||
|
||||
case CODEC_UNKNOWN:
|
||||
case CODEC_JPT:
|
||||
case OPJ_CODEC_UNKNOWN:
|
||||
case OPJ_CODEC_JPT:
|
||||
default:
|
||||
opj_free(l_codec);
|
||||
return 00;
|
||||
|
@ -751,13 +751,13 @@ void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *paramete
|
|||
if(parameters) {
|
||||
memset(parameters, 0, sizeof(opj_cparameters_t));
|
||||
/* default coding parameters */
|
||||
parameters->cp_cinema = OFF;
|
||||
parameters->cp_cinema = OPJ_OFF;
|
||||
parameters->max_comp_size = 0;
|
||||
parameters->numresolution = 6;
|
||||
parameters->cp_rsiz = STD_RSIZ;
|
||||
parameters->cp_rsiz = OPJ_STD_RSIZ;
|
||||
parameters->cblockw_init = 64;
|
||||
parameters->cblockh_init = 64;
|
||||
parameters->prog_order = LRCP;
|
||||
parameters->prog_order = OPJ_LRCP;
|
||||
parameters->roi_compno = -1; /* no ROI */
|
||||
parameters->subsampling_dx = 1;
|
||||
parameters->subsampling_dy = 1;
|
||||
|
@ -906,7 +906,7 @@ opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
|
|||
OPJ_UINT32 l_mct_total_size = l_matrix_size + l_dc_shift_size;
|
||||
|
||||
/* add MCT capability */
|
||||
int rsiz = (int)parameters->cp_rsiz | (int)MCT;
|
||||
int rsiz = (int)parameters->cp_rsiz | (int)OPJ_MCT;
|
||||
parameters->cp_rsiz = (OPJ_RSIZ_CAPABILITIES)rsiz;
|
||||
parameters->irreversible = 1;
|
||||
|
||||
|
|
|
@ -154,53 +154,53 @@ typedef uint64_t OPJ_UINT64;
|
|||
* Rsiz Capabilities
|
||||
* */
|
||||
typedef enum RSIZ_CAPABILITIES {
|
||||
STD_RSIZ = 0, /** Standard JPEG2000 profile*/
|
||||
CINEMA2K = 3, /** Profile name for a 2K image*/
|
||||
CINEMA4K = 4, /** Profile name for a 4K image*/
|
||||
MCT = 0x8100
|
||||
OPJ_STD_RSIZ = 0, /** Standard JPEG2000 profile*/
|
||||
OPJ_CINEMA2K = 3, /** Profile name for a 2K image*/
|
||||
OPJ_CINEMA4K = 4, /** Profile name for a 4K image*/
|
||||
OPJ_MCT = 0x8100
|
||||
} OPJ_RSIZ_CAPABILITIES;
|
||||
|
||||
/**
|
||||
* Digital cinema operation mode
|
||||
* */
|
||||
typedef enum CINEMA_MODE {
|
||||
OFF = 0, /** Not Digital Cinema*/
|
||||
CINEMA2K_24 = 1, /** 2K Digital Cinema at 24 fps*/
|
||||
CINEMA2K_48 = 2, /** 2K Digital Cinema at 48 fps*/
|
||||
CINEMA4K_24 = 3 /** 4K Digital Cinema at 24 fps*/
|
||||
OPJ_OFF = 0, /** Not Digital Cinema*/
|
||||
OPJ_CINEMA2K_24 = 1, /** 2K Digital Cinema at 24 fps*/
|
||||
OPJ_CINEMA2K_48 = 2, /** 2K Digital Cinema at 48 fps*/
|
||||
OPJ_CINEMA4K_24 = 3 /** 4K Digital Cinema at 24 fps*/
|
||||
}OPJ_CINEMA_MODE;
|
||||
|
||||
/**
|
||||
* Progression order
|
||||
* */
|
||||
typedef enum PROG_ORDER {
|
||||
PROG_UNKNOWN = -1, /**< place-holder */
|
||||
LRCP = 0, /**< layer-resolution-component-precinct order */
|
||||
RLCP = 1, /**< resolution-layer-component-precinct order */
|
||||
RPCL = 2, /**< resolution-precinct-component-layer order */
|
||||
PCRL = 3, /**< precinct-component-resolution-layer order */
|
||||
CPRL = 4 /**< component-precinct-resolution-layer order */
|
||||
OPJ_PROG_UNKNOWN = -1, /**< place-holder */
|
||||
OPJ_LRCP = 0, /**< layer-resolution-component-precinct order */
|
||||
OPJ_RLCP = 1, /**< resolution-layer-component-precinct order */
|
||||
OPJ_RPCL = 2, /**< resolution-precinct-component-layer order */
|
||||
OPJ_PCRL = 3, /**< precinct-component-resolution-layer order */
|
||||
OPJ_CPRL = 4 /**< component-precinct-resolution-layer order */
|
||||
} OPJ_PROG_ORDER;
|
||||
|
||||
/**
|
||||
* Supported image color spaces
|
||||
*/
|
||||
typedef enum COLOR_SPACE {
|
||||
CLRSPC_UNKNOWN = -1, /**< not supported by the library */
|
||||
CLRSPC_UNSPECIFIED = 0, /**< not specified in the codestream */
|
||||
CLRSPC_SRGB = 1, /**< sRGB */
|
||||
CLRSPC_GRAY = 2, /**< grayscale */
|
||||
CLRSPC_SYCC = 3 /**< YUV */
|
||||
OPJ_CLRSPC_UNKNOWN = -1, /**< not supported by the library */
|
||||
OPJ_CLRSPC_UNSPECIFIED = 0, /**< not specified in the codestream */
|
||||
OPJ_CLRSPC_SRGB = 1, /**< sRGB */
|
||||
OPJ_CLRSPC_GRAY = 2, /**< grayscale */
|
||||
OPJ_CLRSPC_SYCC = 3 /**< YUV */
|
||||
} OPJ_COLOR_SPACE;
|
||||
|
||||
/**
|
||||
* Supported codec
|
||||
*/
|
||||
typedef enum CODEC_FORMAT {
|
||||
CODEC_UNKNOWN = -1, /**< place-holder */
|
||||
CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */
|
||||
CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */
|
||||
CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */
|
||||
OPJ_CODEC_UNKNOWN = -1, /**< place-holder */
|
||||
OPJ_CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */
|
||||
OPJ_CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */
|
||||
OPJ_CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */
|
||||
} OPJ_CODEC_FORMAT;
|
||||
|
||||
/**
|
||||
|
@ -287,7 +287,7 @@ typedef struct opj_cparameters {
|
|||
char *cp_comment;
|
||||
/** csty : coding style */
|
||||
int csty;
|
||||
/** progression order (default LRCP) */
|
||||
/** progression order (default OPJ_LRCP) */
|
||||
OPJ_PROG_ORDER prog_order;
|
||||
/** progression order changes */
|
||||
opj_poc_t POC[32];
|
||||
|
|
|
@ -1102,7 +1102,7 @@ opj_bool opj_pi_check_next_level( OPJ_INT32 pos,
|
|||
break;
|
||||
case 'P':
|
||||
switch(tcp->prg){
|
||||
case LRCP||RLCP:
|
||||
case OPJ_LRCP||OPJ_RLCP:
|
||||
if(tcp->prc_t == tcp->prcE){
|
||||
if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){
|
||||
return OPJ_TRUE;
|
||||
|
@ -1578,8 +1578,8 @@ void opj_pi_create_encode( opj_pi_iterator_t *pi,
|
|||
break;
|
||||
case 'P':
|
||||
switch(tcp->prg){
|
||||
case LRCP:
|
||||
case RLCP:
|
||||
case OPJ_LRCP:
|
||||
case OPJ_RLCP:
|
||||
pi[pino].poc.precno0 = tcp->prcS;
|
||||
pi[pino].poc.precno1 = tcp->prcE;
|
||||
break;
|
||||
|
@ -1617,8 +1617,8 @@ void opj_pi_create_encode( opj_pi_iterator_t *pi,
|
|||
break;
|
||||
case 'P':
|
||||
switch(tcp->prg){
|
||||
case LRCP:
|
||||
case RLCP:
|
||||
case OPJ_LRCP:
|
||||
case OPJ_RLCP:
|
||||
tcp->prc_t = tcp->prcS;
|
||||
pi[pino].poc.precno0 = tcp->prc_t;
|
||||
pi[pino].poc.precno1 = tcp->prc_t+1;
|
||||
|
@ -1656,8 +1656,8 @@ void opj_pi_create_encode( opj_pi_iterator_t *pi,
|
|||
break;
|
||||
case 'P':
|
||||
switch(tcp->prg){
|
||||
case LRCP:
|
||||
case RLCP:
|
||||
case OPJ_LRCP:
|
||||
case OPJ_RLCP:
|
||||
pi[pino].poc.precno0 = tcp->prc_t-1;
|
||||
pi[pino].poc.precno1 = tcp->prc_t;
|
||||
break;
|
||||
|
@ -1728,8 +1728,8 @@ void opj_pi_create_encode( opj_pi_iterator_t *pi,
|
|||
break;
|
||||
case 'P':
|
||||
switch(tcp->prg){
|
||||
case LRCP:
|
||||
case RLCP:
|
||||
case OPJ_LRCP:
|
||||
case OPJ_RLCP:
|
||||
if(tcp->prc_t == tcp->prcE){
|
||||
if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){
|
||||
tcp->prc_t = tcp->prcS;
|
||||
|
@ -1852,17 +1852,17 @@ void opj_pi_update_encoding_parameters( const opj_image_t *p_image,
|
|||
|
||||
opj_bool opj_pi_next(opj_pi_iterator_t * pi) {
|
||||
switch (pi->poc.prg) {
|
||||
case LRCP:
|
||||
case OPJ_LRCP:
|
||||
return opj_pi_next_lrcp(pi);
|
||||
case RLCP:
|
||||
case OPJ_RLCP:
|
||||
return opj_pi_next_rlcp(pi);
|
||||
case RPCL:
|
||||
case OPJ_RPCL:
|
||||
return opj_pi_next_rpcl(pi);
|
||||
case PCRL:
|
||||
case OPJ_PCRL:
|
||||
return opj_pi_next_pcrl(pi);
|
||||
case CPRL:
|
||||
case OPJ_CPRL:
|
||||
return opj_pi_next_cprl(pi);
|
||||
case PROG_UNKNOWN:
|
||||
case OPJ_PROG_UNKNOWN:
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ opj_bool opj_t2_encode_packets( opj_t2_t* p_t2,
|
|||
opj_image_t *l_image = p_t2->image;
|
||||
opj_cp_t *l_cp = p_t2->cp;
|
||||
opj_tcp_t *l_tcp = &l_cp->tcps[p_tile_no];
|
||||
OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == CINEMA4K_24? 2: 1;
|
||||
OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == OPJ_CINEMA4K_24? 2: 1;
|
||||
OPJ_UINT32 l_max_comp = l_cp->m_specific_param.m_enc.m_max_comp_size > 0 ? l_image->numcomps : 1;
|
||||
OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue