Show a patch.

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

{
    "id": 11118,
    "url": "https://patchwork.libcamera.org/api/patches/11118/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11118/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20210203162600.206297-2-jacopo@jmondi.org>",
    "date": "2021-02-03T16:25:54",
    "name": "[libcamera-devel,1/7] android: camera_device: Report COLOR_CORRECTION_ABERRATION_MODE",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "80d4d6a7df5a82dabc0ebfa121ee16c8cad7dc31",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11118/mbox/",
    "series": [
        {
            "id": 1645,
            "url": "https://patchwork.libcamera.org/api/series/1645/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1645",
            "date": "2021-02-03T16:25:53",
            "name": "android: Report all the missing metadata tags",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1645/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11118/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11118/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 22E7CBD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Feb 2021 16:25:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 573B968453;\n\tWed,  3 Feb 2021 17:25:45 +0100 (CET)",
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E660E683FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Feb 2021 17:25:43 +0100 (CET)",
            "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id B6655200011\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Feb 2021 16:25:43 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  3 Feb 2021 17:25:54 +0100",
        "Message-Id": "<20210203162600.206297-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210203162600.206297-1-jacopo@jmondi.org>",
        "References": "<20210203162600.206297-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 1/7] android: camera_device: Report\n\tCOLOR_CORRECTION_ABERRATION_MODE",
        "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": "The CaptureResultTest#testCameraCaptureResultAllKeys enforces the\npresence of the ANDROID_COLOR_CORRECTION_ABERRATION_MODE result\nmetadata.\n\nReport the only supported value of\nANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex a50b0ebfe60e..02908beb867e 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -708,7 +708,7 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()\n \t * Currently: 53 entries, 846 bytes of static metadata\n \t */\n \tuint32_t numEntries = 53;\n-\tuint32_t byteSize = 846;\n+\tuint32_t byteSize = 850;\n \n \t/*\n \t * Calculate space occupation in bytes for dynamically built metadata\n@@ -1243,6 +1243,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \t\t\t\t  availableRequestKeys.size());\n \n \tstd::vector<int32_t> availableResultKeys = {\n+\t\tANDROID_COLOR_CORRECTION_ABERRATION_MODE,\n \t\tANDROID_CONTROL_AE_ANTIBANDING_MODE,\n \t\tANDROID_CONTROL_AE_LOCK,\n \t\tANDROID_CONTROL_AE_MODE,\n@@ -1960,7 +1961,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \t * Total bytes for JPEG metadata: 82\n \t */\n \tstd::unique_ptr<CameraMetadata> resultMetadata =\n-\t\tstd::make_unique<CameraMetadata>(40, 156);\n+\t\tstd::make_unique<CameraMetadata>(41, 157);\n \tif (!resultMetadata->isValid()) {\n \t\tLOG(HAL, Error) << \"Failed to allocate static metadata\";\n \t\treturn nullptr;\n@@ -1972,7 +1973,11 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \t * from libcamera::Request::metadata.\n \t */\n \n-\tuint8_t value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;\n+\tuint8_t value = ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF;\n+\tresultMetadata->addEntry(ANDROID_COLOR_CORRECTION_ABERRATION_MODE,\n+\t\t\t\t &value, 1);\n+\n+\tvalue = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;\n \tresultMetadata->addEntry(ANDROID_CONTROL_AE_ANTIBANDING_MODE, &value, 1);\n \n \tvalue = ANDROID_CONTROL_AE_LOCK_OFF;\n",
    "prefixes": [
        "libcamera-devel",
        "1/7"
    ]
}