From patchwork Fri Oct 23 10:58:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28572 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2951BC324C for ; Fri, 23 Oct 2026 10:58:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB60E68FB0; Fri, 23 Oct 2026 12:58:54 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iR7vElPb"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 23EB368F9F for ; Fri, 23 Oct 2026 12:58:53 +0200 (CEST) Received: from mail.ideasonboard.com (unknown [IPv6:2401:4900:1c30:59f6:be2b:2877:6bc4:392]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A60E11E4; Fri, 23 Oct 2026 12:56:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1792753004; bh=BJYrZL4jXrC03mirIhEf3pzbHmaS9D7KZCDY22Gv3mc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iR7vElPbjgXQyO0uTszJlkoAafpBvuwLaBM3S+YvuQXd206bpJ2xERNmyeXr6FwZV xIf8pXyimfO3d3iKVKFpxj+T7DapW1zlXaVOBS+onboayBhH9CXNhdeIUwyEY1GIbZ IF6ed9zcipls04bzniTrOro6wRLiMGnAnSL0OhjM= From: Jai Luthra Date: Fri, 23 Oct 2026 16:28:10 +0530 Subject: [PATCH WIP RFC 02/26] libcamera: v4l2_subdevice: Add mediaBusInfo for generic raw formats MIME-Version: 1.0 Message-Id: <20261023-b4-raw-model-v1-2-eadb9948901b@ideasonboard.com> References: <20261023-b4-raw-model-v1-0-eadb9948901b@ideasonboard.com> In-Reply-To: <20261023-b4-raw-model-v1-0-eadb9948901b@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Laurent Pinchart , Kieran Bingham , Sakari Ailus , Naushir Patuck , Jai Luthra X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=34179; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=BJYrZL4jXrC03mirIhEf3pzbHmaS9D7KZCDY22Gv3mc=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq2z3EIS8y0kfumhPcO+8aTG9zdTBrDVuQkfhFZ 9Z0emXXtwKJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCats9xAAKCRBD3pH5JJpx RWbGD/9ZKooSTCePVq+OZ0RadmNiF0+8rp1FcYhipjL7szc/u0zfuMJ8KLf5X62rqCETRnz1yCe IsE26QDPS0D1xr+dviqdCpjjzKwKnspb7+cgMd265NMNNdB+wFIY5Jyhct7+uyYAZ6WI00ebAwI jqYWh1Xf4k0iGmDUA+z6lP3L+c33WJ0M86KyJSvMaE+NWX82f3lgaf6AIseFzHW1SH1f59At8h/ uRsZCZIKX63IPoawvRC0xE+uTOTPDbGXvKcCVzXD3CJtw98IJ+YhilG0wrayACj+t+zZdRgkf4Q jxJg0NJ7qh4NEc+p6wffhqohJX0e9F9miQDDRY0I0JPB0c/eIgA2zepRXeY52P++Skz/cvbteqv BgPfAMXw3LgLmQZ+lB/Gim1AmyLYhXvsiJ+HGFThrnjXwCHxKlC1znoK4JEQgEKLdayFU+TyvQU 2M7r1aT1yxisjAcHdoy386PS9DxK1n858zUu9i0AU/L83FnRlfTbXcieqJIQgIOKcXa9TJczEkA fkemsjGZxbqRs8MzoNnMvN9SQmaR5M/OS4xNJ3+tYYdudVehVPnsJAhbBwh8SZ9406NMbNq3MZE gDiDiFDCWPT/Ax2Rx0Na3ftc+ooqIMHOR/mlN/xdD0RGpaSp84ge+dUg7niIFG6CcDmUGVfZ/u1 T6SHcj3+POv27ZA== X-Developer-Key: i=jai.luthra@ideasonboard.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The generic RAW formats are used by the new Common Raw Sensor Model. Add media bus information for the new mbus codes. Also add a new boolean property so pipelines that don't yet support the new codes can easily ignore them. Signed-off-by: Jai Luthra --- include/libcamera/internal/v4l2_subdevice.h | 1 + src/libcamera/v4l2_subdevice.cpp | 178 +++++++++++++++++++++++++--- 2 files changed, 161 insertions(+), 18 deletions(-) diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h index c37a82afa881..93003ccf3532 100644 --- a/include/libcamera/internal/v4l2_subdevice.h +++ b/include/libcamera/internal/v4l2_subdevice.h @@ -49,6 +49,7 @@ public: Type type; unsigned int bitsPerPixel; PixelFormatInfo::ColourEncoding colourEncoding; + bool genericRaw; }; struct V4L2SubdeviceCapability final : v4l2_subdev_capability { diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index a69de154e8bb..db5eab9a709d 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -96,6 +96,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { .name = "RGB444_2X8_PADHI_LE", @@ -103,6 +104,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, { .name = "RGB555_2X8_PADHI_BE", @@ -110,6 +112,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE, { .name = "RGB555_2X8_PADHI_LE", @@ -117,6 +120,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB565_1X16, { .name = "RGB565_1X16", @@ -124,6 +128,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_BGR565_2X8_BE, { .name = "BGR565_2X8_BE", @@ -131,6 +136,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_BGR565_2X8_LE, { .name = "BGR565_2X8_LE", @@ -138,6 +144,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB565_2X8_BE, { .name = "RGB565_2X8_BE", @@ -145,6 +152,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB565_2X8_LE, { .name = "RGB565_2X8_LE", @@ -152,6 +160,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB666_1X18, { .name = "RGB666_1X18", @@ -159,6 +168,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 18, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_BGR888_1X24, { .name = "BGR888_1X24", @@ -166,6 +176,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB888_1X24, { .name = "RGB888_1X24", @@ -173,6 +184,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB888_2X12_BE, { .name = "RGB888_2X12_BE", @@ -180,6 +192,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB888_2X12_LE, { .name = "RGB888_2X12_LE", @@ -187,6 +200,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB121212_1X36, { .name = "RGB121212_1X36", @@ -194,6 +208,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 36, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_RGB202020_1X60, { .name = "RGB202020_1X60", @@ -201,6 +216,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 60, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_ARGB8888_1X32, { .name = "ARGB8888_1X32", @@ -208,6 +224,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 32, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_Y8_1X8, { .name = "Y8_1X8", @@ -215,6 +232,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UV8_1X8, { .name = "UV8_1X8", @@ -222,6 +240,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY8_1_5X8, { .name = "UYVY8_1_5X8", @@ -229,6 +248,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY8_1_5X8, { .name = "VYUY8_1_5X8", @@ -236,6 +256,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV8_1_5X8, { .name = "YUYV8_1_5X8", @@ -243,6 +264,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU8_1_5X8, { .name = "YVYU8_1_5X8", @@ -250,6 +272,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY8_2X8, { .name = "UYVY8_2X8", @@ -257,6 +280,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY8_2X8, { .name = "VYUY8_2X8", @@ -264,6 +288,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV8_2X8, { .name = "YUYV8_2X8", @@ -271,6 +296,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU8_2X8, { .name = "YVYU8_2X8", @@ -278,6 +304,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_Y10_1X10, { .name = "Y10_1X10", @@ -285,6 +312,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY10_2X10, { .name = "UYVY10_2X10", @@ -292,6 +320,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY10_2X10, { .name = "VYUY10_2X10", @@ -299,6 +328,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV10_2X10, { .name = "YUYV10_2X10", @@ -306,6 +336,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU10_2X10, { .name = "YVYU10_2X10", @@ -313,6 +344,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_Y12_1X12, { .name = "Y12_1X12", @@ -320,6 +352,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_Y16_1X16, { .name = "Y16_1X16", @@ -327,6 +360,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY8_1X16, { .name = "UYVY8_1X16", @@ -334,6 +368,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY8_1X16, { .name = "VYUY8_1X16", @@ -341,6 +376,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV8_1X16, { .name = "YUYV8_1X16", @@ -348,6 +384,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU8_1X16, { .name = "YVYU8_1X16", @@ -355,6 +392,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YDYUYDYV8_1X16, { .name = "YDYUYDYV8_1X16", @@ -362,6 +400,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY10_1X20, { .name = "UYVY10_1X20", @@ -369,6 +408,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY10_1X20, { .name = "VYUY10_1X20", @@ -376,6 +416,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV10_1X20, { .name = "YUYV10_1X20", @@ -383,6 +424,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU10_1X20, { .name = "YVYU10_1X20", @@ -390,6 +432,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUV8_1X24, { .name = "YUV8_1X24", @@ -397,6 +440,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUV10_1X30, { .name = "YUV10_1X30", @@ -404,6 +448,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 30, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_AYUV8_1X32, { .name = "AYUV8_1X32", @@ -411,6 +456,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 32, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY12_2X12, { .name = "UYVY12_2X12", @@ -418,6 +464,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY12_2X12, { .name = "VYUY12_2X12", @@ -425,6 +472,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV12_2X12, { .name = "YUYV12_2X12", @@ -432,6 +480,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU12_2X12, { .name = "YVYU12_2X12", @@ -439,6 +488,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_UYVY12_1X24, { .name = "UYVY12_1X24", @@ -446,6 +496,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_VYUY12_1X24, { .name = "VYUY12_1X24", @@ -453,6 +504,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YUYV12_1X24, { .name = "YUYV12_1X24", @@ -460,6 +512,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_YVYU12_1X24, { .name = "YVYU12_1X24", @@ -467,6 +520,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR8_1X8, { .name = "SBGGR8_1X8", @@ -474,6 +528,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG8_1X8, { .name = "SGBRG8_1X8", @@ -481,6 +536,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG8_1X8, { .name = "SGRBG8_1X8", @@ -488,6 +544,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB8_1X8, { .name = "SRGGB8_1X8", @@ -495,6 +552,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8, { .name = "SBGGR10_ALAW8_1X8", @@ -502,6 +560,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8, { .name = "SGBRG10_ALAW8_1X8", @@ -509,6 +568,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8, { .name = "SGRBG10_ALAW8_1X8", @@ -516,6 +576,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8, { .name = "SRGGB10_ALAW8_1X8", @@ -523,6 +584,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8, { .name = "SBGGR10_DPCM8_1X8", @@ -530,6 +592,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8, { .name = "SGBRG10_DPCM8_1X8", @@ -537,6 +600,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8, { .name = "SGRBG10_DPCM8_1X8", @@ -544,6 +608,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8, { .name = "SRGGB10_DPCM8_1X8", @@ -551,6 +616,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE, { .name = "SBGGR10_2X8_PADHI_BE", @@ -558,6 +624,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE, { .name = "SBGGR10_2X8_PADHI_LE", @@ -565,6 +632,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE, { .name = "SBGGR10_2X8_PADLO_BE", @@ -572,6 +640,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE, { .name = "SBGGR10_2X8_PADLO_LE", @@ -579,6 +648,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR10_1X10, { .name = "SBGGR10_1X10", @@ -586,6 +656,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG10_1X10, { .name = "SGBRG10_1X10", @@ -593,6 +664,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG10_1X10, { .name = "SGRBG10_1X10", @@ -600,6 +672,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB10_1X10, { .name = "SRGGB10_1X10", @@ -607,6 +680,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR12_1X12, { .name = "SBGGR12_1X12", @@ -614,6 +688,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG12_1X12, { .name = "SGBRG12_1X12", @@ -621,6 +696,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG12_1X12, { .name = "SGRBG12_1X12", @@ -628,6 +704,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB12_1X12, { .name = "SRGGB12_1X12", @@ -635,6 +712,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR14_1X14, { .name = "SBGGR14_1X14", @@ -642,6 +720,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG14_1X14, { .name = "SGBRG14_1X14", @@ -649,6 +728,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG14_1X14, { .name = "SGRBG14_1X14", @@ -656,6 +736,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB14_1X14, { .name = "SRGGB14_1X14", @@ -663,62 +744,71 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR16_1X16, { .name = "SBGGR16_1X16", .code = MEDIA_BUS_FMT_SBGGR16_1X16, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG16_1X16, { .name = "SGBRG16_1X16", .code = MEDIA_BUS_FMT_SGBRG16_1X16, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG16_1X16, { .name = "SGRBG16_1X16", .code = MEDIA_BUS_FMT_SGRBG16_1X16, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB16_1X16, { .name = "SRGGB16_1X16", .code = MEDIA_BUS_FMT_SRGGB16_1X16, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 16, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SBGGR20_1X20, { .name = "SBGGR20_1X20", .code = MEDIA_BUS_FMT_SBGGR20_1X20, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGBRG20_1X20, { .name = "SGBRG20_1X20", .code = MEDIA_BUS_FMT_SGBRG20_1X20, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SGRBG20_1X20, { .name = "SGRBG20_1X20", .code = MEDIA_BUS_FMT_SGRBG20_1X20, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_SRGGB20_1X20, { .name = "SRGGB20_1X20", .code = MEDIA_BUS_FMT_SRGGB20_1X20, .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 20, - .colourEncoding = PixelFormatInfo::ColourEncodingRAW + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, /* \todo Clarify colour encoding for HSV formats */ { MEDIA_BUS_FMT_AHSV8888_1X32, { @@ -727,6 +817,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 32, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .genericRaw = false, } }, { MEDIA_BUS_FMT_JPEG_1X8, { .name = "JPEG_1X8", @@ -734,6 +825,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Image, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .genericRaw = false, } }, { MEDIA_BUS_FMT_METADATA_FIXED, { .name = "METADATA_FIXED", @@ -741,6 +833,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 0, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_8, { .name = "META_8", @@ -748,6 +841,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_10, { .name = "META_10", @@ -755,6 +849,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_12, { .name = "META_12", @@ -762,6 +857,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 12, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_14, { .name = "META_14", @@ -769,6 +865,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_16, { .name = "META_16", @@ -776,6 +873,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 16, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_20, { .name = "META_20", @@ -783,6 +881,7 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 20, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, { MEDIA_BUS_FMT_META_24, { .name = "META_24", @@ -790,20 +889,63 @@ const std::map mediaBusFormatInfo{ .type = MediaBusFormatInfo::Type::Metadata, .bitsPerPixel = 24, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = false, } }, - { MEDIA_BUS_FMT_CCS_EMBEDDED, { - .name = "CCS_EMBEDDED", - .code = MEDIA_BUS_FMT_CCS_EMBEDDED, - .type = MediaBusFormatInfo::Type::EmbeddedData, - .bitsPerPixel = 0, + { MEDIA_BUS_FMT_RAW_8, { + .name = "RAW_8", + .code = MEDIA_BUS_FMT_RAW_8, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 8, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, } }, - { MEDIA_BUS_FMT_OV2740_EMBEDDED, { - .name = "OV2740_EMBEDDED", - .code = MEDIA_BUS_FMT_CCS_EMBEDDED, - .type = MediaBusFormatInfo::Type::EmbeddedData, - .bitsPerPixel = 0, + { MEDIA_BUS_FMT_RAW_10, { + .name = "RAW_10", + .code = MEDIA_BUS_FMT_RAW_10, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 10, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, + } }, + { MEDIA_BUS_FMT_RAW_12, { + .name = "RAW_12", + .code = MEDIA_BUS_FMT_RAW_12, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 12, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, + } }, + { MEDIA_BUS_FMT_RAW_14, { + .name = "RAW_14", + .code = MEDIA_BUS_FMT_RAW_14, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 14, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, + } }, + { MEDIA_BUS_FMT_RAW_16, { + .name = "RAW_16", + .code = MEDIA_BUS_FMT_RAW_16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, + } }, + { MEDIA_BUS_FMT_RAW_20, { + .name = "RAW_20", + .code = MEDIA_BUS_FMT_RAW_20, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 20, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, + } }, + { MEDIA_BUS_FMT_RAW_24, { + .name = "RAW_24", + .code = MEDIA_BUS_FMT_RAW_24, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 24, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .genericRaw = true, } }, };