defined new type "opj_bool", and new constants OPJ_FALSE and OPJ_TRUE, to avoid having to deal with "stdbool.h" (patch from Winfried)
This commit is contained in:
@@ -43,31 +43,31 @@ Get next packet in layer-resolution-component-precinct order.
|
||||
@param pi packet iterator to modify
|
||||
@return returns false if pi pointed to the last packet or else returns true
|
||||
*/
|
||||
static bool pi_next_lrcp(opj_pi_iterator_t * pi);
|
||||
static opj_bool pi_next_lrcp(opj_pi_iterator_t * pi);
|
||||
/**
|
||||
Get next packet in resolution-layer-component-precinct order.
|
||||
@param pi packet iterator to modify
|
||||
@return returns false if pi pointed to the last packet or else returns true
|
||||
*/
|
||||
static bool pi_next_rlcp(opj_pi_iterator_t * pi);
|
||||
static opj_bool pi_next_rlcp(opj_pi_iterator_t * pi);
|
||||
/**
|
||||
Get next packet in resolution-precinct-component-layer order.
|
||||
@param pi packet iterator to modify
|
||||
@return returns false if pi pointed to the last packet or else returns true
|
||||
*/
|
||||
static bool pi_next_rpcl(opj_pi_iterator_t * pi);
|
||||
static opj_bool pi_next_rpcl(opj_pi_iterator_t * pi);
|
||||
/**
|
||||
Get next packet in precinct-component-resolution-layer order.
|
||||
@param pi packet iterator to modify
|
||||
@return returns false if pi pointed to the last packet or else returns true
|
||||
*/
|
||||
static bool pi_next_pcrl(opj_pi_iterator_t * pi);
|
||||
static opj_bool pi_next_pcrl(opj_pi_iterator_t * pi);
|
||||
/**
|
||||
Get next packet in component-precinct-resolution-layer order.
|
||||
@param pi packet iterator to modify
|
||||
@return returns false if pi pointed to the last packet or else returns true
|
||||
*/
|
||||
static bool pi_next_cprl(opj_pi_iterator_t * pi);
|
||||
static opj_bool pi_next_cprl(opj_pi_iterator_t * pi);
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -79,7 +79,7 @@ static bool pi_next_cprl(opj_pi_iterator_t * pi);
|
||||
==========================================================
|
||||
*/
|
||||
|
||||
static bool pi_next_lrcp(opj_pi_iterator_t * pi) {
|
||||
static opj_bool pi_next_lrcp(opj_pi_iterator_t * pi) {
|
||||
opj_pi_comp_t *comp = NULL;
|
||||
opj_pi_resolution_t *res = NULL;
|
||||
long index = 0;
|
||||
@@ -108,7 +108,7 @@ static bool pi_next_lrcp(opj_pi_iterator_t * pi) {
|
||||
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
|
||||
if (!pi->include[index]) {
|
||||
pi->include[index] = 1;
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
LABEL_SKIP:;
|
||||
}
|
||||
@@ -116,10 +116,10 @@ LABEL_SKIP:;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
static bool pi_next_rlcp(opj_pi_iterator_t * pi) {
|
||||
static opj_bool pi_next_rlcp(opj_pi_iterator_t * pi) {
|
||||
opj_pi_comp_t *comp = NULL;
|
||||
opj_pi_resolution_t *res = NULL;
|
||||
long index = 0;
|
||||
@@ -147,7 +147,7 @@ static bool pi_next_rlcp(opj_pi_iterator_t * pi) {
|
||||
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
|
||||
if (!pi->include[index]) {
|
||||
pi->include[index] = 1;
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
LABEL_SKIP:;
|
||||
}
|
||||
@@ -155,10 +155,10 @@ LABEL_SKIP:;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
static bool pi_next_rpcl(opj_pi_iterator_t * pi) {
|
||||
static opj_bool pi_next_rpcl(opj_pi_iterator_t * pi) {
|
||||
opj_pi_comp_t *comp = NULL;
|
||||
opj_pi_resolution_t *res = NULL;
|
||||
long index = 0;
|
||||
@@ -229,7 +229,7 @@ if (!pi->tp_on){
|
||||
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
|
||||
if (!pi->include[index]) {
|
||||
pi->include[index] = 1;
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
LABEL_SKIP:;
|
||||
}
|
||||
@@ -238,10 +238,10 @@ LABEL_SKIP:;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
static bool pi_next_pcrl(opj_pi_iterator_t * pi) {
|
||||
static opj_bool pi_next_pcrl(opj_pi_iterator_t * pi) {
|
||||
opj_pi_comp_t *comp = NULL;
|
||||
opj_pi_resolution_t *res = NULL;
|
||||
long index = 0;
|
||||
@@ -310,7 +310,7 @@ static bool pi_next_pcrl(opj_pi_iterator_t * pi) {
|
||||
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
|
||||
if (!pi->include[index]) {
|
||||
pi->include[index] = 1;
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
LABEL_SKIP:;
|
||||
}
|
||||
@@ -319,10 +319,10 @@ LABEL_SKIP:;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
static bool pi_next_cprl(opj_pi_iterator_t * pi) {
|
||||
static opj_bool pi_next_cprl(opj_pi_iterator_t * pi) {
|
||||
opj_pi_comp_t *comp = NULL;
|
||||
opj_pi_resolution_t *res = NULL;
|
||||
long index = 0;
|
||||
@@ -389,7 +389,7 @@ static bool pi_next_cprl(opj_pi_iterator_t * pi) {
|
||||
index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p;
|
||||
if (!pi->include[index]) {
|
||||
pi->include[index] = 1;
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
LABEL_SKIP:;
|
||||
}
|
||||
@@ -398,7 +398,7 @@ LABEL_SKIP:;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -707,7 +707,7 @@ void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno) {
|
||||
}
|
||||
}
|
||||
|
||||
bool pi_next(opj_pi_iterator_t * pi) {
|
||||
opj_bool pi_next(opj_pi_iterator_t * pi) {
|
||||
switch (pi->poc.prg) {
|
||||
case LRCP:
|
||||
return pi_next_lrcp(pi);
|
||||
@@ -720,13 +720,13 @@ bool pi_next(opj_pi_iterator_t * pi) {
|
||||
case CPRL:
|
||||
return pi_next_cprl(pi);
|
||||
case PROG_UNKNOWN:
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){
|
||||
opj_bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){
|
||||
char prog[4];
|
||||
int i;
|
||||
int incr_top=1,resetX=0;
|
||||
@@ -748,7 +748,7 @@ bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,
|
||||
case RPCL: strncpy(prog, "RPCL",4);
|
||||
break;
|
||||
case PROG_UNKNOWN:
|
||||
return true;
|
||||
return OPJ_TRUE;
|
||||
}
|
||||
|
||||
if(!(cp->tp_on && ((!cp->cinema && (t2_mode == FINAL_PASS)) || cp->cinema))){
|
||||
@@ -958,6 +958,6 @@ bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user