{"id":15895,"url":"https://patchwork.libcamera.org/api/1.1/patches/15895/?format=json","web_url":"https://patchwork.libcamera.org/patch/15895/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220512084244.1833554-2-foss+libcamera@0leil.net>","date":"2022-05-12T08:42:44","name":"[libcamera-devel,RFC,2/2] ipa: rkisp1: awb: switch to RGB means mode","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"602a3ff40df54785077fcb2c3092131943291242","submitter":{"id":120,"url":"https://patchwork.libcamera.org/api/1.1/people/120/?format=json","name":"Quentin Schulz","email":"foss+libcamera@0leil.net"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15895/mbox/","series":[{"id":3110,"url":"https://patchwork.libcamera.org/api/1.1/series/3110/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3110","date":"2022-05-12T08:42:43","name":"[libcamera-devel,RFC,1/2] ipa: rkisp1: awb: add support for RGB means","version":1,"mbox":"https://patchwork.libcamera.org/series/3110/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15895/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15895/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 889E3C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 May 2022 08:43:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 468C665660;\n\tThu, 12 May 2022 10:43:06 +0200 (CEST)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::221])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 41D296565A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 May 2022 10:43:04 +0200 (CEST)","(Authenticated sender: foss@0leil.net)\n\tby mail.gandi.net (Postfix) with ESMTPSA id CCD0D24000A;\n\tThu, 12 May 2022 08:43:01 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652344986;\n\tbh=PX69UFpuMSHjrcirpY5K/3ghK75/te/8KG7hMP5G5BY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tggs9GEihZAT5F5ZycNw3EgGgCN9uDxdM+Vr35O5MXCReSlFek59UuO2+ZyAPebmh\n\tciaxkFQpwdmGQLBgSk2y3HJk5tePMBxUUzBvAl54OFImcjA9qya9M6wedkbVpplkbL\n\t5BxtJ+BeGl0uEiBiasJi8BYYMsGx7BpwUgZPgMRGI3igok8Jek0/YPjmwXPM+fIq+m\n\tJjZsx2EM1BmJJ5lGIdOrZG9NDna+lp65k9IfZ9z/A0D8zl9ulTQRRHnpRoOSKGhQYB\n\t3D+zkk2ZVyoh7YN8f3lu31mqo+sxLAE6dbWbRgR2ELJWZgvKh69Vf43jwB+5dcO2o5\n\tcRcLtRnVGfGFg==","To":"","Date":"Thu, 12 May 2022 10:42:44 +0200","Message-Id":"<20220512084244.1833554-2-foss+libcamera@0leil.net>","X-Mailer":"git-send-email 2.35.3","In-Reply-To":"<20220512084244.1833554-1-foss+libcamera@0leil.net>","References":"<20220512084244.1833554-1-foss+libcamera@0leil.net>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 2/2] ipa: rkisp1: awb: switch to RGB\n\tmeans mode","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Quentin Schulz via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Quentin Schulz <foss+libcamera@0leil.net>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n\nWhile YCbCr means mode works just fine, it requires a conversion to RGB\nbefore computing necessary RGB gains.\n\nBy using RGB means mode directly, this conversion can be spared.\n\nThis was tested on a Rockchip PX30-based custom board and on a Theobroma\nPuma SoM + Haikou devkit and all fitted with an OV5675 sensor, using\ncustom kernels based on upstream Linux kernel (respectively) 5.10 (with\nmost upstream patches for rkisp1 from newer kernels applied) and 5.13.\n\nCc: Quentin Schulz <foss+libcamera@0leil.net>\nSigned-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n---\n\nWe probably need to triple check the other parameters right after (e.g.\nthe Cr/Cb references, the Y and Cb+Cr min/max values) too.\n\nThis is basically so people can check whether it works properly on the\nsame hardware they said it didn't work when initially adding support for\nAWB on RkISP.\n\n src/ipa/rkisp1/algorithms/awb.cpp | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)","diff":"diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex df749b9b..5dea5c13 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -91,11 +91,8 @@ void Awb::prepare(IPAContext &context, rkisp1_params_cfg *params)\n \n \t/* Configure the measure window for AWB. */\n \tparams->meas.awb_meas_config.awb_wnd = context.configuration.awb.measureWindow;\n-\t/*\n-\t * Measure Y, Cr and Cb means.\n-\t * \\todo RGB is not working, the kernel seems to not configure it ?\n-\t */\n-\tparams->meas.awb_meas_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n+\t/* Measure RGB means. */\n+\tparams->meas.awb_meas_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_RGB;\n \t/* Reference Cr and Cb. */\n \tparams->meas.awb_meas_config.awb_ref_cb = 128;\n \tparams->meas.awb_meas_config.awb_ref_cr = 128;\n","prefixes":["libcamera-devel","RFC","2/2"]}