Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] lavc/j2kdec: Do not ignore colour association for packed formats (PR #21092)
@ 2025-12-03 15:42 Valerii Zapodovnikov via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Valerii Zapodovnikov via ffmpeg-devel @ 2025-12-03 15:42 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Valerii Zapodovnikov

PR #21092 opened by Valerii Zapodovnikov (Balling)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21092
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21092.patch

Fixes ticket #9468.


Easy to see of you 

ffplay https://trac.ffmpeg.org/raw-attachment/ticket/9468/dg2img-3f096fe9d00296bc3734ac4f01b5bf60.j2k


>From 2f802a6b6463066aea6a7514bac9a4e5231542a6 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 3 Dec 2025 18:39:12 +0300
Subject: [PATCH] lavc/j2kdec: Do not ignore colour association for packed
 formats

Fixes ticket #9468.
---
 libavcodec/jpeg2000dec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index de1a73b92b..203b0f6cb7 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2360,7 +2360,8 @@ static inline int tile_codeblocks(const Jpeg2000DecoderContext *s, Jpeg2000Tile
                                                                                                   \
                 x   = tile->comp[compno].coord[0][0] -                                            \
                       ff_jpeg2000_ceildiv(s->image_offset_x, s->cdx[compno]);                     \
-                dst = line + x * pixelsize + compno*!planar;                                      \
+                dst = line + x * pixelsize +                                                      \
+                      (s->cdef[compno] ? s->cdef[compno] - 1 : compno) * !planar;                 \
                                                                                                   \
                 if (codsty->transform == FF_DWT97) {                                              \
                     for (; x < w; x++) {                                                          \
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-03 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-03 15:42 [FFmpeg-devel] [PATCH] lavc/j2kdec: Do not ignore colour association for packed formats (PR #21092) Valerii Zapodovnikov via ffmpeg-devel

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