Show a patch.

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

{
    "id": 14439,
    "url": "https://patchwork.libcamera.org/api/patches/14439/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14439/",
    "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": "<20211101091510.23204-5-naush@raspberrypi.com>",
    "date": "2021-11-01T09:15:03",
    "name": "[libcamera-devel,v5,04/11] libcamera: bayer_format: Turn BayerFormat::Packing into scoped enum",
    "commit_ref": "364ae3b78d3f0fc18c9bf1c2c3ee9fee1d80e68a",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "5cf6058404dae4f09f2d943dc37e217a987f0d1c",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14439/mbox/",
    "series": [
        {
            "id": 2684,
            "url": "https://patchwork.libcamera.org/api/series/2684/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2684",
            "date": "2021-11-01T09:14:59",
            "name": "Raspberry Pi: Conversion to media controller",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/2684/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14439/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14439/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 3E2D9BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Nov 2021 09:15:21 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8648F60128;\n\tMon,  1 Nov 2021 10:15:20 +0100 (CET)",
            "from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com\n\t[IPv6:2a00:1450:4864:20::42f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4AED60103\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Nov 2021 10:15:16 +0100 (CET)",
            "by mail-wr1-x42f.google.com with SMTP id b12so22728372wrh.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Nov 2021 02:15:16 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6])\n\tby smtp.gmail.com with ESMTPSA id\n\tw10sm13168849wrq.88.2021.11.01.02.15.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Nov 2021 02:15:15 -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=\"I1oLSZxr\"; 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=wPwP+7gLyC1NYrW5yRF6O6abO9wP5U7Ay5h40dfr6kc=;\n\tb=I1oLSZxrFpsdrYEGplp3dFLYqS3RcBsPSGZP+UoQxOwHIWyqamHawbNSOFg7f3yYmC\n\tJSRmAd4VG7Few41zMxUH83NTu8E64uaZUP8JGULx//gXhBITu9qN5CG+Hh0gpyRDa8Hs\n\tFrpfLFoGdhMN50NwBUD4pZAtOqwFtrA07gK1NL5Sf1pVsYCuLy6Pb56HlKyoG2v5JHgb\n\tv3mzU5jnoqOD+81p7tupkTmU7tu2GJ3v4Mua+tbmKnJ7T1gYSmFGPrwSYCSrPsWHlPyi\n\tuL9PMArVcTpiaGXQBV4MnfKi3+9dSd7kiF/g6NMEV6z+jO8Cw3Aa/lMgcM2VPATXTe8k\n\tk3iw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=wPwP+7gLyC1NYrW5yRF6O6abO9wP5U7Ay5h40dfr6kc=;\n\tb=g1McqV9G81EjTX96CKwLsyDcPG6Vy8fA+jKlFgozpUS1AwfrQXRsKtu3iQ+clZFbsz\n\tNILca5k8Oo6GN1zxUmjltdMrMiUu+Ot6Lt9QIlx2Q8YCUzulNKBKdfE5hAplzhkhJz2+\n\t/sipbTcSFiuLzFFuA5CWLWK+ySU/6ckVhvqNaE2jARhWXJCz32hXpDXyyl/cstcFZy5i\n\tnEiMlh3dGYpivRMdqTwznEIadHdVqUVVyEy/lIhGcCPey+Dc2RYXvmvYy/4XdM+OMn2i\n\tzPxSJjoqKetprr1r0C0E1/5T1c9GrCDJApcxaJh98hoZohN7bUcoloqLVP3F2OZimlcd\n\tcDSw==",
        "X-Gm-Message-State": "AOAM5322c5w8YSi1/Hw/I62Q5RAvwGXTjdU/clvqLX01zELNm177IzHB\n\t03AbQ2fGc5XFYZ1ClWYo3yN79nwF0M8RV3sO",
        "X-Google-Smtp-Source": "ABdhPJw9l8l/+Ul+/1YFgAa9YVxymyjKgek7Yf1QyO8e4+ohOP64/GcX3GRWzn6KHKM7UL/FuMF+zw==",
        "X-Received": "by 2002:adf:a152:: with SMTP id\n\tr18mr37053570wrr.317.1635758115881; \n\tMon, 01 Nov 2021 02:15:15 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  1 Nov 2021 09:15:03 +0000",
        "Message-Id": "<20211101091510.23204-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211101091510.23204-1-naush@raspberrypi.com>",
        "References": "<20211101091510.23204-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 04/11] libcamera: bayer_format: Turn\n\tBayerFormat::Packing into scoped enum",
        "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": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThe unscoped enum BayerFormat::Packing leads to usage of the ambiguous\nBayerFormat::None enumerator. Turn the enumeration into a scoped enum to\nforce usage of BayerFormat::Packing::None, and drop the now redundant\n\"Packed\" suffix for the CSI2 and IPU3 packing.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/internal/bayer_format.h |   6 +-\n src/libcamera/bayer_format.cpp            | 138 +++++++++++-----------\n test/bayer-format.cpp                     |  28 ++---\n 3 files changed, 86 insertions(+), 86 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h\nindex 723382d4168d..d9a56d744a25 100644\n--- a/include/libcamera/internal/bayer_format.h\n+++ b/include/libcamera/internal/bayer_format.h\n@@ -27,10 +27,10 @@ public:\n \t\tMONO = 4\n \t};\n \n-\tenum Packing : uint16_t {\n+\tenum class Packing : uint16_t {\n \t\tNone = 0,\n-\t\tCSI2Packed = 1,\n-\t\tIPU3Packed = 2,\n+\t\tCSI2 = 1,\n+\t\tIPU3 = 2,\n \t};\n \n \tconstexpr BayerFormat()\ndiff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp\nindex 11355f144f66..1c1e849a7e31 100644\n--- a/src/libcamera/bayer_format.cpp\n+++ b/src/libcamera/bayer_format.cpp\n@@ -53,11 +53,11 @@ namespace libcamera {\n  * \\enum BayerFormat::Packing\n  * \\brief Different types of packing that can be applied to a BayerFormat\n  *\n- * \\var BayerFormat::None\n+ * \\var BayerFormat::Packing::None\n  * \\brief No packing\n- * \\var BayerFormat::CSI2Packed\n+ * \\var BayerFormat::Packing::CSI2\n  * \\brief Format uses MIPI CSI-2 style packing\n- * \\var BayerFormat::IPU3Packed\n+ * \\var BayerFormat::Packing::IPU3\n  * \\brief Format uses IPU3 style packing\n  */\n \n@@ -85,73 +85,73 @@ struct BayerFormatComparator {\n };\n \n const std::map<BayerFormat, V4L2PixelFormat, BayerFormatComparator> bayerToV4l2{\n-\t{ { BayerFormat::BGGR, 8, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8) },\n-\t{ { BayerFormat::GBRG, 8, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8) },\n-\t{ { BayerFormat::GRBG, 8, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8) },\n-\t{ { BayerFormat::RGGB, 8, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8) },\n-\t{ { BayerFormat::BGGR, 10, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10) },\n-\t{ { BayerFormat::GBRG, 10, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10) },\n-\t{ { BayerFormat::GRBG, 10, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10) },\n-\t{ { BayerFormat::RGGB, 10, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10) },\n-\t{ { BayerFormat::BGGR, 10, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P) },\n-\t{ { BayerFormat::GBRG, 10, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P) },\n-\t{ { BayerFormat::GRBG, 10, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P) },\n-\t{ { BayerFormat::RGGB, 10, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P) },\n-\t{ { BayerFormat::BGGR, 10, BayerFormat::IPU3Packed }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10) },\n-\t{ { BayerFormat::GBRG, 10, BayerFormat::IPU3Packed }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10) },\n-\t{ { BayerFormat::GRBG, 10, BayerFormat::IPU3Packed }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10) },\n-\t{ { BayerFormat::RGGB, 10, BayerFormat::IPU3Packed }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10) },\n-\t{ { BayerFormat::BGGR, 12, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12) },\n-\t{ { BayerFormat::GBRG, 12, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12) },\n-\t{ { BayerFormat::GRBG, 12, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12) },\n-\t{ { BayerFormat::RGGB, 12, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12) },\n-\t{ { BayerFormat::BGGR, 12, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P) },\n-\t{ { BayerFormat::GBRG, 12, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P) },\n-\t{ { BayerFormat::GRBG, 12, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P) },\n-\t{ { BayerFormat::RGGB, 12, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P) },\n-\t{ { BayerFormat::BGGR, 16, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16) },\n-\t{ { BayerFormat::GBRG, 16, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16) },\n-\t{ { BayerFormat::GRBG, 16, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16) },\n-\t{ { BayerFormat::RGGB, 16, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16) },\n-\t{ { BayerFormat::MONO, 8, BayerFormat::None }, V4L2PixelFormat(V4L2_PIX_FMT_GREY) },\n-\t{ { BayerFormat::MONO, 10, BayerFormat::CSI2Packed }, V4L2PixelFormat(V4L2_PIX_FMT_Y10P) },\n+\t{ { BayerFormat::BGGR, 8, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8) },\n+\t{ { BayerFormat::GBRG, 8, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG8) },\n+\t{ { BayerFormat::GRBG, 8, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG8) },\n+\t{ { BayerFormat::RGGB, 8, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB8) },\n+\t{ { BayerFormat::BGGR, 10, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10) },\n+\t{ { BayerFormat::GBRG, 10, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10) },\n+\t{ { BayerFormat::GRBG, 10, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10) },\n+\t{ { BayerFormat::RGGB, 10, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10) },\n+\t{ { BayerFormat::BGGR, 10, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR10P) },\n+\t{ { BayerFormat::GBRG, 10, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG10P) },\n+\t{ { BayerFormat::GRBG, 10, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG10P) },\n+\t{ { BayerFormat::RGGB, 10, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB10P) },\n+\t{ { BayerFormat::BGGR, 10, BayerFormat::Packing::IPU3 }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10) },\n+\t{ { BayerFormat::GBRG, 10, BayerFormat::Packing::IPU3 }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10) },\n+\t{ { BayerFormat::GRBG, 10, BayerFormat::Packing::IPU3 }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10) },\n+\t{ { BayerFormat::RGGB, 10, BayerFormat::Packing::IPU3 }, V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10) },\n+\t{ { BayerFormat::BGGR, 12, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12) },\n+\t{ { BayerFormat::GBRG, 12, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12) },\n+\t{ { BayerFormat::GRBG, 12, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12) },\n+\t{ { BayerFormat::RGGB, 12, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12) },\n+\t{ { BayerFormat::BGGR, 12, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR12P) },\n+\t{ { BayerFormat::GBRG, 12, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P) },\n+\t{ { BayerFormat::GRBG, 12, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P) },\n+\t{ { BayerFormat::RGGB, 12, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P) },\n+\t{ { BayerFormat::BGGR, 16, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16) },\n+\t{ { BayerFormat::GBRG, 16, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16) },\n+\t{ { BayerFormat::GRBG, 16, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16) },\n+\t{ { BayerFormat::RGGB, 16, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16) },\n+\t{ { BayerFormat::MONO, 8, BayerFormat::Packing::None }, V4L2PixelFormat(V4L2_PIX_FMT_GREY) },\n+\t{ { BayerFormat::MONO, 10, BayerFormat::Packing::CSI2 }, V4L2PixelFormat(V4L2_PIX_FMT_Y10P) },\n };\n \n const std::unordered_map<unsigned int, BayerFormat> mbusCodeToBayer{\n-\t{ MEDIA_BUS_FMT_SBGGR8_1X8, { BayerFormat::BGGR, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG8_1X8, { BayerFormat::GBRG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG8_1X8, { BayerFormat::GRBG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB8_1X8, { BayerFormat::RGGB, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, { BayerFormat::BGGR, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, { BayerFormat::GBRG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, { BayerFormat::GRBG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, { BayerFormat::RGGB, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, { BayerFormat::BGGR, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, { BayerFormat::GBRG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, { BayerFormat::GRBG, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, { BayerFormat::RGGB, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, { BayerFormat::BGGR, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, { BayerFormat::BGGR, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, { BayerFormat::BGGR, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, { BayerFormat::BGGR, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR10_1X10, { BayerFormat::BGGR, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG10_1X10, { BayerFormat::GBRG, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG10_1X10, { BayerFormat::GRBG, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB10_1X10, { BayerFormat::RGGB, 10, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR12_1X12, { BayerFormat::BGGR, 12, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG12_1X12, { BayerFormat::GBRG, 12, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG12_1X12, { BayerFormat::GRBG, 12, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB12_1X12, { BayerFormat::RGGB, 12, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR14_1X14, { BayerFormat::BGGR, 14, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG14_1X14, { BayerFormat::GBRG, 14, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG14_1X14, { BayerFormat::GRBG, 14, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB14_1X14, { BayerFormat::RGGB, 14, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SBGGR16_1X16, { BayerFormat::BGGR, 16, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGBRG16_1X16, { BayerFormat::GBRG, 16, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SGRBG16_1X16, { BayerFormat::GRBG, 16, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_SRGGB16_1X16, { BayerFormat::RGGB, 16, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_Y8_1X8, { BayerFormat::MONO, 8, BayerFormat::None } },\n-\t{ MEDIA_BUS_FMT_Y10_1X10, { BayerFormat::MONO, 10, BayerFormat::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR8_1X8, { BayerFormat::BGGR, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG8_1X8, { BayerFormat::GBRG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG8_1X8, { BayerFormat::GRBG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB8_1X8, { BayerFormat::RGGB, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, { BayerFormat::BGGR, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, { BayerFormat::GBRG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, { BayerFormat::GRBG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, { BayerFormat::RGGB, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, { BayerFormat::BGGR, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, { BayerFormat::GBRG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, { BayerFormat::GRBG, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, { BayerFormat::RGGB, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, { BayerFormat::BGGR, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, { BayerFormat::BGGR, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, { BayerFormat::BGGR, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, { BayerFormat::BGGR, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR10_1X10, { BayerFormat::BGGR, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG10_1X10, { BayerFormat::GBRG, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG10_1X10, { BayerFormat::GRBG, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB10_1X10, { BayerFormat::RGGB, 10, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR12_1X12, { BayerFormat::BGGR, 12, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG12_1X12, { BayerFormat::GBRG, 12, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG12_1X12, { BayerFormat::GRBG, 12, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB12_1X12, { BayerFormat::RGGB, 12, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR14_1X14, { BayerFormat::BGGR, 14, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG14_1X14, { BayerFormat::GBRG, 14, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG14_1X14, { BayerFormat::GRBG, 14, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB14_1X14, { BayerFormat::RGGB, 14, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SBGGR16_1X16, { BayerFormat::BGGR, 16, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGBRG16_1X16, { BayerFormat::GBRG, 16, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SGRBG16_1X16, { BayerFormat::GRBG, 16, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_SRGGB16_1X16, { BayerFormat::RGGB, 16, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_Y8_1X8, { BayerFormat::MONO, 8, BayerFormat::Packing::None } },\n+\t{ MEDIA_BUS_FMT_Y10_1X10, { BayerFormat::MONO, 10, BayerFormat::Packing::None } },\n };\n \n } /* namespace */\n@@ -214,9 +214,9 @@ std::string BayerFormat::toString() const\n \n \tresult += \"-\" + std::to_string(bitDepth);\n \n-\tif (packing == CSI2Packed)\n+\tif (packing == Packing::CSI2)\n \t\tresult += \"-CSI2P\";\n-\telse if (packing == IPU3Packed)\n+\telse if (packing == Packing::IPU3)\n \t\tresult += \"-IPU3P\";\n \n \treturn result;\ndiff --git a/test/bayer-format.cpp b/test/bayer-format.cpp\nindex e396ee83ca91..135bcb5214c8 100644\n--- a/test/bayer-format.cpp\n+++ b/test/bayer-format.cpp\n@@ -30,7 +30,7 @@ protected:\n \t\t}\n \n \t\t/* A correct Bayer format has to be valid. */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tif (!bayerFmt.isValid()) {\n \t\t\tcerr << \"A correct BayerFormat has to be valid.\"\n \t\t\t     << endl;\n@@ -41,9 +41,9 @@ protected:\n \t\t * Two bayer formats created with the same order and bit depth\n \t\t * have to be equal.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tBayerFormat bayerFmtExpect = BayerFormat(BayerFormat::BGGR, 8,\n-\t\t\t\t\t\t\t BayerFormat::None);\n+\t\t\t\t\t\t\t BayerFormat::Packing::None);\n \t\tif (bayerFmt != bayerFmtExpect) {\n \t\t\tcerr << \"Comparison of identical formats failed.\"\n \t\t\t     << endl;\n@@ -54,9 +54,9 @@ protected:\n \t\t * Two Bayer formats created with the same order but with a\n \t\t * different bitDepth are not equal.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tbayerFmtExpect = BayerFormat(BayerFormat::BGGR, 12,\n-\t\t\t\t\t     BayerFormat::None);\n+\t\t\t\t\t     BayerFormat::Packing::None);\n \t\tif (bayerFmt == bayerFmtExpect) {\n \t\t\tcerr << \"Comparison of different formats failed.\"\n \t\t\t     << endl;\n@@ -96,7 +96,7 @@ protected:\n \t\t * to a Bayer format.\n \t\t */\n \t\tbayerFmtExpect = BayerFormat(BayerFormat::BGGR, 8,\n-\t\t\t\t\t     BayerFormat::None);\n+\t\t\t\t\t     BayerFormat::Packing::None);\n \t\tv4l2Fmt = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8);\n \t\tbayerFmt = BayerFormat::fromV4L2PixelFormat(v4l2Fmt);\n \t\tif (bayerFmt != bayerFmtExpect) {\n@@ -123,7 +123,7 @@ protected:\n \t\t * Test if a valid Bayer format can be converted to a\n \t\t * string representation.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tif (bayerFmt.toString() != \"BGGR-8\") {\n \t\t\tcerr << \"String representation != 'BGGR-8' (got: '\"\n \t\t\t     << bayerFmt.toString() << \"' ) \" << endl;\n@@ -145,9 +145,9 @@ protected:\n \t\t * Perform a horizontal Flip and make sure that the\n \t\t * order is adjusted accordingly.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tbayerFmtExpect = BayerFormat(BayerFormat::GBRG, 8,\n-\t\t\t\t\t     BayerFormat::None);\n+\t\t\t\t\t     BayerFormat::Packing::None);\n \t\tBayerFormat hFlipFmt = bayerFmt.transform(Transform::HFlip);\n \t\tif (hFlipFmt != bayerFmtExpect) {\n \t\t\tcerr << \"Horizontal flip of 'BGGR-8' should result in '\"\n@@ -160,9 +160,9 @@ protected:\n \t\t * Perform a vertical Flip and make sure that\n \t\t * the order is adjusted accordingly.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tbayerFmtExpect = BayerFormat(BayerFormat::GRBG, 8,\n-\t\t\t\t\t     BayerFormat::None);\n+\t\t\t\t\t     BayerFormat::Packing::None);\n \t\tBayerFormat vFlipFmt = bayerFmt.transform(Transform::VFlip);\n \t\tif (vFlipFmt != bayerFmtExpect) {\n \t\t\tcerr << \"Vertical flip of 'BGGR-8' should result in '\"\n@@ -176,7 +176,7 @@ protected:\n \t\t * pixels on the bottom left to top right diagonal and make\n \t\t * sure, that it doesn't change.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::BGGR, 8, BayerFormat::Packing::None);\n \t\tBayerFormat transposeFmt = bayerFmt.transform(\n \t\t\tTransform::Transpose);\n \t\tif (transposeFmt != bayerFmt) {\n@@ -192,9 +192,9 @@ protected:\n \t\t * on the bottom left to top right diagonal and make sure\n \t\t * that their positions are switched.\n \t\t */\n-\t\tbayerFmt = BayerFormat(BayerFormat::GBRG, 8, BayerFormat::None);\n+\t\tbayerFmt = BayerFormat(BayerFormat::GBRG, 8, BayerFormat::Packing::None);\n \t\tbayerFmtExpect = BayerFormat(BayerFormat::GRBG, 8,\n-\t\t\t\t\t     BayerFormat::None);\n+\t\t\t\t\t     BayerFormat::Packing::None);\n \t\ttransposeFmt = bayerFmt.transform(Transform::Transpose);\n \t\tif (transposeFmt != bayerFmtExpect) {\n \t\t\tcerr << \"Transpose with the red & blue pixels on the \"\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "04/11"
    ]
}