In pi.c, removed the Recursive function pi_check_next_level() and modified the code.
This commit is contained in:
@@ -589,7 +589,7 @@ static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_t
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino, J2K_T2_MODE t2_mode){
|
||||
int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino, J2K_T2_MODE t2_mode, int cur_totnum_tp){
|
||||
unsigned char *c = dest;
|
||||
int e = 0;
|
||||
int compno;
|
||||
@@ -612,7 +612,7 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
|
||||
for(poc = 0; poc < pocno ; poc++){
|
||||
int comp_len = 0;
|
||||
int tpnum = compno;
|
||||
pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode);
|
||||
pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp);
|
||||
while (pi_next(&pi[poc])) {
|
||||
if (pi[poc].layno < maxlayers) {
|
||||
e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[poc], c, dest + len - c, cstr_info, tileno);
|
||||
@@ -635,7 +635,7 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye
|
||||
if (e == -999) break;
|
||||
}
|
||||
}else{ /* t2_mode == FINAL_PASS */
|
||||
pi_create_encode(pi, cp,tileno,pino,tpnum,tppos,t2_mode);
|
||||
pi_create_encode(pi, cp,tileno,pino,tpnum,tppos,t2_mode,cur_totnum_tp);
|
||||
while (pi_next(&pi[pino])) {
|
||||
if (pi[pino].layno < maxlayers) {
|
||||
e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[pino], c, dest + len - c, cstr_info, tileno);
|
||||
@@ -781,3 +781,4 @@ void t2_destroy(opj_t2_t *t2) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user