This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit e1472a4e0c35d1ba7dd0b789227c4ba69d79b27e Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Jan 8 15:12:14 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue Feb 3 12:39:32 2026 +0100 avcodec/jpeg2000dec: allow M_b == 31 Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/jpeg2000dec.c | 4 ++-- libavcodec/jpeg2000htdec.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index beba493870..374881ec37 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -2100,7 +2100,7 @@ static int decode_cblk(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *cod for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int32_t sign, n, val; - const uint32_t mask = UINT32_MAX >> (M_b + 1); // bit mask for ROI detection + const uint32_t mask = (UINT32_MAX >> M_b) >> 1; // bit mask for ROI detection n = x + (y * t1->stride); val = t1->data[n]; @@ -2270,7 +2270,7 @@ static inline int tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile band->coord[1][0] == band->coord[1][1]) continue; - if (M_b >= 31) { + if (M_b > 31) { avpriv_request_sample(s->avctx, "M_b (%d) > 31", M_b); return AVERROR_PATCHWELCOME; } diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c index 54b37009c2..b92f0131a4 100644 --- a/libavcodec/jpeg2000htdec.c +++ b/libavcodec/jpeg2000htdec.c @@ -1219,7 +1219,7 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c uint8_t *block_states = NULL; int32_t n, val; // Post-processing - const uint32_t mask = UINT32_MAX >> (M_b + 1); // bit mask for ROI detection + const uint32_t mask = (UINT32_MAX >> M_b) >> 1; // bit mask for ROI detection uint8_t num_rempass; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
