From patchwork Wed Feb 25 22:18:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Tia X-Patchwork-Id: 26237 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 2ED78C0DA4 for ; Wed, 25 Feb 2026 22:20:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 45992622E9; Wed, 25 Feb 2026 23:20:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=jetm.me header.i=@jetm.me header.b="mrTUA+N/"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="fsnecQqZ"; dkim-atps=neutral Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B3CF161FA0 for ; Wed, 25 Feb 2026 23:20:14 +0100 (CET) Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id EB5F914001A3; Wed, 25 Feb 2026 17:20:13 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 25 Feb 2026 17:20:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetm.me; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1772058013; x=1772144413; bh=M0ALvDmPkWqGe342yHgcx PRG+M8xDUSikQlViwsdBQQ=; b=mrTUA+N/8FFhLrsEqyl19cf6TNWzUDvrs/u5s b6lxXe82ja9NHbRKkib7Tjlop9t+bRGWTu/XUpOD5GxXV9w0OcB0+YG3MMuJl1WT RqQqw9Rbh67pFM60b8q/CvPQ//ukCgwvQau3lGpnDFu2M8X9S9tQpTgVhENLepGD 64/d547rJOm6WLHbe4/R3j8H/iSZRetME1VJLCH9o5hFNG27a90ZRNSm4TYMDrYD 9Nz1UTK/QLImYwHXK9yyqKi/PPr3yEe1HhJkPvn0GyFiXDDZTf9rQ+uZwHlHq11L M0jWaHYFa3z9LQ/p9oeAWMlw1mRmeguEqjrbqH2mA2bfzOF5A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1772058013; x=1772144413; bh=M0ALvDmPkWqGe342yHgcxPRG+M8xDUSikQl ViwsdBQQ=; b=fsnecQqZ4b3E/jAF6sejVgkBOVqm3SR2kZWfn4JxDauYokyWOog MJePQdI1TCMMEQBk3a/7JbcaKrk5zOTXDudt3ixj7cbomrzNpXAj3gKGRf35We8B tVyqf2bVp5A9YMWXB6Whd0LUeQKxTAYjw5aiHw5NcU551G7o1DFhttyngMZG/gJ9 yS/ePz7WdQCSeBiaG3zye1ISyUJBFmK1DOCwQ1ZC5+S+F/VD/qTwVhvIlwcmtMYn i4m5M9NXmV2FRRnPJN4uDjb3uTYWg/xkUznxVL9OJr+JIX90Gse3lHF/oYJcSAd1 Q0Ovitxl7+u9JAs3n2h3/Dc//8gjdNvs72Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeegfedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpeflrghvihgvrhcuvfhirgcuoehflhhoshhssehjvghtmhdrmhgvqeen ucggtffrrghtthgvrhhnpefgleekheffudejueefgffgtdevleekleefffdtgfffteette fglefgudffgedtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehflhhoshhssehjvghtmhdrmhgvpdhnsggprhgtphhtthhopedvpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopehlihgstggrmhgvrhgrqdguvghvvghlsehlihhs thhsrdhlihgstggrmhgvrhgrrdhorhhgpdhrtghpthhtohepfhhlohhsshesjhgvthhmrd hmvg X-ME-Proxy: Feedback-ID: i9dde48b3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Feb 2026 17:20:13 -0500 (EST) From: Javier Tia To: libcamera-devel@lists.libcamera.org Cc: Javier Tia Subject: [PATCH 0/2] ipa: simple: Proportional AGC and OV2740 tuning Date: Wed, 25 Feb 2026 16:18:57 -0600 Message-ID: <20260225221859.600869-1-floss@jetm.me> X-Mailer: git-send-email 2.53.0 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" This series fixes AGC oscillation in the Simple pipeline and adds the first sensor-specific tuning file for the SoftISP. Patch 1 replaces the fixed 10% bang-bang step in the AGC with a proportional controller where step size scales with the MSV error. This eliminates the brightness flicker observed on sensors with non-trivial control latency (tested on OV2740 behind Intel IPU6/IVSC). Patch 2 adds an OV2740 tuning file with a color correction matrix calibrated for 6500K, compensating for the green bias from Bayer demosaicing. The CCM was iteratively calibrated from captured frame measurements. A proper Macbeth ColorChecker calibration at multiple color temperatures would improve accuracy. Tested on ThinkPad X1 Carbon Gen 10 (Alder Lake, OV2740, IPU6 ISYS, CachyOS kernel 6.19.3, libcamera 0.7.0). Javier Tia (2): ipa: simple: agc: Replace bang-bang controller with proportional ipa: simple: data: Add OV2740 tuning file src/ipa/simple/algorithms/agc.cpp | 73 +++++++++++++++++++++---------- src/ipa/simple/data/meson.build | 1 + src/ipa/simple/data/ov2740.yaml | 22 ++++++++++ 3 files changed, 72 insertions(+), 24 deletions(-) create mode 100644 src/ipa/simple/data/ov2740.yaml --- 2.53.0