From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/jpeg2000dec, j2kenc: Constify where appropriate
Date: Mon, 19 Feb 2024 12:30:48 +0100
Message-ID: <AS8P250MB0744FDF1F039F267C623885B8F512@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1SPRMB006386A16563C97BA4D00D8E8F532@GV1SPRMB0063.EURP250.PROD.OUTLOOK.COM>
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/j2kenc.c | 2 +-
> libavcodec/jpeg2000dec.c | 14 +++++++-------
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
> index 789791f529..ebf21f6e7a 100644
> --- a/libavcodec/j2kenc.c
> +++ b/libavcodec/j2kenc.c
> @@ -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;
> diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> index 691cfbd891..3d18d48e7c 100644
> --- a/libavcodec/jpeg2000dec.c
> +++ b/libavcodec/jpeg2000dec.c
> @@ -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;
Will apply this patchset tomorrow unless there are objections.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-02-19 11:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-17 19:54 Andreas Rheinhardt
2024-02-17 20:05 ` [FFmpeg-devel] [PATCH 2/4] avcodec/jpeg2000dec: Avoid using GetByteContext.buffer directly Andreas Rheinhardt
2024-02-19 14:00 ` Tomas Härdin
2024-02-17 20:05 ` [FFmpeg-devel] [PATCH 3/4] avcodec/jpeg2000: Simplify exp2fi for numbers used here Andreas Rheinhardt
2024-02-19 14:09 ` Tomas Härdin
2024-02-19 14:14 ` Andreas Rheinhardt
2024-02-19 14:51 ` Tomas Härdin
2024-02-17 20:05 ` [FFmpeg-devel] [PATCH 4/4] avcodec/internal: Move ff_exp2fi() to aacsbr.c Andreas Rheinhardt
2024-02-19 11:30 ` Andreas Rheinhardt [this message]
2024-02-19 13:58 ` [FFmpeg-devel] [PATCH 1/4] avcodec/jpeg2000dec, j2kenc: Constify where appropriate Tomas Härdin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8P250MB0744FDF1F039F267C623885B8F512@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git