From patchwork Thu Jun 13 15:09:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 20300 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9108FC3293 for ; Thu, 13 Jun 2024 15:10:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BFA5F65462; Thu, 13 Jun 2024 17:10:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="byXWEyMQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 487C06548B for ; Thu, 13 Jun 2024 17:10:00 +0200 (CEST) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 17B624CF; Thu, 13 Jun 2024 17:09:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718291386; bh=2Xkzje5/Ipm7jGxkBaSbBKJV22bbiBa/XnVvKnUgIEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=byXWEyMQSiRgGSndHLOBRhs3TXM8R7saK8ERM6cNABJCdoYqMU9gNoQ4jIyn+vUY8 gE68XXS757CeNrkl9c+YEC+JDd/5TbpZraIQl6xw4KwYYDDCOm/sqr8fMoQJCNu9m3 ZpF7T3WNzlvnjgRVGyy0Lu2JRj/WSTyVYcPu/8qc= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH] utils: libtuning: Correct GBRG Image parsing Date: Thu, 13 Jun 2024 16:09:50 +0100 Message-Id: <20240613150950.1035299-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613150950.1035299-1-dan.scally@ideasonboard.com> References: <20240613150950.1035299-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Image class incorrectly parses data in GBRG bayer formats as the indices to the channels are set incorrectly - fix it. Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart Reviewed-by: Stefan Klug --- utils/tuning/libtuning/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/tuning/libtuning/image.py b/utils/tuning/libtuning/image.py index e2181b11..6ff60ec1 100644 --- a/utils/tuning/libtuning/image.py +++ b/utils/tuning/libtuning/image.py @@ -79,7 +79,7 @@ class Image: # is R, then G, then G, then B. bayer_case = { '0 1 1 2': (lt.Color.R, lt.Color.GR, lt.Color.GB, lt.Color.B), - '1 2 0 1': (lt.Color.GB, lt.Color.R, lt.Color.B, lt.Color.GR), + '1 2 0 1': (lt.Color.GB, lt.Color.B, lt.Color.R, lt.Color.GR), '2 1 1 0': (lt.Color.B, lt.Color.GB, lt.Color.GR, lt.Color.R), '1 0 2 1': (lt.Color.GR, lt.Color.R, lt.Color.B, lt.Color.GB) }