Patch Detail
Show a patch.
GET /api/1.1/patches/15190/?format=api
{ "id": 15190, "url": "https://patchwork.libcamera.org/api/1.1/patches/15190/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15190/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211221051023.2628625-2-paul.elder@ideasonboard.com>", "date": "2021-12-21T05:10:21", "name": "[libcamera-devel,v2,1/3] controls: Promote NoiseReductionMode to non-draft", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "ddb3307a253d0825af0c3b3d09040843b8b258cd", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api", "username": "epaul", "first_name": "Paul", "last_name": "Elder", "email": "paul.elder@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/15190/mbox/", "series": [ { "id": 2852, "url": "https://patchwork.libcamera.org/api/1.1/series/2852/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2852", "date": "2021-12-21T05:10:20", "name": "Noise reduction", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2852/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15190/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15190/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3BA24BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Dec 2021 05:10:39 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD7B8608FD;\n\tTue, 21 Dec 2021 06:10:38 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 000FA608E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Dec 2021 06:10:35 +0100 (CET)", "from pyrite.mediacom.info (unknown\n\t[IPv6:2604:2d80:ad90:fb00:96fd:8874:873:6c16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C8B6881;\n\tTue, 21 Dec 2021 06:10:34 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"jD+KhC0E\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640063435;\n\tbh=LcWePXNJSt0SsZckOquvnaAXjKSBJB9cv+ngABrwQnQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jD+KhC0EBsK9PpQ39OQrrJiPbz4AM3zNDwd3juiGHCn6a8kfCHcfyMtFfRv/6bxyI\n\tkzXxYoYDFga1MzLy5O1fDrlzrkH4iYYG9aRw4f4I4E5qycfKXzLwGIIZT6kMaaDJzh\n\tPQ4WFlVPyZvfXyhPKkXi5f3WMoHupt8PO2XgX1M0=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 20 Dec 2021 23:10:21 -0600", "Message-Id": "<20211221051023.2628625-2-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", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 1/3] controls: Promote\n\tNoiseReductionMode to non-draft", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Promote NoiseReductionMode to a non-draft control. Upgrade the value\ndescriptions. Update the raspberrypi IPA accordingly, as it is the only\ncurrent user of this control.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\nNo change in v2\n- I think that the framerate guarantees should stay. If the application\n wants no framerate drop at all costs, it should be able to get it, or\n at least be notified that it's not possible to be guaranteed. The lack\n of mechanism to do this communication I think is not a good idea.\n- the paragraph about ZSL has been left in\n---\n include/libcamera/ipa/raspberrypi.h | 2 +-\n src/android/camera_capabilities.cpp | 2 +-\n src/ipa/raspberrypi/raspberrypi.cpp | 12 ++---\n src/libcamera/control_ids.yaml | 73 +++++++++++++++++------------\n 4 files changed, 52 insertions(+), 37 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex 672b85a5..548bfba0 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -46,7 +46,7 @@ static const ControlInfoMap Controls({\n \t\t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n \t\t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n \t\t{ &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n-\t\t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }\n+\t\t{ &controls::NoiseReductionMode, ControlInfo(controls::NoiseReductionModeValues) }\n \t}, controls::controls);\n \n } /* namespace RPi */\ndiff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp\nindex fa5f3b8d..d6a1589e 100644\n--- a/src/android/camera_capabilities.cpp\n+++ b/src/android/camera_capabilities.cpp\n@@ -1398,7 +1398,7 @@ int CameraCapabilities::initializeStaticMetadata()\n \t{\n \t\tstd::vector<uint8_t> data;\n \t\tdata.reserve(5);\n-\t\tconst auto &infoMap = controlsInfo.find(&controls::draft::NoiseReductionMode);\n+\t\tconst auto &infoMap = controlsInfo.find(&controls::NoiseReductionMode);\n \t\tif (infoMap != controlsInfo.end()) {\n \t\t\tfor (const auto &value : infoMap->second.values())\n \t\t\t\tdata.push_back(value.get<int32_t>());\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 9bea16e7..3f497be1 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -615,11 +615,11 @@ static const std::map<int32_t, std::string> AwbModeTable = {\n };\n \n static const std::map<int32_t, RPiController::DenoiseMode> DenoiseModeTable = {\n-\t{ controls::draft::NoiseReductionModeOff, RPiController::DenoiseMode::Off },\n-\t{ controls::draft::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast },\n-\t{ controls::draft::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality },\n-\t{ controls::draft::NoiseReductionModeMinimal, RPiController::DenoiseMode::ColourOff },\n-\t{ controls::draft::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality },\n+\t{ controls::NoiseReductionModeOff, RPiController::DenoiseMode::Off },\n+\t{ controls::NoiseReductionModeFast, RPiController::DenoiseMode::ColourFast },\n+\t{ controls::NoiseReductionModeHighQuality, RPiController::DenoiseMode::ColourHighQuality },\n+\t{ controls::NoiseReductionModeRaw, RPiController::DenoiseMode::ColourOff },\n+\t{ controls::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality },\n };\n \n void IPARPi::queueRequest(const ControlList &controls)\n@@ -929,7 +929,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t\t\t * analysis image resolution or format mismatch, we should\n \t\t\t\t * report the status correctly in the metadata.\n \t\t\t\t */\n-\t\t\t\tlibcameraMetadata_.set(controls::draft::NoiseReductionMode, idx);\n+\t\t\t\tlibcameraMetadata_.set(controls::NoiseReductionMode, idx);\n \t\t\t} else {\n \t\t\t\tLOG(IPARPI, Error) << \"Noise reduction mode \" << idx\n \t\t\t\t\t\t << \" not recognised\";\ndiff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex 84679317..84e843b1 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -526,6 +526,50 @@ controls:\n \\todo Define how the sensor timestamp has to be used in the reprocessing\n use case.\n \n+ - NoiseReductionMode:\n+ type: int32_t\n+ description: |\n+ Mode of operation for the noise reduction algorithm.\n+\n+ The noise reduction algorithm attempts to improve image quality by\n+ removing excessive noise added by the capture process, especially in\n+ dark conditions.\n+ enum:\n+ - name: NoiseReductionModeOff\n+ value: 0\n+ description: |\n+ No noise reduction will be applied by the camera device, for\n+ both the raw and YUV domains.\n+ - name: NoiseReductionModeFast\n+ value: 1\n+ description: |\n+ Noise reduction is applied without reducing the frame rate.\n+ This may be the same as Raw if it is listed, or the same as Off if\n+ any noise reduction will slow down the frame rate.\n+ - name: NoiseReductionModeHighQuality\n+ value: 2\n+ description: |\n+ High quality noise reduction at the expense of frame rate.\n+ - name: NoiseReductionModeRaw\n+ value: 3\n+ description: |\n+ Only sensor raw domain basic noise reduction is enabled, to remove\n+ demosaicing or other processing artifacts. Frame rate will not be\n+ reduced.\n+ - name: NoiseReductionModeZSL\n+ value: 4\n+ description: |\n+ Noise reduction is applied at different levels to different streams.\n+\n+ ZSL is meant to be used by applications that maintain a continuous\n+ circular buffer of high-resolution images during preview and\n+ reprocess image(s) from that buffer into a final capture when\n+ triggered by the user. In this mode, the camera device applies\n+ noise reduction to low-resolution streams (below maximum recording\n+ resolution) to maximize preview quality, but does not apply noise\n+ reduction to high-resolution streams, since those will be\n+ reprocessed later if necessary.\n+\n # ----------------------------------------------------------------------------\n # Draft controls section\n \n@@ -572,35 +616,6 @@ controls:\n The camera will cancel any active trigger and the AF routine is\n reset to its initial state.\n \n- - NoiseReductionMode:\n- type: int32_t\n- draft: true\n- description: |\n- Control to select the noise reduction algorithm mode. Currently\n- identical to ANDROID_NOISE_REDUCTION_MODE.\n-\n- Mode of operation for the noise reduction algorithm.\n- enum:\n- - name: NoiseReductionModeOff\n- value: 0\n- description: No noise reduction is applied\n- - name: NoiseReductionModeFast\n- value: 1\n- description: |\n- Noise reduction is applied without reducing the frame rate.\n- - name: NoiseReductionModeHighQuality\n- value: 2\n- description: |\n- High quality noise reduction at the expense of frame rate.\n- - name: NoiseReductionModeMinimal\n- value: 3\n- description: |\n- Minimal noise reduction is applied without reducing the frame rate.\n- - name: NoiseReductionModeZSL\n- value: 4\n- description: |\n- Noise reduction is applied at different levels to different streams.\n-\n - ColorCorrectionAberrationMode:\n type: int32_t\n draft: true\n", "prefixes": [ "libcamera-devel", "v2", "1/3" ] }