Show a patch.

GET /api/1.1/patches/11809/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 11809,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11809/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11809/",
    "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": "<20210401101340.160590-4-paul.elder@ideasonboard.com>",
    "date": "2021-04-01T10:13:35",
    "name": "[libcamera-devel,RFC,3/8] android: camera_device: Add separate template for still capture",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "cfaefdec9f6fd968ba2adc58bafe50d6baf30740",
    "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/11809/mbox/",
    "series": [
        {
            "id": 1878,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1878/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1878",
            "date": "2021-04-01T10:13:32",
            "name": "android: First set of FULL fixes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1878/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11809/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11809/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 04241C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  1 Apr 2021 10:14:01 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B786568783;\n\tThu,  1 Apr 2021 12:14:00 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7018668782\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  1 Apr 2021 12:13:59 +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 DA7C9527;\n\tThu,  1 Apr 2021 12:13:57 +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=\"SRiK8O9y\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1617272039;\n\tbh=Isxq6lyRGOGt+hyfbIAxaBP1CCH2NClRWPhXvUlbB7Q=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SRiK8O9yjHvsjuFy+bxlZ1YtI7eyW67yX6HwNGSBuqWgKqvS9PExSBM/omfOdq3PO\n\tsnreGUdVpEcIN8G76V7ONHOatWp529jBgPHVveARHeNleScw0sZWQ9bLn1lxvfM/1O\n\tDEEtfgiYgK55yobYiWM47w28gp6tcCwVxicke1iQ=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  1 Apr 2021 19:13:35 +0900",
        "Message-Id": "<20210401101340.160590-4-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210401101340.160590-1-paul.elder@ideasonboard.com>",
        "References": "<20210401101340.160590-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [RFC PATCH 3/8] android: camera_device: Add\n\tseparate template for still capture",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a separate template for still capture, so that we can set the noise\nreduction mode to high quality, as hardware level FULL requires this.\n\nThis is part of a fix to allow the following CTS test to pass:\n- android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceStillTemplate\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_device.cpp | 23 ++++++++++++++++++-----\n src/android/camera_device.h   |  1 +\n 2 files changed, 19 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 30ea3ade..ded57649 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1479,6 +1479,23 @@ std::unique_ptr<CameraMetadata> CameraDevice::requestTemplateVideo()\n \treturn previewTemplate;\n }\n \n+std::unique_ptr<CameraMetadata> CameraDevice::requestTemplateStill()\n+{\n+\tstd::unique_ptr<CameraMetadata> previewTemplate = requestTemplatePreview();\n+\tif (!previewTemplate)\n+\t\treturn nullptr;\n+\n+\t/*\n+\t * The still template with FULL requires the noise reduction mode to be\n+\t * HIGH_QUALITY.\n+\t */\n+\tuint8_t noiseReduction = ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY;\n+\tpreviewTemplate->updateEntry(ANDROID_NOISE_REDUCTION_MODE,\n+\t\t\t\t     &noiseReduction, 1);\n+\n+\treturn previewTemplate;\n+}\n+\n /*\n  * Produce a metadata pack to be used as template for a capture request.\n  */\n@@ -1497,12 +1514,8 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)\n \t\trequestTemplate = requestTemplatePreview();\n \t\tbreak;\n \tcase CAMERA3_TEMPLATE_STILL_CAPTURE:\n-\t\t/*\n-\t\t * Use the preview template for still capture, they only differ\n-\t\t * for the torch mode we currently do not support.\n-\t\t */\n \t\tcaptureIntent = ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE;\n-\t\trequestTemplate = requestTemplatePreview();\n+\t\trequestTemplate = requestTemplateStill();\n \t\tbreak;\n \tcase CAMERA3_TEMPLATE_VIDEO_RECORD:\n \t\tcaptureIntent = ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD;\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex 11bdfec8..388acf51 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -99,6 +99,7 @@ private:\n \tvoid notifyError(uint32_t frameNumber, camera3_stream_t *stream);\n \tstd::unique_ptr<CameraMetadata> requestTemplatePreview();\n \tstd::unique_ptr<CameraMetadata> requestTemplateVideo();\n+\tstd::unique_ptr<CameraMetadata> requestTemplateStill();\n \tlibcamera::PixelFormat toPixelFormat(int format) const;\n \tint processControls(Camera3RequestDescriptor *descriptor);\n \tstd::unique_ptr<CameraMetadata> getResultMetadata(\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "3/8"
    ]
}