From patchwork Fri Jun 13 10:09:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 23556 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 E6038BDE6B for ; Fri, 13 Jun 2025 10:10:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A8F8C68DBB; Fri, 13 Jun 2025 12:10:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gp8zhg+W"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E1EAE68DB4 for ; Fri, 13 Jun 2025 12:10:03 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:37bc:6352:9b26:2f94]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6AED3ED; Fri, 13 Jun 2025 12:09:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1749809393; bh=CaJcjBpS/Rj6FChWH9KElFnKukMpcNrEC+F3zNP47mo=; h=From:To:Cc:Subject:Date:From; b=gp8zhg+Wp395NfE66+s2T/WRwxPecnITS96wCZ7neaLlEVJJlG6fLKTrz8pxw04TK NpNPA0EGxph438MmDsRZ0H+kSEcccPTJ6BEmSCFc2+QyM2v0DSqvzXeqO4eIkjmMQ0 PSg5/mo5V/WXpUEEklx9wNoNujGRiNosv1/gg0Yc= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 0/4] ipa: pwl: Fixes for single point PWLs Date: Fri, 13 Jun 2025 12:09:35 +0200 Message-ID: <20250613100947.589875-1-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 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" In our tuning files we have several occasions where we interpolate some value (like colour temperature probabilities) based on some other value (like lux levels) using the Pwl class. In cases where this interpolation is not wanted it is tempting to just put a single pair of values into the tuning file. Unfortunately this doesn't work as the Pwl refuses to work with a single point. There is no (to my knowlege) reason not to support that usecase. Update v2: This series add support for the single point Pwls. After the feedback in v1 I kept the extrapolation code in place and only fixed the documentation for that. Best regards, Stefan Stefan Klug (4): test: ipa: Add basic Pwl test libipa: pwl: Improve documentation test: ipa: Add failing test for single point Pwl libipa: pwl: Fix single point Pwl src/ipa/libipa/pwl.cpp | 19 +++++++------ test/ipa/libipa/meson.build | 1 + test/ipa/libipa/pwl.cpp | 57 +++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 test/ipa/libipa/pwl.cpp