Show a patch.

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

{
    "id": 18682,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18682/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18682/",
    "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": "<20230602132358.16314-2-naush@raspberrypi.com>",
    "date": "2023-06-02T13:23:57",
    "name": "[libcamera-devel,v2,1/2] camera_sensor: ipa: core: Add CFA pattern to IPACameraSensorInfo",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d4183622e1f6308b43312159f04cf73a8fd9a446",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18682/mbox/",
    "series": [
        {
            "id": 3902,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3902/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3902",
            "date": "2023-06-02T13:23:56",
            "name": "Mono sensor improvements",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3902/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18682/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18682/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 945FDC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Jun 2023 13:24:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E037E627B7;\n\tFri,  2 Jun 2023 15:24:05 +0200 (CEST)",
            "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AB826626FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Jun 2023 15:24:03 +0200 (CEST)",
            "by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-3f6dfc4e01fso20760855e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 02 Jun 2023 06:24:03 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tv6-20020a1cf706000000b003f4ddde398csm1962863wmh.21.2023.06.02.06.24.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 02 Jun 2023 06:24:02 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685712245;\n\tbh=ynXcv4Qb+p5lSh7D2ADhxWzIulk4MHPF0+UdsafwDzY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=xzQq57X4LUCu7Q98qwG+A0NbtgXnnHIWF6CpBeVY4ZXCj5ci27JNBwcO9KNJb0Fb3\n\tgvgXwB3l9l06G9abOvrtNUpzWzXx5i2QNnJtANZq2FO3QnfZFetTR45cUEl00pmxFM\n\tWZsjCPZlNNFaaBZi7CIlVD1XTjHbL0XUOSAyADgfA4MT/ypLY/nVN+UYr1jFZVP+/P\n\tOK+lgRNvJ0jVl4JoJhBrQ5hyhEJqdpYJD6KVMHYslsT9oDQnq86jvw5v8WbAm0vNFQ\n\tsH3Ldw1nho2VuTXzgWYt2o38adIxUc79K0cJ1H+AmUwChXNh8eeN4BTv3N4v6vKZrs\n\tZbkhYmXIcmX4g==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1685712243; x=1688304243;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=opMyWvUtv91kRAWjXfgo6VhVCMMQIQtCgxUQE3X/rw0=;\n\tb=iHAB8qnAbWhkVeXdmYEg8yXE4KPN5GDyb1/vd7KXkqZUOOmxmJug8p7No0QUcfV7jj\n\tM7em7v7g4XJnOYC3oo1i4wzicAKFnSJlEgplkXtHpW0XZSrpZGNHHo7utx3qgF2kZNap\n\tVJqn0nDHUJmYwmw+HRF2m2DNjBJMroL7E10lCo5GpBXYM9d6m06AGUcUFhnpQk4bpzta\n\tuEJMdvx4pGFrG/8KcirsICDmNwt4FX7XnB9fFTSbcGyrerfcL2HywYoNDfKngS0xkZFf\n\tgiYQQ90M/tzYBWy0XxHB73az4LFh9yLiPc3XtQ6K7erzY+PKL4m/UKl74CLhdLSsKX44\n\tA9fg=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"iHAB8qnA\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1685712243; x=1688304243;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=opMyWvUtv91kRAWjXfgo6VhVCMMQIQtCgxUQE3X/rw0=;\n\tb=fZ5PphyrD8ebxApYi1RCdfPpf2PDlLA8MWdK+kpAPE8o19aIzLwbNeedoP0qdvTv/b\n\tcLCs1PuxVgYASPLllvBMMqsjJugpTZe8kYvw0rPUfPePsV3yC5K69Q6bB9XZXrtjLTTF\n\tu/5M0SbGV5HG6SANWVmVP4eP2eG/zOe0NukcBSwoETd6/TPMMkFVAWwjfnddnyUt9+ad\n\tT/psakYSeiQRyTBUSjwa6C3tPLDr+DPRzFTETAqwpn2T+gGmStdLNQAknahxyZFEuVMC\n\tF0EpR6+Zzt/rqjYo88f5ry0Wokcz8J1vcVHdojkTE5fZZPQGOXQryu5hVODr/Ju+uFnD\n\t2pQQ==",
        "X-Gm-Message-State": "AC+VfDztg+0HoV0brWDclKFeGxcr7PaBwSGht4IoPkCpuzE11jsvFNN0\n\tDF4Eopv+UpCmfb/3VklpCZ3IuHou7LAGR8yOewEpLQ==",
        "X-Google-Smtp-Source": "ACHHUZ5Di3RIaBW+xFHMf8bgzxoyDghdg+7wh4UipbAOLPCj3blyY84Gf+OMgNpu2N4PeluI3jlbeg==",
        "X-Received": "by 2002:adf:ee49:0:b0:30a:e369:5aca with SMTP id\n\tw9-20020adfee49000000b0030ae3695acamr4252306wro.25.1685712243024; \n\tFri, 02 Jun 2023 06:24:03 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  2 Jun 2023 14:23:57 +0100",
        "Message-Id": "<20230602132358.16314-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20230602132358.16314-1-naush@raspberrypi.com>",
        "References": "<20230602132358.16314-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 1/2] camera_sensor: ipa: core: Add CFA\n\tpattern to IPACameraSensorInfo",
        "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>",
        "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add a new cfaPattern field to the IPACameraSensorInfo to pass the\nCFA/Bayer pattern for the current sensor configuration to the IPA.\nThis field takes a value from properties::draft::ColorFilterArrangementEnum.\n\nPopulate cfaPattern in CameraSensor::sensorInfo(), called by the\npipeline handler before it calls ipa->init() and ipa->config().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/core.mojom | 10 ++++++++++\n src/libcamera/camera_sensor.cpp  |  3 +++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom\nindex 5cef340d014c..af02efacf335 100644\n--- a/include/libcamera/ipa/core.mojom\n+++ b/include/libcamera/ipa/core.mojom\n@@ -140,6 +140,15 @@ module libcamera;\n  * image sensor\n  */\n \n+/**\n+ * \\var IPACameraSensorInfo::cfaPattern\n+ * \\brief The arrangement of colour filters on the image sensor\n+ *\n+ * This takes a value defined by properties::draft::ColorFilterArrangementEnum.\n+ * For non-Bayer colour sensors, the cfaPattern will be set to\n+ * properties::draft::ColorFilterArrangementEnum::RGB.\n+ */\n+\n /**\n  * \\var IPACameraSensorInfo::activeAreaSize\n  * \\brief The size of the pixel array active area of the sensor\n@@ -229,6 +238,7 @@ struct IPACameraSensorInfo {\n \tstring model;\n \n \tuint32 bitsPerPixel;\n+\tuint32 cfaPattern;\n \n \tSize activeAreaSize;\n \tRectangle analogCrop;\ndiff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex 06f315210240..60bf87b49e6e 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -956,6 +956,9 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const\n \tinfo->bitsPerPixel = format.bitsPerPixel();\n \tinfo->outputSize = format.size;\n \n+\tstd::optional<int32_t> cfa = properties_.get(properties::draft::ColorFilterArrangement);\n+\tinfo->cfaPattern = cfa ? *cfa : properties::draft::RGB;\n+\n \t/*\n \t * Retrieve the pixel rate, line length and minimum/maximum frame\n \t * duration through V4L2 controls. Support for the V4L2_CID_PIXEL_RATE,\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/2"
    ]
}