[trunk] remove left-over from ->jpip_on implementation. JPIP is now completely removed from openjp2 and openmj2. Document jpip_iptr_offset variable

This commit is contained in:
Mathieu Malaterre 2012-10-15 07:38:10 +00:00
parent fe3c1f9061
commit 75b7104724
12 changed files with 168 additions and 216 deletions

View File

@ -597,7 +597,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
};
/* parse the command line */
const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:J"
const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:"
#ifdef USE_JPWL
"W:"
#endif /* USE_JPWL */
@ -1449,10 +1449,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
/* <<UniPG */
/* ------------------------------------------------------ */
case 'J': /* jpip on */
{
parameters->jpip_on = OPJ_TRUE;
}
break;
/* ------------------------------------------------------ */

View File

@ -599,7 +599,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
};
/* parse the command line */
const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:J"
const char optlist[] = "i:o:r:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:"
#ifdef USE_JPWL
"W:"
#endif /* USE_JPWL */
@ -1451,10 +1451,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
/* <<UniPG */
/* ------------------------------------------------------ */
case 'J': /* jpip on */
{
parameters->jpip_on = OPJ_TRUE;
}
break;
/* ------------------------------------------------------ */

View File

@ -1415,8 +1415,6 @@ void opj_jp2_setup_encoder( opj_jp2_v2_t *jp2,
}
jp2->precedence = 0; /* PRECEDENCE */
jp2->approx = 0; /* APPROX */
/* jp2->jpip_on = parameters->jpip_on; */
}
opj_bool opj_jp2_encode(opj_jp2_v2_t *jp2,

View File

@ -37,7 +37,7 @@
/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */
/*@{*/
#define JPIP_JPIP 0x6a706970
/*#define JPIP_JPIP 0x6a706970*/
#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */
#define JP2_FTYP 0x66747970 /**< File type box */
@ -169,7 +169,6 @@ typedef struct opj_jp2 {
opj_jp2_comps_t *comps;
unsigned int j2k_codestream_offset;
unsigned int j2k_codestream_length;
opj_bool jpip_on;
opj_bool ignore_pclr_cmap_cdef;
} opj_jp2_t;
@ -204,6 +203,11 @@ typedef struct opj_jp2_v2
OPJ_UINT32 numcl;
OPJ_UINT32 *cl;
opj_jp2_comps_t *comps;
/* FIXME: The following two variables are used to save offset
as we write out a JP2 file to disk. This mecanism is not flexible
as codec writers will need to extand those fields as new part
of the standard are implemented.
*/
OPJ_OFF_T j2k_codestream_offset;
OPJ_OFF_T jpip_iptr_offset;
OPJ_UINT32 jp2_state;

View File

@ -769,7 +769,6 @@ void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *paramete
parameters->cp_disto_alloc = 0;
parameters->cp_fixed_alloc = 0;
parameters->cp_fixed_quality = 0;
parameters->jpip_on = OPJ_FALSE;
/* UniPG>> */
#ifdef USE_JPWL
parameters->jpwl_epc_on = OPJ_FALSE;

View File

@ -415,8 +415,6 @@ typedef struct opj_cparameters {
char tp_flag;
/** MCT (multiple component transform) */
char tcp_mct;
/** Enable JPIP indexing*/
opj_bool jpip_on;
/** Naive implementation of MCT restricted to a single reversible array based encoding without offset concerning all the components. */
void * mct_data;

View File

@ -313,7 +313,7 @@ static int j2k_get_num_tp(opj_cp_t *cp,int pino,int tileno){
}
/** mem allocation for TLM marker*/
int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){
static int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){
int pino,tileno,totnum_tp=0;
OPJ_ARG_NOT_USED(img_numcomp);

View File

@ -1100,8 +1100,6 @@ void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_
jp2->enumcs = 18; /* YUV */
jp2->precedence = 0; /* PRECEDENCE */
jp2->approx = 0; /* APPROX */
jp2->jpip_on = parameters->jpip_on;
}
opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) {
@ -1118,38 +1116,11 @@ opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_
/* JP2 Header box */
jp2_write_jp2h(jp2, cio);
#if 0
if( jp2->jpip_on){
pos_iptr = cio_tell( cio);
cio_skip( cio, 24); /* IPTR further ! */
pos_jp2c = cio_tell( cio);
}
#endif
/* J2K encoding */
if(!(len_jp2c = jp2_write_jp2c( jp2, cio, image, cstr_info))){
opj_event_msg(jp2->cinfo, EVT_ERROR, "Failed to encode image\n");
return OPJ_FALSE;
}
#if 0
if( jp2->jpip_on){
pos_cidx = cio_tell( cio);
len_cidx = write_cidx( pos_jp2c+8, cio, image, *cstr_info, len_jp2c-8);
pos_fidx = cio_tell( cio);
len_fidx = write_fidx( pos_jp2c, len_jp2c, pos_cidx, len_cidx, cio);
end_pos = cio_tell( cio);
cio_seek( cio, pos_iptr);
write_iptr( pos_fidx, len_fidx, cio);
cio_seek( cio, end_pos);
}
#endif
return OPJ_TRUE;
}

View File

@ -37,8 +37,6 @@
/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */
/*@{*/
#define JPIP_JPIP 0x6a706970
#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */
#define JP2_FTYP 0x66747970 /**< File type box */
#define JP2_JP2H 0x6a703268 /**< JP2 header box */
@ -140,7 +138,6 @@ typedef struct opj_jp2 {
opj_jp2_comps_t *comps;
unsigned int j2k_codestream_offset;
unsigned int j2k_codestream_length;
opj_bool jpip_on;
opj_bool ignore_pclr_cmap_cdef;
} opj_jp2_t;

View File

@ -249,7 +249,6 @@ void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *paramete
parameters->cp_disto_alloc = 0;
parameters->cp_fixed_alloc = 0;
parameters->cp_fixed_quality = 0;
parameters->jpip_on = OPJ_FALSE;
/* UniPG>> */
#ifdef USE_JPWL
parameters->jpwl_epc_on = OPJ_FALSE;

View File

@ -351,8 +351,6 @@ typedef struct opj_cparameters {
char tp_flag;
/** MCT (multiple component transform) */
char tcp_mct;
/** Enable JPIP indexing*/
opj_bool jpip_on;
} opj_cparameters_t;
#define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001

View File

@ -512,7 +512,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
/* parse the command line */
/* UniPG>> */
const char optlist[] = "i:o:hr:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:J"
const char optlist[] = "i:o:hr:q:n:b:c:t:p:s:SEM:x:R:d:T:If:P:C:F:u:"
#ifdef USE_JPWL
"W:"
#endif /* USE_JPWL */
@ -1246,10 +1246,6 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
/* <<UniPG */
/* ------------------------------------------------------ */
case 'J': /* jpip on */
{
parameters->jpip_on = OPJ_TRUE;
}
break;
/* ------------------------------------------------------ */