From patchwork Thu Oct 2 13:26:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 24551 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 7EB87C3310 for ; Thu, 2 Oct 2025 13:35:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8ACC96B5F9; Thu, 2 Oct 2025 15:35:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="XZBC5onu"; dkim-atps=neutral Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3148C6B5F8 for ; Thu, 2 Oct 2025 15:35:32 +0200 (CEST) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-46e310e64f4so1319195e9.3 for ; Thu, 02 Oct 2025 06:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1759412131; x=1760016931; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i8zkLLTT4paFP9gI8ujDezDawHht0wHhmVNglan8uqo=; b=XZBC5onuj2f6DaoShFJxZ9hkY1XtwxEec8mrNi8zSjU1M5mZchTsDGtKkTLZ3TpKi4 mDzQ5/7JuaMZkPK8zhSkfUB/Kjin2tHbAB13TPeCuI0EEhgKfkZsqA6u22tV5M/YNWQT C2RSyZsao0q+yFEVGwh7ptUWR+PF6QhUmrVFtit19u5d+pdA3AyEZQXhzTayX/fGzCwf 313jueEQswCvC93NPgfy5mU7qGg8QkTYmC+ED4RUpZaEZT/Qz3/ejk+/9MNUc7z55rx4 KndCbXESWakSP4ePHSaSSHqNFuYLbhujlv39lM4SADTfRodzx5UFG2Sw3NzpkJeLGugU 1eLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759412131; x=1760016931; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i8zkLLTT4paFP9gI8ujDezDawHht0wHhmVNglan8uqo=; b=fc1qgH07CDVD9XsrixXW2IH5P1i7brqHCq0tKX2KMEBT+iJHn4ssZbruURIJHf/cI3 xNqdK+i4ams2QVPhB+wlY5RMDhTcyJElK1siZXNjMWhrO51HMSnqX9lsV9+0y2btbxMO 7XtGqHV+WyZSUGsp5YRKakBAyRBlOp49Yrv1W4g8BL+bEZb968Ey5mq/tKwNPhZb5XGI Yy7iTZYjl6JitGAnkiRKN7rJACTdj5u1SoQnrT3GrIGAE836R68NP+C3FJn5plvM3Krp K9cyU5CGmNwgYVKvyoY6+S4ygomgMmuOaRup5455G8Lrua5Xt5gokvGE1G9f6/VxImoQ leXA== X-Gm-Message-State: AOJu0YzxwHwOyr8/3aR7XvV1LViOftP8CfYTuJdW6GOx7133yCrlrEOK VXkea+SqxCqW3I3+AG/d+JgpTGla9ZO1ftkaJ0AiEwvJAxmeQ6rLXM/EvNZWks5w4Yryy+GsDXS r+ool X-Gm-Gg: ASbGncuQPFpJV6YNDkSz7fsDs9Kbhhkf175Teg7hG8npkQ6M2YwJdZuwQGRHhMCrpyn r4l52tf9Amg3hw/Dh1p1hOLB0ZMU+gC1Urbpvk4mSwo2Io2VeG+Yu6NtIQksnGRRc7ZbQTIFxm5 uUgeoPL7X/VnrDtepytqZ4BjX+WdhQ92z4S1XvdmCTucpISQk9BJe5Xnz/KLwCxu+OLF8eZBkjF PIg9iYAaK5JXln1GIY6qJcczB8YqRb1QrEhUlbJkMBXZC7u1u8HKquDhjsijLiTEboqsLRgGLoj KQfvUW5DiLmy3KGIlchm2+AdztoD125EjR8A3/oIlubpmB55kZFlpnFpD+O0z3d9+bOlw53btQ5 snojvqRgwy1JB2OanTxz/qgFXODfU+OnalSsXBz58iXybs90JTEwcX3cCAl/wcd6C/O6trI8CRo xv X-Google-Smtp-Source: AGHT+IEfkaTkpx3vw745W8zu4nzidFM4Ihg33zZZ4gLntUHsF0WEiQCdrQ/TAtGskmYgJqFN9s9jjw== X-Received: by 2002:a05:600c:4ec6:b0:46e:354d:d1b1 with SMTP id 5b1f17b1804b1-46e612862c8mr30189545e9.3.1759412131508; Thu, 02 Oct 2025 06:35:31 -0700 (PDT) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e6918bdebsm40396015e9.9.2025.10.02.06.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Oct 2025 06:35:31 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: David Plowman , Nick Hollinghurst , Naushir Patuck Subject: [PATCH v1 3/4] ipa: rpi: pisp: Add a DecompandAlgorithm class Date: Thu, 2 Oct 2025 14:26:06 +0100 Message-ID: <20251002133523.293413-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251002133523.293413-1-naush@raspberrypi.com> References: <20251002133523.293413-1-naush@raspberrypi.com> 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" The decompand algorithm implementation will subclass the DecompandAlgorithm class. This will be needed for setting the initial decompand values in a future commit. Signed-off-by: Naushir Patuck --- src/ipa/rpi/controller/decompand_algorithm.h | 24 ++++++++++++++++++++ src/ipa/rpi/controller/rpi/decompand.cpp | 2 +- src/ipa/rpi/controller/rpi/decompand.h | 5 ++-- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/ipa/rpi/controller/decompand_algorithm.h diff --git a/src/ipa/rpi/controller/decompand_algorithm.h b/src/ipa/rpi/controller/decompand_algorithm.h new file mode 100644 index 000000000000..f19f8c109323 --- /dev/null +++ b/src/ipa/rpi/controller/decompand_algorithm.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (C) 2025, Raspberry Pi Ltd + * + * Decompand control algorithm interface + */ +#pragma once + +#include "libipa/pwl.h" + +#include "algorithm.h" + +namespace RPiController { + +class DecompandAlgorithm : public Algorithm +{ +public: + DecompandAlgorithm(Controller *controller = NULL) + : Algorithm(controller) + { + } +}; + +} /* namespace RPiController */ diff --git a/src/ipa/rpi/controller/rpi/decompand.cpp b/src/ipa/rpi/controller/rpi/decompand.cpp index 911b04bc0da0..b450436806e1 100644 --- a/src/ipa/rpi/controller/rpi/decompand.cpp +++ b/src/ipa/rpi/controller/rpi/decompand.cpp @@ -13,7 +13,7 @@ LOG_DEFINE_CATEGORY(RPiDecompand) #define NAME "rpi.decompand" Decompand::Decompand(Controller *controller) - : Algorithm(controller) + : DecompandAlgorithm(controller) { } diff --git a/src/ipa/rpi/controller/rpi/decompand.h b/src/ipa/rpi/controller/rpi/decompand.h index 5ef35946efa5..321a561ab141 100644 --- a/src/ipa/rpi/controller/rpi/decompand.h +++ b/src/ipa/rpi/controller/rpi/decompand.h @@ -2,10 +2,9 @@ #include +#include "../decompand_algorithm.h" #include "../decompand_status.h" -#include "algorithm.h" - namespace RPiController { struct DecompandConfig { @@ -13,7 +12,7 @@ struct DecompandConfig { libcamera::ipa::Pwl decompandCurve; }; -class Decompand : public Algorithm +class Decompand : public DecompandAlgorithm { public: Decompand(Controller *controller = NULL);