From patchwork Sun Jun 16 16:39:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20335 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 73A59C32CF for ; Sun, 16 Jun 2024 16:39:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EE5A9654A3; Sun, 16 Jun 2024 18:39:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="l1Jnm9wo"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EF89E6549C for ; Sun, 16 Jun 2024 18:39:40 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B404581 for ; Sun, 16 Jun 2024 18:39:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718555964; bh=nvEjnxXDoaAzYywje7s9crWAt2mcK7HP1gh0xhKw5Jk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l1Jnm9woZxzrcjQI7uu5+fztzFLnGZ9cppU92YeJd4Jb52FbJv5qzrw60Qbbi6Wlo gLrnd8SxPTgiIgg/EjLj55Bbu/iTai9FEUG8PYNp830O10tnLdcV3+/y1K5QfRmqde W7bXUS6aJ8eObfLDViaIrPD4xQVrfhlxuozGIAd4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 07/12] ipa: rkisp1: agc: Don't update histogram parameters unnecessarily Date: Sun, 16 Jun 2024 19:39:05 +0300 Message-ID: <20240616163910.5506-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240616163910.5506-1-laurent.pinchart@ideasonboard.com> References: <20240616163910.5506-1-laurent.pinchart@ideasonboard.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 ISP histogram parameters depends on the AE metering mode, but not on the other AE algorithm controls. The exposure mode, constraints mode and frame duration limits influence the behaviour of the algorithm, but not the histogram computation parameters. Update the histogram parameters only when AE metering mode changes. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/rkisp1/algorithms/agc.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp index 9dac60bdb24e..9f3b59b45f95 100644 --- a/src/ipa/rkisp1/algorithms/agc.cpp +++ b/src/ipa/rkisp1/algorithms/agc.cpp @@ -261,26 +261,21 @@ void Agc::queueRequest(IPAContext &context, frameContext.agc.meteringMode = agc.meteringMode; const auto &exposureMode = controls.get(controls::AeExposureMode); - if (exposureMode) { - frameContext.agc.update = agc.exposureMode != *exposureMode; + if (exposureMode) agc.exposureMode = static_cast(*exposureMode); - } frameContext.agc.exposureMode = agc.exposureMode; const auto &constraintMode = controls.get(controls::AeConstraintMode); - if (constraintMode) { - frameContext.agc.update = agc.constraintMode != *constraintMode; + if (constraintMode) agc.constraintMode = static_cast(*constraintMode); - } frameContext.agc.constraintMode = agc.constraintMode; const auto &frameDurationLimits = controls.get(controls::FrameDurationLimits); if (frameDurationLimits) { utils::Duration maxShutterSpeed = std::chrono::milliseconds((*frameDurationLimits).back()); - frameContext.agc.update = agc.maxShutterSpeed != maxShutterSpeed; agc.maxShutterSpeed = maxShutterSpeed; } frameContext.agc.maxShutterSpeed = agc.maxShutterSpeed;