From patchwork Mon Aug 18 08:28:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24150 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 C179FBEFBE for ; Mon, 18 Aug 2025 08:29:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E31C96925B; Mon, 18 Aug 2025 10:29:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="d0PWWH8g"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D07066924E for ; Mon, 18 Aug 2025 10:29:54 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:766d:a405:f64e:fe3a]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id ACF602394; Mon, 18 Aug 2025 10:28:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1755505737; bh=0uzO4c/3lpkI+6jgb8wAr+AImKF6nNcCyi8KSdYPVow=; h=From:To:Cc:Subject:Date:From; b=d0PWWH8gsaXi1nZsqMKDT/NT57Y+Z+HqJlZl6U/OIP+R2bJT+Ckzyco4RE/H13Bnu jbTwSqkSxPPK++3m5xw98e44fLhLm5pG5f85hKFXC2G+12rFcmxTKaEFs9IP4ut5Iv TgSIdSEkrVXw66tgHCAm8UKW2FQ49IlZGCvGQ6oM= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [RFC PATCH 0/4] libipa: agc_mean_luminance: Use composition instead of Date: Mon, 18 Aug 2025 10:28:38 +0200 Message-ID: <20250818082909.2001635-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" Hi all, I found myself regularly getting confused by the control flow in the rkisp1 AGC algorithm. I then realized that it is due to Agc being derived from AgcMeanLuminance even though there is very little automatic functionality coming from AgcMeanLuminance. So I gave it a try to remove the need to derive from AgcMeanLuminance and this is the result. I believe it makes things easier to understand. But maybe that is just me. What do you think? Best regards, Stefan Stefan Klug (4): libipa: agc_mean_luminance: pass estimateLuminance() as parameter ipa: rkisp1: agc: Do not derive from AgcMeanLuminance ipa: ipu3: agc: Do not derive from AgcMeanLuminance ipa: mali-c55: agc: Do not derive from AgcMeanLuminance src/ipa/ipu3/algorithms/agc.cpp | 22 ++++++----- src/ipa/ipu3/algorithms/agc.h | 6 ++- src/ipa/libipa/agc_mean_luminance.cpp | 57 ++++++++++++++------------- src/ipa/libipa/agc_mean_luminance.h | 9 +++-- src/ipa/mali-c55/algorithms/agc.cpp | 22 ++++++----- src/ipa/mali-c55/algorithms/agc.h | 5 ++- src/ipa/rkisp1/algorithms/agc.cpp | 43 +++++++++++--------- src/ipa/rkisp1/algorithms/agc.h | 8 ++-- 8 files changed, 94 insertions(+), 78 deletions(-)