|
|
|
@ -732,15 +732,11 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) |
|
|
|
|
static int decode_pgod_lrcp(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) |
|
|
|
|
{ |
|
|
|
|
int ret = 0; |
|
|
|
|
int layno, reslevelno, compno, precno, ok_reslevel; |
|
|
|
|
int x, y; |
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
s->bit_index = 8; |
|
|
|
|
switch (tile->codsty[0].prog_order) { |
|
|
|
|
case JPEG2000_PGOD_LRCP: |
|
|
|
|
for (layno = 0; layno < tile->codsty[0].nlayers; layno++) { |
|
|
|
|
ok_reslevel = 1; |
|
|
|
|
for (reslevelno = 0; ok_reslevel; reslevelno++) { |
|
|
|
@ -763,9 +759,15 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case JPEG2000_PGOD_CPRL: |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int decode_pgod_cprl(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) |
|
|
|
|
{ |
|
|
|
|
int layno, reslevelno, compno, precno; |
|
|
|
|
int ret, x, y; |
|
|
|
|
|
|
|
|
|
for (compno = 0; compno < s->ncomponents; compno++) { |
|
|
|
|
Jpeg2000CodingStyle *codsty = tile->codsty + compno; |
|
|
|
|
Jpeg2000QuantStyle *qntsty = tile->qntsty + compno; |
|
|
|
@ -811,6 +813,22 @@ static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int jpeg2000_decode_packets(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile) |
|
|
|
|
{ |
|
|
|
|
int ret = 0; |
|
|
|
|
|
|
|
|
|
s->bit_index = 8; |
|
|
|
|
switch (tile->codsty[0].prog_order) { |
|
|
|
|
case JPEG2000_PGOD_LRCP: |
|
|
|
|
ret = decode_pgod_lrcp(s, tile); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case JPEG2000_PGOD_CPRL: |
|
|
|
|
ret = decode_pgod_cprl(s, tile); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case JPEG2000_PGOD_RLCP: |
|
|
|
|