Fixed the generation of index files. Now works with cinema formats.
This commit is contained in:
parent
f428a306a1
commit
3d626da232
|
@ -5,6 +5,10 @@ What's New for OpenJPEG
|
||||||
! : changed
|
! : changed
|
||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
|
June 15, 2007
|
||||||
|
* [FOD] Fixed the generation of index files
|
||||||
|
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
MAY 4, 2007
|
MAY 4, 2007
|
||||||
VERSION 1.2.0 RELEASED
|
VERSION 1.2.0 RELEASED
|
||||||
|
|
|
@ -483,7 +483,9 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image){
|
||||||
parameters->numresolution = 6;
|
parameters->numresolution = 6;
|
||||||
}
|
}
|
||||||
if (!((image->comps[0].w == 2048) | (image->comps[0].h == 1080))){
|
if (!((image->comps[0].w == 2048) | (image->comps[0].h == 1080))){
|
||||||
fprintf(stdout,"Image coordinates %d x %d is not 2K compliant.\nJPEG Digital Cinema Profile-3 (2K profile) compliance requires that at least one of coordinates match 2048 x 1080\n",image->comps[0].w,image->comps[0].h);
|
fprintf(stdout,"Image coordinates %d x %d is not 2K compliant.\nJPEG Digital Cinema Profile-3"
|
||||||
|
"(2K profile) compliance requires that at least one of coordinates match 2048 x 1080\n",
|
||||||
|
image->comps[0].w,image->comps[0].h);
|
||||||
parameters->cp_rsiz = STD_RSIZ;
|
parameters->cp_rsiz = STD_RSIZ;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -495,7 +497,9 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image){
|
||||||
parameters->numresolution = 7;
|
parameters->numresolution = 7;
|
||||||
}
|
}
|
||||||
if (!((image->comps[0].w == 4096) | (image->comps[0].h == 2160))){
|
if (!((image->comps[0].w == 4096) | (image->comps[0].h == 2160))){
|
||||||
fprintf(stdout,"Image coordinates %d x %d is not 4K compliant.\nJPEG Digital Cinema Profile-4 (4K profile) compliance requires that atleast one of coordinates match 4096 x 2160\n",image->comps[0].w,image->comps[0].h);
|
fprintf(stdout,"Image coordinates %d x %d is not 4K compliant.\nJPEG Digital Cinema Profile-4"
|
||||||
|
"(4K profile) compliance requires that at least one of coordinates match 4096 x 2160\n",
|
||||||
|
image->comps[0].w,image->comps[0].h);
|
||||||
parameters->cp_rsiz = STD_RSIZ;
|
parameters->cp_rsiz = STD_RSIZ;
|
||||||
}
|
}
|
||||||
parameters->numpocs = initialise_4K_poc(parameters->POC,parameters->numresolution);
|
parameters->numpocs = initialise_4K_poc(parameters->POC,parameters->numresolution);
|
||||||
|
|
|
@ -1354,11 +1354,16 @@ static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder) {
|
||||||
if (j2k->curtileno == 0) {
|
if (j2k->curtileno == 0) {
|
||||||
j2k->sod_start = cio_tell(cio) + j2k->pos_correction;
|
j2k->sod_start = cio_tell(cio) + j2k->pos_correction;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INDEX >> */
|
/* INDEX >> */
|
||||||
image_info = j2k->image_info;
|
image_info = j2k->image_info;
|
||||||
if (image_info && image_info->index_on) {
|
if (image_info && image_info->index_on) {
|
||||||
image_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1;
|
if (!j2k->cur_tp_num ){
|
||||||
|
image_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1;
|
||||||
|
}else{
|
||||||
|
if(image_info->tile[j2k->curtileno].packet[image_info->num - 1].end_pos < cio_tell(cio))
|
||||||
|
image_info->tile[j2k->curtileno].packet[image_info->num].start_pos = cio_tell(cio);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* << INDEX */
|
/* << INDEX */
|
||||||
|
|
||||||
|
@ -1366,7 +1371,7 @@ static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder) {
|
||||||
for (layno = 0; layno < tcp->numlayers; layno++) {
|
for (layno = 0; layno < tcp->numlayers; layno++) {
|
||||||
tcp->rates[layno] -= tcp->rates[layno] ? (j2k->sod_start / (cp->th * cp->tw)) : 0;
|
tcp->rates[layno] -= tcp->rates[layno] ? (j2k->sod_start / (cp->th * cp->tw)) : 0;
|
||||||
}
|
}
|
||||||
if(image_info) {
|
if(image_info && (j2k->cur_tp_num == 0)) {
|
||||||
image_info->num = 0;
|
image_info->num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2253,15 +2258,11 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
int start_pos, end_pos;
|
int start_pos, end_pos;
|
||||||
double disto = 0;
|
double disto = 0;
|
||||||
pack_nb = 0;
|
pack_nb = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
fprintf(stream, "pkno tileno layerno resno compno precno start_pos end_pos deltaSE \n");
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (image_info->prog == LRCP) { /* LRCP */
|
if (image_info->prog == LRCP) { /* LRCP */
|
||||||
/*
|
|
||||||
fprintf(stream, "pack_nb tileno layno resno compno precno start_pos end_pos disto");
|
fprintf(stream, "pack_nb tileno layno resno compno precno start_pos end_pos disto\n");
|
||||||
*/
|
|
||||||
for (layno = 0; layno < image_info->layer; layno++) {
|
for (layno = 0; layno < image_info->layer; layno++) {
|
||||||
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
||||||
for (compno = 0; compno < image_info->comp; compno++) {
|
for (compno = 0; compno < image_info->comp; compno++) {
|
||||||
|
@ -2280,9 +2281,9 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
}
|
}
|
||||||
} /* LRCP */
|
} /* LRCP */
|
||||||
else if (image_info->prog == RLCP) { /* RLCP */
|
else if (image_info->prog == RLCP) { /* RLCP */
|
||||||
/*
|
|
||||||
fprintf(stream, "pack_nb tileno resno layno compno precno start_pos end_pos disto");
|
fprintf(stream, "pack_nb tileno resno layno compno precno start_pos end_pos disto\n");
|
||||||
*/
|
|
||||||
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
||||||
for (layno = 0; layno < image_info->layer; layno++) {
|
for (layno = 0; layno < image_info->layer; layno++) {
|
||||||
for (compno = 0; compno < image_info->comp; compno++) {
|
for (compno = 0; compno < image_info->comp; compno++) {
|
||||||
|
@ -2301,26 +2302,26 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
}
|
}
|
||||||
} /* RLCP */
|
} /* RLCP */
|
||||||
else if (image_info->prog == RPCL) { /* RPCL */
|
else if (image_info->prog == RPCL) { /* RPCL */
|
||||||
/*
|
|
||||||
fprintf(stream, "\npack_nb tileno resno precno compno layno start_pos end_pos disto\n");
|
fprintf(stream, "\npack_nb tileno resno precno compno layno start_pos end_pos disto\n");
|
||||||
*/
|
|
||||||
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
||||||
/* I suppose components have same XRsiz, YRsiz */
|
/* I suppose components have same XRsiz, YRsiz */
|
||||||
int x0 = image_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tw * image_info->tile_x;
|
int x0 = image_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tw * image_info->tile_x;
|
||||||
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
||||||
int x1 = x0 + image_info->tile_x;
|
int x1 = x0 + image_info->tile_x;
|
||||||
int y1 = y0 + image_info->tile_y;
|
int y1 = y0 + image_info->tile_y;
|
||||||
for(y = y0; y < y1; y++) {
|
for (compno = 0; compno < image_info->comp; compno++) {
|
||||||
for(x = x0; x < x1; x++) {
|
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
||||||
for (compno = 0; compno < image_info->comp; compno++) {
|
for (precno = 0; precno < prec_max; precno++) {
|
||||||
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
int pcnx = image_info->tile[tileno].pw[resno];
|
||||||
for (precno = 0; precno < prec_max; precno++) {
|
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
||||||
int pcnx = image_info->tile[tileno].pw[resno];
|
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
||||||
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
||||||
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
||||||
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
for(y = y0; y < y1; y++) {
|
||||||
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
if (precno_y*pcy == y ) {
|
||||||
if (precno_y*pcy == y ) {
|
for (x = x0; x < x1; x++) {
|
||||||
if (precno_x*pcx == x ) {
|
if (precno_x*pcx == x ) {
|
||||||
for (layno = 0; layno < image_info->layer; layno++) {
|
for (layno = 0; layno < image_info->layer; layno++) {
|
||||||
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
||||||
|
@ -2332,11 +2333,11 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
pack_nb++;
|
pack_nb++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}/* x = x0..x1 */
|
||||||
} /* precno */
|
}
|
||||||
} /* compno */
|
} /* y = y0..y1 */
|
||||||
} /* x = x0..x1 */
|
} /* precno */
|
||||||
} /* y = y0..y1 */
|
} /* compno */
|
||||||
} /* resno */
|
} /* resno */
|
||||||
} /* RPCL */
|
} /* RPCL */
|
||||||
else if (image_info->prog == PCRL) { /* PCRL */
|
else if (image_info->prog == PCRL) { /* PCRL */
|
||||||
|
@ -2345,21 +2346,21 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
||||||
int x1 = x0 + image_info->tile_x;
|
int x1 = x0 + image_info->tile_x;
|
||||||
int y1 = y0 + image_info->tile_y;
|
int y1 = y0 + image_info->tile_y;
|
||||||
/*
|
|
||||||
fprintf(stream, "\npack_nb tileno precno compno resno layno start_pos end_pos disto\n");
|
fprintf(stream, "\npack_nb tileno precno compno resno layno start_pos end_pos disto\n");
|
||||||
*/
|
|
||||||
for(y = y0; y < y1; y++) {
|
for (compno = 0; compno < image_info->comp; compno++) {
|
||||||
for(x = x0; x < x1; x++) {
|
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
||||||
for (compno = 0; compno < image_info->comp; compno++) {
|
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
||||||
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
for (precno = 0; precno < prec_max; precno++) {
|
||||||
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
int pcnx = image_info->tile[tileno].pw[resno];
|
||||||
for (precno = 0; precno < prec_max; precno++) {
|
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
||||||
int pcnx = image_info->tile[tileno].pw[resno];
|
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
||||||
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
||||||
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
||||||
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
for(y = y0; y < y1; y++) {
|
||||||
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
if (precno_y*pcy == y ) {
|
||||||
if (precno_y*pcy == y ) {
|
for (x = x0; x < x1; x++) {
|
||||||
if (precno_x*pcx == x ) {
|
if (precno_x*pcx == x ) {
|
||||||
for (layno = 0; layno < image_info->layer; layno++) {
|
for (layno = 0; layno < image_info->layer; layno++) {
|
||||||
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
||||||
|
@ -2371,34 +2372,35 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
pack_nb++;
|
pack_nb++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}/* x = x0..x1 */
|
||||||
} /* precno */
|
}
|
||||||
} /* resno */
|
} /* y = y0..y1 */
|
||||||
} /* compno */
|
} /* precno */
|
||||||
} /* x = x0..x1 */
|
} /* resno */
|
||||||
} /* y = y0..y1 */
|
} /* compno */
|
||||||
} /* PCRL */
|
} /* PCRL */
|
||||||
else { /* CPRL */
|
else { /* CPRL */
|
||||||
/*
|
|
||||||
fprintf(stream, "\npack_nb tileno compno precno resno layno start_pos end_pos disto\n");
|
fprintf(stream, "\npack_nb tileno compno precno resno layno start_pos end_pos disto\n");
|
||||||
*/
|
|
||||||
for (compno = 0; compno < image_info->comp; compno++) {
|
for (compno = 0; compno < image_info->comp; compno++) {
|
||||||
/* I suppose components have same XRsiz, YRsiz */
|
/* I suppose components have same XRsiz, YRsiz */
|
||||||
int x0 = image_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tw * image_info->tile_x;
|
int x0 = image_info->tile_Ox + tileno - (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tw * image_info->tile_x;
|
||||||
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
int y0 = image_info->tile_Ox + (int)floor( (float)tileno/(float)image_info->tw ) * image_info->tile_y;
|
||||||
int x1 = x0 + image_info->tile_x;
|
int x1 = x0 + image_info->tile_x;
|
||||||
int y1 = y0 + image_info->tile_y;
|
int y1 = y0 + image_info->tile_y;
|
||||||
for(y = y0; y < y1; y++) {
|
|
||||||
for(x = x0; x < x1; x++) {
|
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
||||||
for (resno = 0; resno < image_info->decomposition + 1; resno++) {
|
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
||||||
int prec_max = image_info->tile[tileno].pw[resno] * image_info->tile[tileno].ph[resno];
|
for (precno = 0; precno < prec_max; precno++) {
|
||||||
for (precno = 0; precno < prec_max; precno++) {
|
int pcnx = image_info->tile[tileno].pw[resno];
|
||||||
int pcnx = image_info->tile[tileno].pw[resno];
|
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
||||||
int pcx = (int) pow( 2, image_info->tile[tileno].pdx[resno] + image_info->decomposition - resno );
|
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
||||||
int pcy = (int) pow( 2, image_info->tile[tileno].pdy[resno] + image_info->decomposition - resno );
|
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
||||||
int precno_x = precno - (int) floor( (float)precno/(float)pcnx ) * pcnx;
|
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
||||||
int precno_y = (int) floor( (float)precno/(float)pcnx );
|
for(y = y0; y < y1; y++) {
|
||||||
if (precno_y*pcy == y ) {
|
if (precno_y*pcy == y ) {
|
||||||
|
for (x = x0; x < x1; x++) {
|
||||||
if (precno_x*pcx == x ) {
|
if (precno_x*pcx == x ) {
|
||||||
for (layno = 0; layno < image_info->layer; layno++) {
|
for (layno = 0; layno < image_info->layer; layno++) {
|
||||||
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
start_pos = image_info->tile[tileno].packet[pack_nb].start_pos;
|
||||||
|
@ -2410,12 +2412,12 @@ static int j2k_create_index(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_info_t *im
|
||||||
pack_nb++;
|
pack_nb++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}/* x = x0..x1 */
|
||||||
} /* precno */
|
}
|
||||||
} /* resno */
|
} /* y = y0..y1 */
|
||||||
} /* x = x0..x1 */
|
} /* precno */
|
||||||
} /* y = y0..y1 */
|
} /* resno */
|
||||||
} /* comno */
|
} /* compno */
|
||||||
} /* CPRL */
|
} /* CPRL */
|
||||||
} /* tileno */
|
} /* tileno */
|
||||||
|
|
||||||
|
|
|
@ -581,11 +581,7 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
|
||||||
return -999;
|
return -999;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(image_info) {
|
if(t2_mode == THRESH_CALC ){ /* Calculating threshold */
|
||||||
image_info->num = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(t2_mode == THRESH_CALC ){
|
|
||||||
for(compno = 0; compno < maxcomp; compno++ ){
|
for(compno = 0; compno < maxcomp; compno++ ){
|
||||||
for(poc = 0; poc < pocno ; poc++){
|
for(poc = 0; poc < pocno ; poc++){
|
||||||
int comp_len = 0;
|
int comp_len = 0;
|
||||||
|
@ -605,14 +601,14 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
|
||||||
if (e == -999) break;
|
if (e == -999) break;
|
||||||
if (cp->max_comp_size){
|
if (cp->max_comp_size){
|
||||||
if (comp_len > cp->max_comp_size){
|
if (comp_len > cp->max_comp_size){
|
||||||
e = -999;
|
e = -999;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e == -999) break;
|
if (e == -999) break;
|
||||||
}
|
}
|
||||||
}else{
|
}else{ /* t2_mode == FINAL_PASS */
|
||||||
pi_create_encode(pi, cp,tileno,pino,tpnum,tppos);
|
pi_create_encode(pi, cp,tileno,pino,tpnum,tppos);
|
||||||
while (pi_next(&pi[pino])) {
|
while (pi_next(&pi[pino])) {
|
||||||
if (pi[pino].layno < maxlayers) {
|
if (pi[pino].layno < maxlayers) {
|
||||||
|
@ -622,33 +618,33 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
|
||||||
} else {
|
} else {
|
||||||
c += e;
|
c += e;
|
||||||
}
|
}
|
||||||
|
/* INDEX >> */
|
||||||
|
if(image_info && image_info->index_on) {
|
||||||
|
if(image_info->index_write) {
|
||||||
|
opj_tile_info_t *info_TL = &image_info->tile[tileno];
|
||||||
|
opj_packet_info_t *info_PK = &info_TL->packet[image_info->num];
|
||||||
|
if (!image_info->num) {
|
||||||
|
info_PK->start_pos = info_TL->end_header + 1;
|
||||||
|
} else {
|
||||||
|
info_PK->start_pos = (cp->tp_on && info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[image_info->num - 1].end_pos + 1;
|
||||||
|
}
|
||||||
|
info_PK->end_pos = info_PK->start_pos + e - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
image_info->num++;
|
||||||
|
}
|
||||||
|
/* << INDEX */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INDEX >> */
|
pi_destroy(pi, cp, tileno);
|
||||||
if(image_info && image_info->index_on) {
|
|
||||||
if(image_info->index_write) {
|
|
||||||
opj_tile_info_t *info_TL = &image_info->tile[tileno];
|
|
||||||
opj_packet_info_t *info_PK = &info_TL->packet[image_info->num];
|
|
||||||
if (!image_info->num) {
|
|
||||||
info_PK->start_pos = info_TL->end_header + 1;
|
|
||||||
} else {
|
|
||||||
info_PK->start_pos = info_TL->packet[image_info->num - 1].end_pos + 1;
|
|
||||||
}
|
|
||||||
info_PK->end_pos = info_PK->start_pos + e - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
image_info->num++;
|
|
||||||
}
|
|
||||||
/* << INDEX */
|
|
||||||
pi_destroy(pi, cp, tileno);
|
|
||||||
|
|
||||||
if (e == -999) {
|
if (e == -999) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (c - dest);
|
return (c - dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile) {
|
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile) {
|
||||||
|
|
Loading…
Reference in New Issue