mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avcodec/jpeg2000dec, j2kenc: Constify where appropriate
Reviewed-by: Tomas Härdin <git@haerdin.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
32178c2f28
commit
b48b3250ca
@ -781,7 +781,7 @@ static void putnumpasses(Jpeg2000EncoderContext *s, int n)
|
||||
|
||||
|
||||
static int encode_packet(Jpeg2000EncoderContext *s, Jpeg2000ResLevel *rlevel, int layno,
|
||||
int precno, uint8_t *expn, int numgbits, int packetno,
|
||||
int precno, const uint8_t *expn, int numgbits, int packetno,
|
||||
int nlayers)
|
||||
{
|
||||
int bandno, empty = 1;
|
||||
|
@ -489,7 +489,7 @@ static int get_cox(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c)
|
||||
|
||||
/* get coding parameters for a particular tile or whole image*/
|
||||
static int get_cod(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c,
|
||||
uint8_t *properties)
|
||||
const uint8_t *properties)
|
||||
{
|
||||
Jpeg2000CodingStyle tmp;
|
||||
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. */
|
||||
static int get_qcd(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q,
|
||||
uint8_t *properties)
|
||||
const uint8_t *properties)
|
||||
{
|
||||
Jpeg2000QuantStyle tmp;
|
||||
int compno, ret;
|
||||
@ -1004,7 +1004,7 @@ static int getlblockinc(Jpeg2000DecoderContext *s)
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline void select_header(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile,
|
||||
static inline void select_header(Jpeg2000DecoderContext *s, const Jpeg2000Tile *tile,
|
||||
int *tp_index)
|
||||
{
|
||||
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,
|
||||
int *tp_index, Jpeg2000CodingStyle *codsty)
|
||||
static inline void select_stream(Jpeg2000DecoderContext *s, const Jpeg2000Tile *tile,
|
||||
int *tp_index, const Jpeg2000CodingStyle *codsty)
|
||||
{
|
||||
s->g = tile->tile_part[*tp_index].tpg;
|
||||
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,
|
||||
Jpeg2000CodingStyle *codsty,
|
||||
const Jpeg2000CodingStyle *codsty,
|
||||
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 cwsno;
|
||||
|
Loading…
Reference in New Issue
Block a user