From patchwork Mon Sep 13 10:20:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13820 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 25234BDC71 for ; Mon, 13 Sep 2021 10:20:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D44816918A; Mon, 13 Sep 2021 12:20:25 +0200 (CEST) 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="ICfwqniR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DE95F69181 for ; Mon, 13 Sep 2021 12:20:22 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 641258F; Mon, 13 Sep 2021 12:20:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1631528422; bh=vgXXX1UiwW1lKKfOtDdsicUxqJhQolxV3lF7wZBPztk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ICfwqniRa6qvTjv6wLtuup3QBu+8zfPSPuSLW1ONWofdxRMUsWumQMl0RgpqX/MuQ +OrluX6rjkmpg+/lzRYaz9nmehrxYAbmIDX9P3Ex7DQNTED2fmPNZQJ3CMeKt5/f4M eK7tO+2FIV91xJqouNGe9PgvaOLjvRumEA2dU3jc= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 13 Sep 2021 19:20:06 +0900 Message-Id: <20210913102007.2303225-2-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210913102007.2303225-1-paul.elder@ideasonboard.com> References: <20210913102007.2303225-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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 --- 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 e0dc6f5e..6e97ef53 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 * @@ -45,7 +51,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 8d44ab0a..daef1c2d 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -608,8 +608,6 @@ static const std::map DenoiseModeTable = { { controls::NoiseReductionModeOff, RPiController::DenoiseMode::Off }, { controls::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast }, { controls::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality }, - { controls::NoiseReductionModeMinimal, RPiController::DenoiseMode::ColourOff }, - { controls::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality }, }; void IPARPi::queueRequest(const ControlList &controls)