From patchwork Fri Oct 3 12:15:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 24560 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 BB531C3261 for ; Fri, 3 Oct 2025 12:18:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A42F56B614; Fri, 3 Oct 2025 14:18:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="adHMWele"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C847A6B5FF for ; Fri, 3 Oct 2025 14:18:32 +0200 (CEST) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-401ce0cae36so85143f8f.2 for ; Fri, 03 Oct 2025 05:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1759493912; x=1760098712; 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=/MXPwOONyQGMGD5pq4Uaj2ICO0nNlOgDyk5ZR9DdQiM=; b=adHMWelewUBRt+w7tmXO+h03ERAkvGSPOu29LMYOK7FIN2GQcraHs2ssnc+YtYJ0pS R7kbTnHbi5kPEqr0iGDjnVkMQVgPUvGDPvDfJRy/5Q2RoKSpCWjOPLSzZWlRd/3o2A+k hFyYGt6pYq0OEM5eEW1U3gr6MYwi0TZ5NLs1t+uI8SB+/vR7pYAAzbzno+yDMa+fKJr9 iZ+z7Y7wfyy5C/1uxvxzwHfb2w07ZzF9V3TEQJ74RE7BUvxEFTaEu7C3wX/ZomzujTdq wn+U8KQYOSduTT7rE86qf2S5bvX5PXtyhq1wdqeGsiguRiXJiur5EgavdriNIFSobugF aFZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759493912; x=1760098712; 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=/MXPwOONyQGMGD5pq4Uaj2ICO0nNlOgDyk5ZR9DdQiM=; b=NZ4xRL4ydbdYsbd8p4nc0mwkO6VvffPO0fIJNe105weWIJ6yvnc8j4P3QLWbBGU/SN PQ36j+KzWobdRPW90hi8rV49JWojyeX+2YCzWZgp8MH6GTKNsGwS0tUE5brXVBg0S7RA 6U2fWZaA0NoEb+gHGD92W3iA3WD2+ifmoqhljDdJNC43u7pKnMwVUpEvtl8djFYU4aYz BIXMKebINEADDrJUiTAV9xhfLWBX+fR9OgBAeGzdU93tENEPH6cQUQnM/uj97Rv0uSfd ts2z2TI8HYkimxu4x1/ctu8i0/Bb0INgo/lJNmN34emHCaht6wEqg4KdPLd2BoI8VRzA pisg== X-Gm-Message-State: AOJu0YxNM0OF4B6rUKTDiKzQ4SSbh31YU24ptgrv6fKd3kz+FVFKO6Er +SunHudzBoq2lmwnfAc4JhBu4m1QR6iLmeWBih6tMGtYMLGBKIcd/J2SKwe8AbIovKzWPnyqf89 dYmYm X-Gm-Gg: ASbGncvaFvk3Y4spND0cOGRngfXEcdj0KnSzP8swMe8f94VUbEbZBkleR6kl9WVxtth WR0uArRtTrwQ+6TwKe4T3MwBaxUwcYATeec3Bk1LvtO7buGZHXEUOGErr2b/8NXxdePEEoZLspA kkfc2nKvT3cLPre4i+bsX5lwPM+Tet62lmNXdOMaqjsFlz95RQroZDBTObn5p6YDCwRocN/R5Wk 4auir9j6zK3N0LDoq2SjpqUxhAQXNdswAoST6KuwgJUof92eFBM100YbcqUl5BxVsEdYqhZKiwK 2pUJbrzsu4OWqI86UgZadpXAYdmlZBEnRGVXUJITHfxvpGirasAWyu55f8KEI0oaB6vbDTCUuFZ CAOTe0H9gY+psBdVisNzMGDi7MMzCMFkRgnuIcBjvXk+v2PxjBpQX3/gdabx8gkaRwA== X-Google-Smtp-Source: AGHT+IFxeYXsi9FsnoldHMUOsk6OgHe1YdgXE4ZYQF0N5Zps/YyAT9Bv22th5JAkOpBbzGLWNcWypQ== X-Received: by 2002:a05:6000:1861:b0:3f7:f02b:d7a with SMTP id ffacd0b85a97d-42567171f1bmr859654f8f.5.1759493912013; Fri, 03 Oct 2025 05:18:32 -0700 (PDT) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8f02a8sm7812529f8f.39.2025.10.03.05.18.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Oct 2025 05:18:31 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: David Plowman , Nick Hollinghurst , Naushir Patuck Subject: [PATCH v2 3/4] ipa: rpi: pisp: Add a DecompandAlgorithm class Date: Fri, 3 Oct 2025 13:15:54 +0100 Message-ID: <20251003121821.659081-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251003121821.659081-1-naush@raspberrypi.com> References: <20251003121821.659081-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 Tested-by: Nick Hollinghurst Reviewed-by: David Plowman --- 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 2036750f82f4..5b4c2e5524af 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 38b26a21e6d5..0f2a9b3bbdc4 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 = nullptr);