|
|
@ -489,7 +489,7 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c) |
|
|
|
|
|
|
|
|
|
|
|
/* get coding parameters for a particular tile or whole image*/ |
|
|
|
/* get coding parameters for a particular tile or whole image*/ |
|
|
|
static int get_cod(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c, |
|
|
|
static int get_cod(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c, |
|
|
|
uint8_t *properties) |
|
|
|
const uint8_t *properties) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Jpeg2000CodingStyle tmp; |
|
|
|
Jpeg2000CodingStyle tmp; |
|
|
|
int compno, ret; |
|
|
|
int compno, ret; |
|
|
@ -639,7 +639,7 @@ static int get_qcx(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q) |
|
|
|
|
|
|
|
|
|
|
|
/* Get quantization parameters for a particular tile or a whole image. */ |
|
|
|
/* Get quantization parameters for a particular tile or a whole image. */ |
|
|
|
static int get_qcd(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q, |
|
|
|
static int get_qcd(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q, |
|
|
|
uint8_t *properties) |
|
|
|
const uint8_t *properties) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Jpeg2000QuantStyle tmp; |
|
|
|
Jpeg2000QuantStyle tmp; |
|
|
|
int compno, ret; |
|
|
|
int compno, ret; |
|
|
@ -1004,7 +1004,7 @@ static int getlblockinc(Jpeg2000DecoderContext *s) |
|
|
|
return res; |
|
|
|
return res; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static inline void select_header(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, |
|
|
|
static inline void select_header(Jpeg2000DecoderContext *s, const Jpeg2000Tile *tile, |
|
|
|
int *tp_index) |
|
|
|
int *tp_index) |
|
|
|
{ |
|
|
|
{ |
|
|
|
s->g = tile->tile_part[*tp_index].header_tpg; |
|
|
|
s->g = tile->tile_part[*tp_index].header_tpg; |
|
|
@ -1015,8 +1015,8 @@ static inline void select_header(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static inline void select_stream(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, |
|
|
|
static inline void select_stream(Jpeg2000DecoderContext *s, const Jpeg2000Tile *tile, |
|
|
|
int *tp_index, Jpeg2000CodingStyle *codsty) |
|
|
|
int *tp_index, const Jpeg2000CodingStyle *codsty) |
|
|
|
{ |
|
|
|
{ |
|
|
|
s->g = tile->tile_part[*tp_index].tpg; |
|
|
|
s->g = tile->tile_part[*tp_index].tpg; |
|
|
|
if (bytestream2_get_bytes_left(&s->g) == 0 && s->bit_index == 8) { |
|
|
|
if (bytestream2_get_bytes_left(&s->g) == 0 && s->bit_index == 8) { |
|
|
@ -1033,9 +1033,9 @@ static inline void select_stream(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, int *tp_index, |
|
|
|
static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, int *tp_index, |
|
|
|
Jpeg2000CodingStyle *codsty, |
|
|
|
const Jpeg2000CodingStyle *codsty, |
|
|
|
Jpeg2000ResLevel *rlevel, int precno, |
|
|
|
Jpeg2000ResLevel *rlevel, int precno, |
|
|
|
int layno, uint8_t *expn, int numgbits) |
|
|
|
int layno, const uint8_t *expn, int numgbits) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int bandno, cblkno, ret, nb_code_blocks; |
|
|
|
int bandno, cblkno, ret, nb_code_blocks; |
|
|
|
int cwsno; |
|
|
|
int cwsno; |
|
|
|