{"id":14221,"url":"https://patchwork.libcamera.org/api/1.1/covers/14221/?format=json","web_url":"https://patchwork.libcamera.org/cover/14221/","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":"<20211021164401.110033-1-jeanmichel.hautbois@ideasonboard.com>","date":"2021-10-21T16:43:47","name":"[libcamera-devel,v3,00/14] ipa: ipu3: Fix AGC bugs","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/14221/mbox/","series":[{"id":2646,"url":"https://patchwork.libcamera.org/api/1.1/series/2646/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2646","date":"2021-10-21T16:43:47","name":"ipa: ipu3: Fix AGC bugs","version":3,"mbox":"https://patchwork.libcamera.org/series/2646/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/14221/comments/","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 5A3ABBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Oct 2021 16:44:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3BE868F62;\n\tThu, 21 Oct 2021 18:44:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 808FE604FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Oct 2021 18:44:05 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:f9d:5926:ad90:4996])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 16277276;\n\tThu, 21 Oct 2021 18:44:05 +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=\"GcV5C7uK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634834645;\n\tbh=iH8H/H0e3urv5FP5VAD1dVbxED4lsnSqvY5vMga5w3g=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=GcV5C7uKI3ZevZnPEaT8ZrVtkkx6QOQsFAFrnS6+yF0BVQpcNNqpUiEI/r4sHxd8K\n\tkch+iyy3goeWMYpwRh91zL/DImPNOrnBEJjoKoLd9pHyePc0HnWdGaMm4ni5eUiMWD\n\tcMOEWOZ1OhJr8qtWd6G9HUp+NNy8KxSqYao7McDI=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 21 Oct 2021 18:43:47 +0200","Message-Id":"<20211021164401.110033-1-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 00/14] ipa: ipu3: Fix AGC bugs","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":"Hello,\n\nI did not know how to title this series, so I have decided to make it\nappealing somehow . There will probably be another patch series on\ntop to remove all the exposure in a number of lines and use only time\nvalues in AGC, and it should include the usage of VBLANK too, as we are\nnow limiting the exposure time to the current VBLANK and not modifying\nit at all.\n\nChanges:\nv3:\n- Patch 11/13 => keep the test on the small exposure/gain change\n- mostly comments adressed\n\nv2:\n- using a structure in IPASessionConfiguration to store the\n  sensor limits and pass those to the AGC\n- most of the corrections asked are applied, including the nicer\n  division between exposure and gain proposal from Laurent \n- the analogue gain set in the driver might be off the limits we would\n  expect (minimum of 0 or more than 16 for instance) so it is clamped.\n\n\nThere are multiple things here. First, we want to use the saturation\nratio included in the AWB statistics. To make it relevant, we need to\nset a threshold to decide what is a saturated cell (patch 1/13) and use\nthis ratio to avoid including too much saturated cells in the Grey World\ncomputation (3/13).\n\nWhile debugging it, it appeared we are not setting the frameContext\nvariables before IPAIPU3::start() is called, while we are setting\ncontrols in it which use the frameContext (2/13).\n\nWe have a small patch 4/13 which is here to lower the limit under which\nwe are not calculating the red and blue gains for white balance.\n\nThen, from patch 5/13 to 13/13 it is multiple fixes like renaming\nvariables, changing the way the exposure and gains are calculated, etc.\n\nAll of those should make the algorithm easier to follow, and the\ndocumentation should be added on top of that, in the coming shortly v2\nof \"Document IPU3 IPA\".\n\nJean-Michel Hautbois (14):\n  ipa: ipu3: awb: Set a threshold for the green saturation\n  ipa: ipu3: set frameContext before controls\n  ipa: ipu3: awb: Use saturation under 90%\n  ipa: ipu3: awb: Change minimal green threshold value\n  ipa: ipu3: agc: Rename exposure values properly\n  ipa: ipu3: agc: Change exposure limits\n  ipa: ipu3: agc: Change analogue gain limits\n  ipa: ipu3: agc: Use filtered exposure values\n  ipa: ipu3: agc: Simplify division of exposure/gain\n  ipa: ipu3: agc: Rename gains properly\n  ipa: ipu3: agc: Introduce previous exposure value\n  ipa: ipu3: agc: Refactor condition on exposure correction\n  ipa: ipu3: agc: Remove unused variables\n  ipa: ipu3: Use sensor limits for analogue gain\n\n src/ipa/ipu3/algorithms/agc.cpp | 152 +++++++++++++++++---------------\n src/ipa/ipu3/algorithms/agc.h   |  11 ++-\n src/ipa/ipu3/algorithms/awb.cpp |  64 ++++++++++++--\n src/ipa/ipu3/algorithms/awb.h   |   1 +\n src/ipa/ipu3/ipa_context.h      |   9 ++\n src/ipa/ipu3/ipu3.cpp           |  64 ++++++++++++--\n 6 files changed, 212 insertions(+), 89 deletions(-)"}