[FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: fix HT block decoder
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Sun May 19 19:01:46 EEST 2024
pal at sandflow.com:
> From: Pierre-Anthony Lemieux <pal at palemieux.com>
>
> Addresses https://trac.ffmpeg.org/ticket/10905
>
> Co-authored-by: Osamu Watanabe <owatanab at es.takushoku-u.ac.jp>
> Signed-off-by: Pierre-Anthony Lemieux <pal at palemieux.com>
> --> @@ -1297,14 +1299,14 @@ ff_jpeg2000_decode_htj2k(const
Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c
> for (int y = 0; y < height; y++) {
> for (int x = 0; x < width; x++) {
> n = x + (y * t1->stride);
> - val = sample_buf[x + (y * width)];
> + val = sample_buf[x + (y * quad_buf_width)];
> /* Convert sign-magnitude to two's complement. */
> val = val >> 31 ? 0x80000000 - val : val;
> val >>= (pLSB - 1);
> t1->data[n] = val;
> }
> }
> -free:
> + free:
Spurious change. It also seems unintentional and undesirable.
> av_freep(&sample_buf);
> av_freep(&block_states);
> return ret;
More information about the ffmpeg-devel
mailing list