Patch Detail
Show a patch.
GET /api/1.1/patches/13819/?format=api
{ "id": 13819, "url": "https://patchwork.libcamera.org/api/1.1/patches/13819/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13819/", "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": "<20210913102007.2303225-1-paul.elder@ideasonboard.com>", "date": "2021-09-13T10:20:05", "name": "[libcamera-devel,1/3] controls: Promote NoiseReductionMode to non-draft", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8eaeae109bc34decc665a9149a24aecc11bb37eb", "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/13819/mbox/", "series": [ { "id": 2521, "url": "https://patchwork.libcamera.org/api/1.1/series/2521/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2521", "date": "2021-09-13T10:20:05", "name": "[libcamera-devel,1/3] controls: Promote NoiseReductionMode to non-draft", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2521/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13819/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13819/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 2A717BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Sep 2021 10:20:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76D7C69182;\n\tMon, 13 Sep 2021 12:20:22 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F1C66024C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Sep 2021 12:20:21 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C0EF8F;\n\tMon, 13 Sep 2021 12:20:19 +0200 (CEST)" ], "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=\"M4Fwc+cT\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631528420;\n\tbh=AQw5DDVAVz4zxHJihUaIHlq0ipyX5Ejdb8XWiawuUIE=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=M4Fwc+cTsKTqGZaDgXGp2kwZjDiQNUPmxjyXlf7Ef3FIN8HsRPOvIgxFFgImEr9TR\n\tztuLLnYm4MXZj6xEbt8/WGQViCfH3JeLcp4xGwaTdToDuqu+joFZx3qV4X3W2E6x9U\n\tp+NEl5S4paPD8beHRRTLN0PgPJTZCYLnlXtu3XzU=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 13 Sep 2021 19:20:05 +0900", "Message-Id": "<20210913102007.2303225-1-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/3] controls: Promote NoiseReductionMode\n\tto 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 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 521eaecd..e0dc6f5e 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -45,7 +45,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 e92bca42..08e44a1a 100644\n--- a/src/android/camera_capabilities.cpp\n+++ b/src/android/camera_capabilities.cpp\n@@ -1175,7 +1175,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 047123ab..8d44ab0a 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -605,11 +605,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::NoiseReductionModeMinimal, RPiController::DenoiseMode::ColourOff },\n+\t{ controls::NoiseReductionModeZSL, RPiController::DenoiseMode::ColourHighQuality },\n };\n \n void IPARPi::queueRequest(const ControlList &controls)\n@@ -898,7 +898,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 9d4638ae..fffcca2d 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -381,6 +381,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@@ -427,35 +471,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", "1/3" ] }