From patchwork Wed Feb 25 22:10:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Tia X-Patchwork-Id: 26240 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 E06B1BE086 for ; Thu, 26 Feb 2026 13:29:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F3DCA622ED; Thu, 26 Feb 2026 14:29:09 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=jetm.me header.i=@jetm.me header.b="lPp8+8Fh"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="qCeyFTHl"; 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 2056C622B0 for ; Wed, 25 Feb 2026 23:11:27 +0100 (CET) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 28C8A14001F4; Wed, 25 Feb 2026 17:11:25 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 25 Feb 2026 17:11:25 -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=1772057485; x=1772143885; bh=M0ALvDmPkWqGe342yHgcx PRG+M8xDUSikQlViwsdBQQ=; b=lPp8+8Fh+xUu7VzvE09RmMCAlDQaDOIs/0nx7 HR6wCrcfwI7tw9mZXHkKW4IBRUCiLhWOZTFV8nyYtt9Y8x01lLGHsYJiiXxNCLxm pXGBu5LUPEF3tb+u1sJVUJ10v6CQSQz6H2x/iFjqelqmSaGd8hkox6slYqVdFLum kX8pJvnJAoOE35nH5ARsthszKktv1pxIKfadRvT5OslsN4OWX0b2kzmLyU3UraUa xLFlCJQszsg4vlTlGIx5rLn/kk1W13pPXFDEHj5S04HbJe41Tedfex9tuTcQBbqB jSWcfeZXDhaanXIeJozkVuaHMChPb97wyeJwFVV7slH2jxtwA== 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= 1772057485; x=1772143885; bh=M0ALvDmPkWqGe342yHgcxPRG+M8xDUSikQl ViwsdBQQ=; b=qCeyFTHlj242+w3+DxRLZynGMmFWLfUcYKBxM6oXPA5wCcaQCnc s6yx7Fo9KjKVlDtu9HMlCziDAVniUhGYNOcHARhBPpc/pL5bnjGFAg4TlLhDlu/C FPuJLRux0IH6caTZgNjI+H9tYb7aLYqaruxDa4kxKteoL/qmvl1CbRls7JiGnRbW ylyX6V0Mf/K+YP8NASJ5Ec8k9KHv5Hl8fObH7SWQsGCIeZqkymcaaez/LtCa93pm q00/7+MGEOjAE4eJrpNVIN4F6ayhrKpPU7mHUcnE0xd0FbBzF7IAZ42YhrhJjUUW G4UnpZ65PcbunKFJVAjKGLgGe+n8lm407lA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgeegvdekucetufdoteggodetrf 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:11:24 -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:10:08 -0600 Message-ID: <20260225221010.594680-1-floss@jetm.me> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 26 Feb 2026 14:29:08 +0100 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