Show a patch.

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

{
    "id": 14380,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14380/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14380/",
    "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": "<20211028084646.453775-5-naush@raspberrypi.com>",
    "date": "2021-10-28T08:46:40",
    "name": "[libcamera-devel,v4,04/10] libcamera: bayer_format: Turn BayerFormat::Packing into scoped enum",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5cf6058404dae4f09f2d943dc37e217a987f0d1c",
    "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/14380/mbox/",
    "series": [
        {
            "id": 2671,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2671/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2671",
            "date": "2021-10-28T08:46:36",
            "name": "Raspberry Pi: Conversion to media controller",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2671/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14380/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14380/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 81FAFBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Oct 2021 08:47:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3AC736032A;\n\tThu, 28 Oct 2021 10:47:03 +0200 (CEST)",
            "from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3DD26600BC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 10:46:56 +0200 (CEST)",
            "by mail-wr1-x434.google.com with SMTP id m22so8882630wrb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Oct 2021 01:46:56 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:b894:feb0:b828:13b])\n\tby smtp.gmail.com with ESMTPSA id\n\tz2sm1955281wmk.19.2021.10.28.01.46.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 28 Oct 2021 01:46:55 -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=\"sRDZGtvD\"; 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=E+T1sqoCBrKwmoWpdxQHkpnxUQbwOn0Nnp6oELzP6YA=;\n\tb=sRDZGtvD4gO1B5AVOVdkhDao6YEn+A+kGV0LKVe0/r6dAWjDkgMmmAHrm7RTS4JRTt\n\tVQEOn8zQT+BOJ6ehoE72nBJsSN1mrx6MdUHydEtZ3OyYrFovDURRbP4M6aElPd5GEvdg\n\tzNXG+UyKhbSiRnJHkc2RF53vxPOY7gzLY+tfrZQZLmQrSCwvUPu5VeOlzvj2imdD175p\n\tVYVDNPBzn3LRymUz+UaIWK5zPDQZp/lzmRXm3Asg7RXNjCpB5QqEiNxtrtPYkrpv5cda\n\tqKM5J/n/ZXKv+P/mxoAMz1aIHE88a9OwJwAQPFhJ2iwO7UnALIA9OI7OUL7eNfvcceMc\n\tUgNw==",
        "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=E+T1sqoCBrKwmoWpdxQHkpnxUQbwOn0Nnp6oELzP6YA=;\n\tb=09/xrSU0NSYKsRHZKuy12q1E3ec2s782Jn0Qlayg8wojKbdBV/wFQjRMDTEddKd5XJ\n\t8RojgR2UZzXy6ZDIjnad/em4Ju0kQoC00ptExizvHSRFIQbKAKROV4D/spj4iMYhUIHF\n\tONGjkMF1FeqqN7mXbd93d1gCexr0YXQUDtOM6gJ+630IBKW0XoMJeWqgCSLCkyyFwPpK\n\tkR7lQayGHp/HG2jdoLG+7m521mnXNBklnnIsqE6nbOjVsUZXX/PscNfrYFYMU+oEngPW\n\tJYtA+bsikFvCDdonkz8iaNg+6ovfLAIudy/QQopSqp8zaPnJGBuOu2eYVQc/2gWA/ffh\n\tw4DQ==",
        "X-Gm-Message-State": "AOAM531ZH4EhQHoPEBZx8YbEb1/ulM1sR3XRbKDpb2VDuBR92mLUhbj0\n\trgYy60tLewSEhp8aryXGb3Jpb3Y4KPHQ4zy+",
        "X-Google-Smtp-Source": "ABdhPJzUWCLf0kbgXmltBm5jfNhdRe/SObJ4hr7OtcrUi6dM3Pwgft64+7vGvieLQgkySYI7WTCUKA==",
        "X-Received": "by 2002:a5d:4882:: with SMTP id g2mr3738069wrq.399.1635410815507;\n\tThu, 28 Oct 2021 01:46:55 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 28 Oct 2021 09:46:40 +0100",
        "Message-Id": "<20211028084646.453775-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211028084646.453775-1-naush@raspberrypi.com>",
        "References": "<20211028084646.453775-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 04/10] 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-off-by: Naushir Patuck <naush@raspberrypi.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",
        "v4",
        "04/10"
    ]
}