From patchwork Sun Aug 28 15:52:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 37519 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1467479pzh; Sun, 28 Aug 2022 08:52:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR74yrjQrD5dH06FAePJfo97OyoYT5qOEPyaYwmEa3YCapiwbpVmv7cytCwdhWbOpFGnda7T X-Received: by 2002:a17:907:6092:b0:731:59f0:49ac with SMTP id ht18-20020a170907609200b0073159f049acmr10916287ejc.383.1661701975475; Sun, 28 Aug 2022 08:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661701975; cv=none; d=google.com; s=arc-20160816; b=OktHwRWcuq19knhNoxKafuvVilRY0Bbi63ZEenCZCbvXlgvH9ZMA7HPi8eh3CpWKr7 9rBQejt5SuH/bGicpyN0jH8eFynrQgOgTx4RNrT6c10h2QewARlaIbXn3DyPuavGg7Y2 f/GptgrTYDVSGhH6Q/f7ayFWkzbxeDnr27y7eU3cIYz14TDiXYVQavLJ4JZYSCGcka6Z iYknssKFu818bCH2ruFfUYIpCNH4Kios3ZKZcsztDbbYGnaF673cboqhD1AdEqwhm1c5 Ndkw9VW3o95Uxj3mA94se/Na2ZEJZ6UstV94/2S0Cya0NCz1ZVOato7vmM4DecJraB5h 1o3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=q+9cryxE8nl8GHpD+qLFuvbr21L21miuSdsS24MlEsI=; b=W6Yc+P7X/vKi4JKnrKnulcyJ+2re9PiAnD2MFZGqIHoGnkJN/jdvxb+w90NXgubN+Q eLnZGtuqzEnjcAFYBt073wlA1beWAuYfozqPRMlhR1WcwbNyswkh0udpotZnkkgjey8W /ilLityS+DJ8zYnR8g3TNwJkRHZB3Ut+ueTYl7aPK/UmDBsV6NyJ16DhLhyC6JRWC/kU thGKjbMyQcHgJcefxRVcOObzzVjl2DuYk91nxawc88g7vaQfXMvryIoOADDMJ0fJlUFl WeFOoD5njwZhwKU5Mm77Ss1IIB3OnsTta4GwfQG9XfopQ4LUvawyNNJyDiBOwLW075H6 AoXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="hn/x2FFS"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id nb22-20020a1709071c9600b00730983c4646si5190821ejc.508.2022.08.28.08.52.53; Sun, 28 Aug 2022 08:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="hn/x2FFS"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 59D9E68B987; Sun, 28 Aug 2022 18:52:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C12D68B779 for ; Sun, 28 Aug 2022 18:52:44 +0300 (EEST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-324ec5a9e97so144065537b3.7 for ; Sun, 28 Aug 2022 08:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=kwPZ/JHKzeuj672KyxHlGQH3LBVEJXaiaABtPMy8QCo=; b=hn/x2FFSBLcolRMpbj+9vEjGYLlrlOqAeFS/wB78g2Fwg+o4I0wsDBXYqYPfhqSbR9 ENz1r9dmvafxmd0d3KKb2X2XaOA7a8YHrLwYjrHH93Prfa6tL7VZYo0h6owNYGliz/tz 4YGU1YrnyuV4Gt8uj3fvDcvurloxXWLo4UcscG0LvU0ot1/vjp5woSVssyOkJXQprkl3 VaX129aNzkPwh/rGGWMPDaXFBr/N5p50DRtGwJoJRyZK1l+PDg3sahiALJhtWLjukQis AH5pbz9Jhhgd1t4EOXDApKCXgscGU/5vO9u5JlYdQEN2jnTlsgI7SC92ZifCKGnWyoEY rZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=kwPZ/JHKzeuj672KyxHlGQH3LBVEJXaiaABtPMy8QCo=; b=rb+nw1xEcdGARdIyDsZ2iiV3/KPfKhDbGSGOI8ULVEP/tStFAI3wvnw14VYTRl/GxZ y5G9+1rjuMWOIsYo4wjsD4EI+J6NtP6Zcn8hgu4uQHN8CyBnJRPlFEt1w6Ias2CjE7zg /zdIfYIyrAX9gEnAm6yAfzJCaMUpKSqEeHe/AfPFniyrwrgcJeyLyG0hkq1FwRMJintE 4eWUFQBXCBpBqlOvvCzSKJQAzHYHsWLjg5itNV1N9vW4Ky5s1m2QoXppcnVCKgBA0fyc UZfuv/Mxe37YJoOLfwIXstTz7jkIF6bt+4QNOXu7AZSJVuCPrFpxHXBVJJ1sAOI4rUWj htdg== X-Gm-Message-State: ACgBeo1I76SfZZIaRGJuACK4Y8Oc5I9tK+qAHm6OpQVMizEaCiZulu3/ pBrenpF37hGWNlDbfGxxY0xekClR2Ba1zBL7G1L+IXl2 X-Received: by 2002:a0d:df92:0:b0:340:b90d:fb75 with SMTP id i140-20020a0ddf92000000b00340b90dfb75mr5527446ywe.149.1661701962576; Sun, 28 Aug 2022 08:52:42 -0700 (PDT) MIME-Version: 1.0 From: Carl Eugen Hoyos Date: Sun, 28 Aug 2022 17:52:31 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/j2kdec: Do not ignore colour association for packed formats X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Wx0a0C6iOWIP Hi everybody! Attached patch fixes ticket #9468 for me. Please review, Carl Eugen From a28a5e26892adf56a0bb9b33de2fb76b2405cc97 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 28 Aug 2022 17:47:23 +0200 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 2c1191035c..c6187d6c43 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -2047,7 +2047,8 @@ static inline void 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.30.1