From patchwork Tue Dec 21 05:10:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 15191 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 5C97AC3258 for ; Tue, 21 Dec 2021 05:10:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 863CA608F9; Tue, 21 Dec 2021 06:10:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="clcqCXcC"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EABBB608E7 for ; Tue, 21 Dec 2021 06:10:36 +0100 (CET) Received: from pyrite.mediacom.info (unknown [IPv6:2604:2d80:ad90:fb00:96fd:8874:873:6c16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 18355881; Tue, 21 Dec 2021 06:10:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640063436; bh=MxGOIeVSivwDTuR0LVtTL6rvOHsaDNX/QyYay+eNRpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clcqCXcCEKTIzkmCDErJ4+Z9ZLx0wkO+KyWE6rybYs+u98tYCZqbL3jBIgfS4v932 sW7vXbgwayjw3Obg2yEjen4mAKgFj4C4H+vh9T+kGhESnx89Pm3elNPCVVREXDGMix 0LyyddHGbabavlYG+s/C50Y3J0N17p5K0DCZgnmU= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 23:10:22 -0600 Message-Id: <20211221051023.2628625-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211221051023.2628625-1-paul.elder@ideasonboard.com> References: <20211221051023.2628625-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/3] ipa: raspberrypi: Clean up NoiseReductionMode values 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" Remove the NoiseReductionMode values that the raspberrypi IPA does not support. The ControlInfo values that the IPA reports will be used for capability detection, so values that it does not support shall be removed. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham --- No change in v2: - constexpr did not work --- include/libcamera/ipa/raspberrypi.h | 8 +++++++- src/ipa/raspberrypi/raspberrypi.cpp | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h index 548bfba0..593139c5 100644 --- a/include/libcamera/ipa/raspberrypi.h +++ b/include/libcamera/ipa/raspberrypi.h @@ -18,6 +18,12 @@ namespace libcamera { namespace RPi { +const std::array RPiNoiseReductionModeValues = { + static_cast(controls::NoiseReductionModeOff), + static_cast(controls::NoiseReductionModeFast), + static_cast(controls::NoiseReductionModeHighQuality), +}; + /* * List of controls handled by the Raspberry Pi IPA * @@ -46,7 +52,7 @@ static const ControlInfoMap Controls({ { &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) }, { &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) }, { &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) }, - { &controls::NoiseReductionMode, ControlInfo(controls::NoiseReductionModeValues) } + { &controls::NoiseReductionMode, ControlInfo(RPiNoiseReductionModeValues) } }, controls::controls); } /* namespace RPi */ diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 3f497be1..e0685c69 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -618,8 +618,6 @@ static const std::map DenoiseModeTable = { { controls::NoiseReductionModeOff, RPiController::DenoiseMode::Off }, { controls::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast }, { controls::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality }, - { controls::NoiseReductionModeRaw, RPiController::DenoiseMode::ColourOff }, - { controls::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality }, }; void IPARPi::queueRequest(const ControlList &controls)