{"id":13442,"url":"https://patchwork.libcamera.org/api/patches/13442/?format=json","web_url":"https://patchwork.libcamera.org/patch/13442/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210823124937.253539-8-jeanmichel.hautbois@ideasonboard.com>","date":"2021-08-23T12:49:37","name":"[libcamera-devel,v1,7/7] ipa: ipu3: Introduce Black Level Correction","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"55e0a084cc5ae42373ea2c0bbee8419dcb386c54","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13442/mbox/","series":[{"id":2385,"url":"https://patchwork.libcamera.org/api/series/2385/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2385","date":"2021-08-23T12:49:30","name":"IPU3: AWB and AGC improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/2385/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13442/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13442/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 312DFC3242\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Aug 2021 12:49:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5F6E68915;\n\tMon, 23 Aug 2021 14:49:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0369F6025B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Aug 2021 14:49:44 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:b920:776:a08c:1d1f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AD07B4A3;\n\tMon, 23 Aug 2021 14:49:43 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"d71oWskJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629722983;\n\tbh=bUvMTU7i9QQFkbbpFMujK4Q/ei2+xVpjZ1j7qSsqoh4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=d71oWskJyVeg2jatLWdqzB+vnfQfrGHPB3hSJWZiI7HNk4wI7WIHj1OBjHYQG/55Y\n\tcWgOItkLqXytvs2QP09JqLwXTKtMlAdfzrg276XqDUeWLRl3XLSLsDqWLaQsZcywnE\n\tEqn9pAyH29VR+FJQ8QxRZlTjQEefMAkQ6geeIs90=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 23 Aug 2021 14:49:37 +0200","Message-Id":"<20210823124937.253539-8-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20210823124937.253539-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20210823124937.253539-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1 7/7] ipa: ipu3: Introduce Black Level\n\tCorrection","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The pixels output by the camera normally include a black level, because\nsensors do not always report a signal level of '0' for black. Pixels at\nor below this level should be considered black. This can be taken into\naccount by reading the lowest value of a special region on sensors which\nis not exposed to the lens. This provides a scaling factor to be able to\nadjust the expected black levels in the resultant images.\n\nFor a camera outputting 10-bit pixel values (in the range 0 to 1023) a\ntypical black level might be 64, but the correct value would be found in\nthe sensor manaufacturer’s datasheet.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/awb.cpp | 8 ++++++++\n 1 file changed, 8 insertions(+)","diff":"diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\nindex 294871b1..ad3784d3 100644\n--- a/src/ipa/ipu3/algorithms/awb.cpp\n+++ b/src/ipa/ipu3/algorithms/awb.cpp\n@@ -366,9 +366,17 @@ void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)\n \t/* The CCM matrix may change when color temperature will be used */\n \tparams->acc_param.ccm = imguCssCcmDefault;\n \n+\t/* The Optical Black Level correction values */\n+\tparams->obgrid_param.gr = 64;\n+\tparams->obgrid_param.r = 63;\n+\tparams->obgrid_param.b = 63;\n+\tparams->obgrid_param.gb = 64;\n+\n \tparams->use.acc_awb = 1;\n \tparams->use.acc_bnr = 1;\n \tparams->use.acc_ccm = 1;\n+\tparams->use.obgrid = 1;\n+\tparams->use.obgrid_param = 1;\n }\n \n } /* namespace ipa::ipu3::algorithms */\n","prefixes":["libcamera-devel","v1","7/7"]}