Show a patch.

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

{
    "id": 8619,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/8619/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8619/",
    "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": "<20200704095914.17344-3-david.plowman@raspberrypi.com>",
    "date": "2020-07-04T09:59:13",
    "name": "[libcamera-devel,2/3] libcamera: raspberrypi: Add ColourCorrectionMatrix control",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f2dd829e86382ee64ead2456b096d01ef10043f3",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/8619/mbox/",
    "series": [
        {
            "id": 1082,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1082/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1082",
            "date": "2020-07-04T09:59:11",
            "name": "ColourCorrectionMatrixControl",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1082/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8619/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8619/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 3FEC8BD794\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  4 Jul 2020 09:59:28 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B1CF860DFA;\n\tSat,  4 Jul 2020 11:59:27 +0200 (CEST)",
            "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 66FDE609C7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  4 Jul 2020 11:59:26 +0200 (CEST)",
            "by mail-wm1-x32e.google.com with SMTP id a6so23767383wmm.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 04 Jul 2020 02:59:26 -0700 (PDT)",
            "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tz10sm11477681wrm.21.2020.07.04.02.59.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 04 Jul 2020 02:59:25 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Mpsb9vD6\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=GFh3wkDdONKwREfYhfL0pB5YOH4zlaqiZUR/aVLv/zk=;\n\tb=Mpsb9vD6lJqDCYsb0/oBdy8+Pk9DR+hGeYjQ82OlMl/xCknvJ9j+6LKQ3KqxBcuP3N\n\tpJIHXGn3CzqQYSQMXNTNTNU3Z9cA2vVFsXxp5aciK+mZTVgpbMGUk9LIKY+hF6nHoi6O\n\t8d7h6Bqdcou7msu2xs6FVVhHJTbZnmapzKpZ/nzIr7DsIcEXz5wBngt8RPaCHdXrLeyH\n\tuYyRogPjpOe/QyHe1WY+QgQbIxGtIQC+S8GKjQCQ4tev58a4Llnu/ONmOAqLznKGcSH7\n\t2XgQ/HIqsKuUfu5oBHhAqo7rczE55j+7rQukNFZl3P7Mj6soBW/zysHDswSu14bxtejv\n\ttA9g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=GFh3wkDdONKwREfYhfL0pB5YOH4zlaqiZUR/aVLv/zk=;\n\tb=BtGRHyMiBUp9bN5jjwN88Mf5mUglttAllGiq7xFMZXeGir3kyI6ARBcqmqS5guW7hi\n\tsbaIiCta0tbCpzK9I9ApuYMTFD6ANNhw+uXAfJl6ciEgh5pr/8lpC81q/HPZZ4ljTb5N\n\tv34549PpwcapSlMRz8OPXtnxYeEMYasJDCRjrNT1q1CYMCYXLCX7SYaIsGdGgSZ2m29P\n\tTRx+iSEejwkZvB8Pzu8TElMaTNils8kgd3F/H31OT267LbTQyfV6rbqHJ30NoiqkSKlR\n\tu7IbGuA9OjHnhrXr/xww7O5n7KxRXGB4ZyRh9qSRY0tg7jpPYJRmdIFumAo/PVeYUFkV\n\txBKg==",
        "X-Gm-Message-State": "AOAM5337Hs7xB0unXWn42c4+YrRSFr2fISx0tQOFD7ONdFYUHVcjEPpV\n\teUJgw1vPW6bc7T437hqBXj3+LWgmyew=",
        "X-Google-Smtp-Source": "ABdhPJzkhS7h8202DUxGPksfJCthQ1ZZFl1X86ROwef/JK0BAlV6crSw7uj2FPXVWlN3iUblpsevag==",
        "X-Received": "by 2002:a1c:f714:: with SMTP id\n\tv20mr39337667wmh.81.1593856765577; \n\tSat, 04 Jul 2020 02:59:25 -0700 (PDT)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  4 Jul 2020 10:59:13 +0100",
        "Message-Id": "<20200704095914.17344-3-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200704095914.17344-1-david.plowman@raspberrypi.com>",
        "References": "<20200704095914.17344-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 2/3] libcamera: raspberrypi: Add\n\tColourCorrectionMatrix control",
        "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": "Implements, for the Raspberry Pi platform, the returning of the CCM\n(Colour Correction Matrix) used by the pipeline in the libcamera\nmetadata.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.h | 1 +\n src/ipa/raspberrypi/raspberrypi.cpp | 9 +++++++++\n 2 files changed, 10 insertions(+)",
    "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex a18ce9a..2682319 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -52,6 +52,7 @@ static const ControlInfoMap RPiControls = {\n \t{ &controls::Contrast, ControlInfo(0.0f, 32.0f) },\n \t{ &controls::Saturation, ControlInfo(0.0f, 32.0f) },\n \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n+\t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n };\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex bc89ab5..592bb04 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -404,6 +404,15 @@ void IPARPi::reportMetadata()\n \t\t\t\t\t static_cast<int32_t>(blackLevelStatus->black_level_g),\n \t\t\t\t\t static_cast<int32_t>(blackLevelStatus->black_level_g),\n \t\t\t\t\t static_cast<int32_t>(blackLevelStatus->black_level_b) });\n+\n+\tCcmStatus *ccmStatus = rpiMetadata_.GetLocked<CcmStatus>(\"ccm.status\");\n+\tif (ccmStatus) {\n+\t\tfloat m[9];\n+\t\tint i;\n+\t\tfor (i = 0; i < 9; i++)\n+\t\t\tm[i] = ccmStatus->matrix[i];\n+\t\tlibcameraMetadata_.set(controls::ColourCorrectionMatrix, m);\n+\t}\n }\n \n /*\n",
    "prefixes": [
        "libcamera-devel",
        "2/3"
    ]
}