From patchwork Wed May 8 08:03:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20012 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 A8ADEBDE6B for ; Wed, 8 May 2024 08:04:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E51766343B; Wed, 8 May 2024 10:04:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="B4XkqaVr"; dkim-atps=neutral Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 39B7A6342A for ; Wed, 8 May 2024 10:04:01 +0200 (CEST) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41bca450fa3so25960805e9.2 for ; Wed, 08 May 2024 01:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1715155440; x=1715760240; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oPpBfzgcOt84SvUYH5rr6nfm4TxLEN8TNbvq4qlFgLs=; b=B4XkqaVrtnnK8fyKVRDMh33i/kTLfZq2ezcdPCoEVT70t8Ai6L9DXT7VkyEzAYfcfQ zuCRWS7I5BXU6JJh9F4ck0xMrr7nTKuLYrpZbkruyqtn0mL/q1+nXj9hFzL9rgw2g1r0 7fvUCYHqF6emLj1Jl1JUFGsdcOqTzqFvibdoWtMMKygBIM0i5T8R7oPnNcZ0nmmXVVYY azpYqjnD0zPUmNVAOFAODj5WnratOmMQaaUmuMjwQdJA8mJAvugWD9uGla3HeRa5rtWI f4RrHKViDqt6/MWpzjHvT6gdppEd8wOvC1CJzB1Zdyg4Dxa9MmsuOWMKM6taFZDca9g2 CsAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155440; x=1715760240; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oPpBfzgcOt84SvUYH5rr6nfm4TxLEN8TNbvq4qlFgLs=; b=olNVYgG2rTVVZ/kZ+EAunSeGOS43AgRgG9azkdVByvHp9eLDIuRrRKOsYkkVmnIOlc 2D4LR3tKpIyJJ1HvG3p0lcXhzw+z7Uh9sLJzqZdC3LvoC2v2xucUBXF89dHDJ3mfzDC6 LT2sujAQiKU45eSmZ+NzuXMwdam/ERdxPhi9+GwLImL6lagyC3fC4GMyjP7rk1HaQiDs OkKoQhDEjGmLQMafK110ngrF5R0wHjW+EJRNy4mzbcQZ5iU6A+JrtP4zIti1yWfenJPi 3q4xmsCCv5+Z9gCuz2f0umXF6PIy3EgkzeTsSa6f34lbRLj7qat7W6K15G2q9moLUCev or8Q== X-Gm-Message-State: AOJu0YwBh1nf/DqfXs1s2C8HXcOfGHCimvGM9ZEUaK1M8AkqrFmvpRzA AbDqbFm7hChXi9cc3m9fC9eY+6P1ui/fSu8YOSDl4n51b1bw2komd2d/H1jWK0bbbX6vRLlqk5B D X-Google-Smtp-Source: AGHT+IHmFjbl03atCaVWAB600hkG1LEup/qRawzg+VyCpXgnpG6wU3v8PTZAmRnw9/3bqRvJe9Fh8Q== X-Received: by 2002:a05:600c:3555:b0:41a:7ab1:fd98 with SMTP id 5b1f17b1804b1-41f71ebf886mr13144645e9.21.1715155440543; Wed, 08 May 2024 01:04:00 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w16-20020a05600c475000b0041c14061c71sm1351944wmo.15.2024.05.08.01.04.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:04:00 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v2 1/6] libcamera: formats: Add RGB48 formats Date: Wed, 8 May 2024 09:03:56 +0100 Message-Id: <20240508080401.14850-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508080401.14850-1-naush@raspberrypi.com> References: <20240508080401.14850-1-naush@raspberrypi.com> MIME-Version: 1.0 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" Add support for 16-bps (48-bpp) RGB output formats. These new formats are define for the RGB and BGR ordering. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- include/linux/drm_fourcc.h | 4 ++++ include/linux/videodev2.h | 2 ++ src/libcamera/formats.cpp | 20 ++++++++++++++++++++ src/libcamera/formats.yaml | 5 +++++ src/libcamera/v4l2_pixelformat.cpp | 4 ++++ 5 files changed, 35 insertions(+) diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h index d6c83d9c49f4..5133a6551a34 100644 --- a/include/linux/drm_fourcc.h +++ b/include/linux/drm_fourcc.h @@ -210,6 +210,10 @@ extern "C" { #define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') /* [31:0] R:G:B:A 10:10:10:2 little endian */ #define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') /* [31:0] B:G:R:A 10:10:10:2 little endian */ +/* 48 bpp RGB */ +#define DRM_FORMAT_RGB161616 fourcc_code('R', 'G', '4', '8') /* [47:0] R:G:B 16:16:16 little endian */ +#define DRM_FORMAT_BGR161616 fourcc_code('B', 'G', '4', '8') /* [47:0] B:G:R 16:16:16 little endian */ + /* 64 bpp RGB */ #define DRM_FORMAT_XRGB16161616 fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */ #define DRM_FORMAT_XBGR16161616 fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */ diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 7e556911c9e1..4fdd91494041 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -555,6 +555,8 @@ struct v4l2_pix_format { /* RGB formats (6 or 8 bytes per pixel) */ #define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */ +#define V4L2_PIX_FMT_BGR48 v4l2_fourcc('B', 'G', 'R', '6') /* 48 BGR 16-bit per component */ +#define V4L2_PIX_FMT_RGB48 v4l2_fourcc('R', 'G', 'B', '6') /* 48 RGB 16-bit per component */ #define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */ /* Grey formats */ diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 955c3fba8b8d..21a7719e84c4 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -270,6 +270,26 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 1, .planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::BGR161616, { + .name = "BGR161616", + .format = formats::BGR161616, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGB48), }, + .bitsPerPixel = 48, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .packed = false, + .pixelsPerGroup = 1, + .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::RGB161616, { + .name = "RGB161616", + .format = formats::RGB161616, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_BGR48), }, + .bitsPerPixel = 48, + .colourEncoding = PixelFormatInfo::ColourEncodingRGB, + .packed = false, + .pixelsPerGroup = 1, + .planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, /* YUV packed formats. */ { formats::YUYV, { diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml index d8a379923b56..bde2cc803b98 100644 --- a/src/libcamera/formats.yaml +++ b/src/libcamera/formats.yaml @@ -43,6 +43,11 @@ formats: - BGRA8888: fourcc: DRM_FORMAT_BGRA8888 + - RGB161616: + fourcc: DRM_FORMAT_RGB161616 + - BGR161616: + fourcc: DRM_FORMAT_BGR161616 + - YUYV: fourcc: DRM_FORMAT_YUYV - YVYU: diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index 731dc10f1d73..efb6f2940235 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -71,6 +71,10 @@ const std::map vpf2pf{ { formats::BGRA8888, "32-bit ARGB 8-8-8-8" } }, { V4L2PixelFormat(V4L2_PIX_FMT_BGRA32), { formats::RGBA8888, "32-bit ABGR 8-8-8-8" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_RGB48), + { formats::BGR161616, "48-bit RGB 16-16-16" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_BGR48), + { formats::RGB161616, "48-bit BGR 16-16-16" } }, /* YUV packed formats. */ { V4L2PixelFormat(V4L2_PIX_FMT_YUYV), From patchwork Wed May 8 08:03:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20013 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 592D5C32B5 for ; Wed, 8 May 2024 08:04:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB58763442; Wed, 8 May 2024 10:04:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="ruSEwJnE"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 19B7D6342A for ; Wed, 8 May 2024 10:04:02 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41ba1ba55e9so31634065e9.3 for ; Wed, 08 May 2024 01:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1715155441; x=1715760241; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XkZ5lQWFfvcJQwvAZtcgUvFdmh6Ln9fEiVm7PeXcMJg=; b=ruSEwJnEZPF/BTWK/YOQJBBxuS4RjzkRzj6qso54khTWWm84iN80dXtiN6kXGzXFob SHMrr43vMGQwhqTxJ7QW+CqXn6HFu8mWLGkXrZYiKjqVF/JWmHI3lT+OB8T1u3hvb7JB fTp1ifbZ00rHIfPJYKVx2zWR2oKnmF8ciBkMKCr80CesxdbnSWxRXDYrRwBXsFuFot1g bJItGo9oGBYG7sltvdY1TtjeIQO+AoX6kzQbHsu9KTnXf2TBjh0p+WV+teeM6LDBfp2L rhuk8US5i3y+4LacuS77+Wt5QmtVLqjp4hLWyaHoPR+v+4f7iT+7b7M/YF3P9fFsKQb4 QtnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155441; x=1715760241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XkZ5lQWFfvcJQwvAZtcgUvFdmh6Ln9fEiVm7PeXcMJg=; b=NW7SAsQoQezqIcsddPGXzDgwxN8+kZaeFhhl07bHIngumkXQ2942QK90+xrWg3pgAA sPV8gwh8kqQ94T8ne7It7ZJF2uspto6PFIvIwLSmsMEBRZF3cudEDT1y8vj7KaKC51Kl Y39jWfZ5K2gU56IslL5rVlClaBKVQHqeKyWz1SL7jLjdqtFMd9KnmvE6UoYOImEqKviM qImETzPDJ5LfQ7KatWuamxv9pq37N8YRmfXTi355eKk6KpNfF6uDs/wh7rRe526z6zhy kvMMVyRN9kmBU7e6FDL3JtpIJqxCXojL10NlpLQ8ooG82AYEPRHC7QCTmtASAU27/hXn TWHg== X-Gm-Message-State: AOJu0YwvpWB5ISRPGNMWvDCXaHO+AhSyf14kKoZuQR/r23paVOreWFfm ucnzgh62kfMtmvdG6z30HCjCDzHSvXK/7xDfg94DBdzrHGLDRr2qvY5u7mc8s7B0hRcbkCPbWbi 4 X-Google-Smtp-Source: AGHT+IFMyuSI4aqvlUSVKqYPe2um/IK5yqkUxBQoyDFMI0nw9ytC6slvnDG/mZtX4//yipZYS19PNg== X-Received: by 2002:a05:600c:3586:b0:418:3eb7:e8c6 with SMTP id 5b1f17b1804b1-41f7120e3demr10913125e9.5.1715155441453; Wed, 08 May 2024 01:04:01 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w16-20020a05600c475000b0041c14061c71sm1351944wmo.15.2024.05.08.01.04.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:04:00 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Jacopo Mondi Subject: [PATCH v2 2/6] libcamera: formats: Add PiSP specific image and config buffer formats Date: Wed, 8 May 2024 09:03:57 +0100 Message-Id: <20240508080401.14850-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508080401.14850-1-naush@raspberrypi.com> References: <20240508080401.14850-1-naush@raspberrypi.com> MIME-Version: 1.0 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" Add the Raspberry Pi 5 PiSP specific verification format: - V4L2_PIX_FMT_RPI_BE Add the Raspberry Pi 5 PiSP specific compressed Bayer format types 1/2: - V4L2_PIX_FMT_PISP_COMP1_xxx - V4L2_PIX_FMT_PISP_COMP2_xxx Add the Raspberry Pi 5 PiSP Frontend and Backend config formats: - V4L2_META_FMT_RPI_FE_CFG - V4L2_META_FMT_RPI_BE_CFG Add the Raspberry Pi 5 PiSP Frontend statistics format: - V4L2_META_FMT_RPI_FE_STATS Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- include/libcamera/internal/bayer_format.h | 2 + include/linux/drm_fourcc.h | 5 +++ include/linux/videodev2.h | 21 ++++++++++ src/libcamera/bayer_format.cpp | 14 +++++++ src/libcamera/formats.cpp | 51 ++++++++++++++++++++++- src/libcamera/formats.yaml | 16 +++++++ src/libcamera/v4l2_pixelformat.cpp | 10 +++++ 7 files changed, 118 insertions(+), 1 deletion(-) diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h index 78ba3969913d..164743f7e9f6 100644 --- a/include/libcamera/internal/bayer_format.h +++ b/include/libcamera/internal/bayer_format.h @@ -34,6 +34,8 @@ public: None = 0, CSI2 = 1, IPU3 = 2, + PISP1 = 3, + PISP2 = 4, }; constexpr BayerFormat() diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h index 5133a6551a34..927095c4e0df 100644 --- a/include/linux/drm_fourcc.h +++ b/include/linux/drm_fourcc.h @@ -490,6 +490,7 @@ extern "C" { #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a #define DRM_FORMAT_MOD_VENDOR_MIPI 0x0b +#define DRM_FORMAT_MOD_VENDOR_RPI 0x0c /* add more to the end as needed */ @@ -1670,6 +1671,10 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) */ #define MIPI_FORMAT_MOD_CSI2_PACKED fourcc_mod_code(MIPI, 1) +#define PISP_FORMAT_MOD_COMPRESS_MODE1 fourcc_mod_code(RPI, 1) +#define PISP_FORMAT_MOD_COMPRESS_MODE2 fourcc_mod_code(RPI, 2) +#define PISP_FORMAT_MOD_VERIFICATION fourcc_mod_code(RPI, 3) + #if defined(__cplusplus) } #endif diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 4fdd91494041..0b5482a07ae4 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -787,6 +787,18 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer */ #define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer */ +/* Raspberry Pi PiSP compressed formats. */ +#define V4L2_PIX_FMT_PISP_COMP1_RGGB v4l2_fourcc('P', 'C', '1', 'R') /* PiSP 8-bit mode 1 compressed RGGB bayer */ +#define V4L2_PIX_FMT_PISP_COMP1_GRBG v4l2_fourcc('P', 'C', '1', 'G') /* PiSP 8-bit mode 1 compressed GRBG bayer */ +#define V4L2_PIX_FMT_PISP_COMP1_GBRG v4l2_fourcc('P', 'C', '1', 'g') /* PiSP 8-bit mode 1 compressed GBRG bayer */ +#define V4L2_PIX_FMT_PISP_COMP1_BGGR v4l2_fourcc('P', 'C', '1', 'B') /* PiSP 8-bit mode 1 compressed BGGR bayer */ +#define V4L2_PIX_FMT_PISP_COMP1_MONO v4l2_fourcc('P', 'C', '1', 'M') /* PiSP 8-bit mode 1 compressed monochrome */ +#define V4L2_PIX_FMT_PISP_COMP2_RGGB v4l2_fourcc('P', 'C', '2', 'R') /* PiSP 8-bit mode 2 compressed RGGB bayer */ +#define V4L2_PIX_FMT_PISP_COMP2_GRBG v4l2_fourcc('P', 'C', '2', 'G') /* PiSP 8-bit mode 2 compressed GRBG bayer */ +#define V4L2_PIX_FMT_PISP_COMP2_GBRG v4l2_fourcc('P', 'C', '2', 'g') /* PiSP 8-bit mode 2 compressed GBRG bayer */ +#define V4L2_PIX_FMT_PISP_COMP2_BGGR v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compressed BGGR bayer */ +#define V4L2_PIX_FMT_PISP_COMP2_MONO v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compressed monochrome */ + /* SDR formats - used only for Software Defined Radio devices */ #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ @@ -816,6 +828,15 @@ struct v4l2_pix_format { #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters */ #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistics */ +/* The metadata format identifier for BE configuration buffers. */ +#define V4L2_META_FMT_RPI_BE_CFG v4l2_fourcc('R', 'P', 'B', 'C') + +/* The metadata format identifier for FE configuration buffers. */ +#define V4L2_META_FMT_RPI_FE_CFG v4l2_fourcc('R', 'P', 'F', 'C') + +/* The metadata format identifier for FE stats buffers. */ +#define V4L2_META_FMT_RPI_FE_STATS v4l2_fourcc('R', 'P', 'F', 'S') + /* priv field value to indicates that subsequent fields are valid. */ #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp index 20aedfa6d925..ed6f7d62a7a3 100644 --- a/src/libcamera/bayer_format.cpp +++ b/src/libcamera/bayer_format.cpp @@ -164,6 +164,14 @@ const std::map bayerToFormat{ { formats::SGRBG16, V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16) } }, { { BayerFormat::RGGB, 16, BayerFormat::Packing::None }, { formats::SRGGB16, V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16) } }, + { { BayerFormat::BGGR, 16, BayerFormat::Packing::PISP1 }, + { formats::BGGR_PISP_COMP1, V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_BGGR) } }, + { { BayerFormat::GBRG, 16, BayerFormat::Packing::PISP1 }, + { formats::GBRG_PISP_COMP1, V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GBRG) } }, + { { BayerFormat::GRBG, 16, BayerFormat::Packing::PISP1 }, + { formats::GRBG_PISP_COMP1, V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GRBG) } }, + { { BayerFormat::RGGB, 16, BayerFormat::Packing::PISP1 }, + { formats::RGGB_PISP_COMP1, V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_RGGB) } }, { { BayerFormat::MONO, 8, BayerFormat::Packing::None }, { formats::R8, V4L2PixelFormat(V4L2_PIX_FMT_GREY) } }, { { BayerFormat::MONO, 10, BayerFormat::Packing::None }, @@ -174,6 +182,8 @@ const std::map bayerToFormat{ { formats::R12, V4L2PixelFormat(V4L2_PIX_FMT_Y12) } }, { { BayerFormat::MONO, 16, BayerFormat::Packing::None }, { formats::R16, V4L2PixelFormat(V4L2_PIX_FMT_Y16) } }, + { { BayerFormat::MONO, 16, BayerFormat::Packing::PISP1 }, + { formats::MONO_PISP_COMP1, V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_MONO) } }, }; const std::unordered_map mbusCodeToBayer{ @@ -303,6 +313,10 @@ std::ostream &operator<<(std::ostream &out, const BayerFormat &f) out << "-CSI2P"; else if (f.packing == BayerFormat::Packing::IPU3) out << "-IPU3P"; + else if (f.packing == BayerFormat::Packing::PISP1) + out << "-PISP1"; + else if (f.packing == BayerFormat::Packing::PISP2) + out << "-PISP2"; return out; } diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 21a7719e84c4..2e2c33075fab 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -547,6 +547,16 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 1, .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::MONO_PISP_COMP1, { + .name = "MONO_PISP_COMP1", + .format = formats::MONO_PISP_COMP1, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_MONO), }, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .packed = true, + .pixelsPerGroup = 1, + .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, /* Bayer formats. */ { formats::SBGGR8, { @@ -910,7 +920,46 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 25, .planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }}, } }, - + { formats::BGGR_PISP_COMP1, { + .name = "BGGR_PISP_COMP1", + .format = formats::BGGR_PISP_COMP1, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_BGGR), }, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + .pixelsPerGroup = 2, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::GBRG_PISP_COMP1, { + .name = "GBRG_PISP_COMP1", + .format = formats::GBRG_PISP_COMP1, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GBRG), }, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + .pixelsPerGroup = 2, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::GRBG_PISP_COMP1, { + .name = "GRBG_PISP_COMP1", + .format = formats::GRBG_PISP_COMP1, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GRBG), }, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + .pixelsPerGroup = 2, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, + { formats::RGGB_PISP_COMP1, { + .name = "RGGB_PISP_COMP1", + .format = formats::RGGB_PISP_COMP1, + .v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_RGGB), }, + .bitsPerPixel = 8, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW, + .packed = true, + .pixelsPerGroup = 2, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, /* Compressed formats. */ { formats::MJPEG, { .name = "MJPEG", diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml index bde2cc803b98..fe027a7cce70 100644 --- a/src/libcamera/formats.yaml +++ b/src/libcamera/formats.yaml @@ -190,4 +190,20 @@ formats: - SBGGR10_IPU3: fourcc: DRM_FORMAT_SBGGR10 mod: IPU3_FORMAT_MOD_PACKED + + - RGGB_PISP_COMP1: + fourcc: DRM_FORMAT_SRGGB16 + mod: PISP_FORMAT_MOD_COMPRESS_MODE1 + - GRBG_PISP_COMP1: + fourcc: DRM_FORMAT_SGRBG16 + mod: PISP_FORMAT_MOD_COMPRESS_MODE1 + - GBRG_PISP_COMP1: + fourcc: DRM_FORMAT_SGBRG16 + mod: PISP_FORMAT_MOD_COMPRESS_MODE1 + - BGGR_PISP_COMP1: + fourcc: DRM_FORMAT_SBGGR16 + mod: PISP_FORMAT_MOD_COMPRESS_MODE1 + - MONO_PISP_COMP1: + fourcc: DRM_FORMAT_R16 + mod: PISP_FORMAT_MOD_COMPRESS_MODE1 ... diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index efb6f2940235..977ae5834017 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -207,6 +207,16 @@ const std::map vpf2pf{ { formats::SGRBG16, "16-bit Bayer GRGR/BGBG" } }, { V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16), { formats::SRGGB16, "16-bit Bayer RGRG/GBGB" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_BGGR), + { formats::BGGR_PISP_COMP1, "16-bit Bayer BGBG/GRGR PiSP Compress Mode 1" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GBRG), + { formats::GBRG_PISP_COMP1, "16-bit Bayer GBGB/RGRG PiSP Compress Mode 1" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_GRBG), + { formats::GRBG_PISP_COMP1, "16-bit Bayer GRGR/BGBG PiSP Compress Mode 1" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_RGGB), + { formats::RGGB_PISP_COMP1, "16-bit Bayer RGRG/GBGB PiSP Compress Mode 1" } }, + { V4L2PixelFormat(V4L2_PIX_FMT_PISP_COMP1_MONO), + { formats::MONO_PISP_COMP1, "16-bit Mono PiSP Compress Mode 1" } }, /* Compressed formats. */ { V4L2PixelFormat(V4L2_PIX_FMT_MJPEG), From patchwork Wed May 8 08:03:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20014 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 E17FAC32C9 for ; Wed, 8 May 2024 08:04:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CFFA26343D; Wed, 8 May 2024 10:04:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="M/FXJAZQ"; dkim-atps=neutral Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D6EAD63437 for ; Wed, 8 May 2024 10:04:03 +0200 (CEST) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2dfb4ea2bbfso44582221fa.2 for ; Wed, 08 May 2024 01:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1715155442; x=1715760242; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iPJd9lQdz9Fv+bpRr8eSSLQ3odtJUopFSW1cSOY+Mqg=; b=M/FXJAZQy9hDi4DRAAAbACauJWWaRrnt//b5yNktjjQEHRG/Rcxa0wLauykcnmqL/U nX3yUnxVo7RNzGK4MM25sa5yCpU5iUjsIC4U6p5zUg7IQ+BiTfvvk8jCbg0GxkvWk/p9 JQsFM2FLBf1HWRfcL0NwQkMvPA1DZ67d1IdB2lbaMRXUbiROIAss9lr40pdcJ9OrW4R7 tl8aQWUHcSUvvTE44NJUVdNVipar5F5qbCsm1dw2Lr6G+XRAnhW5m7bH12FqrLUdvBTs b4OmcwaWjYtORQqwJt8nLiHZ8cob6ATq88wMo+glPOXq5TwsLJ8HuEHB1AX1fnG7EMiU v+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155442; x=1715760242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iPJd9lQdz9Fv+bpRr8eSSLQ3odtJUopFSW1cSOY+Mqg=; b=kp/EUXM7UJnBMxm9byGxFoo1JXYq4zXlPqeE1KFxUpISJS5y1H8pS8SCF+SXKCUG0a aJVC4o3N9sgNZ+JjpDdzo379Y750z5YMr1AsOFYs4ubrKVlvtegyeMSfdOPaA0J9tFnS UDG9slLTOl5dbNHoFVR8RhX4AysuAQJznknvX/OUkJeP7HcT6sXzLSFW0c5UJxuFrZxy 2Ty8ijHYAl+4cFWon+nJRbULV4uS++n6mZ6GQwCzmXQ0U232cn/9FI5MDtIxALgVzxlx xsO9E8zGrnAiGBn41LC8JRw3VvxJDfO7zWQEG1N86D5o84b+6dV0oduJvC9n9teKC0FY jlzQ== X-Gm-Message-State: AOJu0YxbjG5DOErKbQoci/sBRxUZ+XGgq/xgdpXqWjNPhGnLWfXD+K2E QIHx8p2LFtEbvXV2zgj6kx+etQHOF0WGMLjHbyEEODaJT4toYpM5s4cHgrgqUdL1ctCuTwy9UBI t X-Google-Smtp-Source: AGHT+IEjn+kQ5GqfE6j54MSCBznmkLe/woNO5ag0VJzf6R7PRlzdxSn0eo/wAOetbr+vHfK4/cK5hA== X-Received: by 2002:a2e:9656:0:b0:2df:732b:2488 with SMTP id 38308e7fff4ca-2e447699603mr10559551fa.30.1715155442317; Wed, 08 May 2024 01:04:02 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w16-20020a05600c475000b0041c14061c71sm1351944wmo.15.2024.05.08.01.04.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:04:01 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v2 3/6] libcamera: v4l2_subdevice: Add missing MEDIA_BUS_FMT_xxxx16_1X16 info Date: Wed, 8 May 2024 09:03:58 +0100 Message-Id: <20240508080401.14850-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508080401.14850-1-naush@raspberrypi.com> References: <20240508080401.14850-1-naush@raspberrypi.com> MIME-Version: 1.0 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" Add the missing 16-bit MEDIA_BUS_FMT_xxxx16_1X16 definitions to the mediaBusFormatInfo table. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/v4l2_subdevice.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index 1076b7006b0b..ca01ea3fe455 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -651,6 +651,34 @@ const std::map mediaBusFormatInfo{ .bitsPerPixel = 14, .colourEncoding = PixelFormatInfo::ColourEncodingRAW, } }, + { MEDIA_BUS_FMT_SBGGR16_1X16, { + .name = "SBGGR16_1X16", + .code = MEDIA_BUS_FMT_SBGGR16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW + } }, + { MEDIA_BUS_FMT_SGBRG16_1X16, { + .name = "SGBRG16_1X16", + .code = MEDIA_BUS_FMT_SGBRG16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW + } }, + { MEDIA_BUS_FMT_SGRBG16_1X16, { + .name = "SGRBG16_1X16", + .code = MEDIA_BUS_FMT_SGRBG16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW + } }, + { MEDIA_BUS_FMT_SRGGB16_1X16, { + .name = "SRGGB16_1X16", + .code = MEDIA_BUS_FMT_SRGGB16_1X16, + .type = MediaBusFormatInfo::Type::Image, + .bitsPerPixel = 16, + .colourEncoding = PixelFormatInfo::ColourEncodingRAW + } }, /* \todo Clarify colour encoding for HSV formats */ { MEDIA_BUS_FMT_AHSV8888_1X32, { .name = "AHSV8888_1X32", From patchwork Wed May 8 08:04:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20015 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 8CB27BDE6B for ; Wed, 8 May 2024 08:04:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DE59263440; Wed, 8 May 2024 10:04:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Z3eonQvg"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 793E66342D for ; Wed, 8 May 2024 10:04:04 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41b782405bbso28319995e9.1 for ; Wed, 08 May 2024 01:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1715155444; x=1715760244; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jm5/HVAZRKYn81evUSPhEi4s4e/rvffsxRQpv6ayiLM=; b=Z3eonQvgnUOgFZPcbvdzCEZAosda8oJaSkQgZbF7BpoD0n+iSLCZSFALTbOoeo7sw6 7qPJP3t8f99U8bb+QLLVvyfhv7/gQ45311RPAaEbcGVLZi4NKuQZmqnwXhAwGERfPQYe h61jRfe3qiLSM8FfvFs5lPC0xBSB+xIYtizaoBfgV7J9kpbl4Eg6t+1QdYCZ+0HZm7vz Fb+F9K5fvxb83buIzjrieozMZmiADtdPARkXdIy7kNjyMydNGsEdlUDtXQXm/ekR7nSF h0HPpSkWo7ssdf8enJTmfTUQN7V/DLTUUtrZGzR0VzH486aQX1o/aL1KNfLw3Du5FhRL wgWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155444; x=1715760244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jm5/HVAZRKYn81evUSPhEi4s4e/rvffsxRQpv6ayiLM=; b=RgE1A7o5Qpy6cc+W3Pt0YSaANhTwQLjAt/PP8LszvkWqOaiIY9Ltnl2DPgKeJK+dL9 /+NogCDSfOoDbC1jkbPcQToYlZmmpcwXsY4T6/CZIvwOW2rXpr47u9z43q0yEPzcpOjX zbwH3PEXpD4sbTWn+BySA4brqI9MyK4PDUa5pqcY9tzxR+9X1AF7uzTLSv1OUR1K28ay I3vvi0FVthZjdFf3r8NqNiNDS0K88dUuiRgkEQXvcAdaAodHUWgTeWxdyaw0LJeAtRiX 1hjGV1jYUf/rndH5QsBnZ25111y68DY7kw+kgsFmdgOMf24IfTmUyXv9WUdX3SC3mRy1 oKKQ== X-Gm-Message-State: AOJu0YzkJfE2JIdL5simSIzcJ/VBp+i7Cf4fepvL/F/nXDMO02E3srDR iDye0rYmHbfBInB4V2OcY6MTszs8xs6Y7a7MmgCJuh0tIESz0AzetMwq0s2OdqAYjatq+AwpTbC L X-Google-Smtp-Source: AGHT+IE8mhWhhKiBt5b2l85To8UzaLvWG0AAD4FvKUliLTdv55JNVrtqxj5jCEhdthUjcPGaFi+KZw== X-Received: by 2002:a05:600c:3552:b0:41b:f30a:41f1 with SMTP id 5b1f17b1804b1-41f71302a9dmr13711545e9.7.1715155443920; Wed, 08 May 2024 01:04:03 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w16-20020a05600c475000b0041c14061c71sm1351944wmo.15.2024.05.08.01.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:04:03 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v2 5/6] ipa: rpi: Move variables from private to protected Date: Wed, 8 May 2024 09:04:00 +0100 Message-Id: <20240508080401.14850-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508080401.14850-1-naush@raspberrypi.com> References: <20240508080401.14850-1-naush@raspberrypi.com> MIME-Version: 1.0 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 following member variable will be used by the derived IPAs in an upcoming commit, so make them protected: lensPresent_ monoSensor_ Signed-off-by: Naushir Patuck Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Kieran Bingham --- src/ipa/rpi/common/ipa_base.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h index 512d7e8fe778..ebdc4d297abb 100644 --- a/src/ipa/rpi/common/ipa_base.h +++ b/src/ipa/rpi/common/ipa_base.h @@ -71,6 +71,9 @@ protected: /* Whether the stitch block (if available) needs to swap buffers. */ bool stitchSwapBuffers_; + bool monoSensor_; + bool lensPresent_; + private: /* Number of metadata objects available in the context list. */ static constexpr unsigned int numMetadataContexts = 16; @@ -96,9 +99,6 @@ private: std::map buffers_; - bool lensPresent_; - bool monoSensor_; - std::array rpiMetadata_; /* From patchwork Wed May 8 08:04:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20017 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 D9E46C32CB for ; Wed, 8 May 2024 08:04:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56EF963448; Wed, 8 May 2024 10:04:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="lsGyO3ah"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 50A0E63440 for ; Wed, 8 May 2024 10:04:05 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-41b7a26326eso29417915e9.3 for ; Wed, 08 May 2024 01:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1715155445; x=1715760245; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jVX4VhJ4L0dZzf1MZ7MztEMJwO+LuD8IPNPIkNcynTQ=; b=lsGyO3ahpbgEXKWEJ9h9KFWOGkHFE44jScgonkIFLZ+kWXgcQeeWKxRGtmA2HJh3Hn HOr3sJp0Zb2T+wH+JTehUpEzZw+FVrM2YZzTxLvB4/5004q4tO9NFEXnGb3LCw2/O2BW rByd6Ng87PioK15xID4qXjz5bOB5+UUfN9UOFBBsyfMedj75F63YFq8vGdaWY7nf/8gb YpTzcDgwn/lbrBn1gB+GPr5aTdRtEQymgQI38KhtLPDXSUAiVsqxHqZv/+3se6wTONJZ NFXM2oH0FYfDMrHbJBTaEV9yZxPXt6kUPcjSjqBYxdNLzQcuQZiWCoDY2XzEA/fuCnRN EWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715155445; x=1715760245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jVX4VhJ4L0dZzf1MZ7MztEMJwO+LuD8IPNPIkNcynTQ=; b=KgMqgqGAgp48mcEGSIDNcqMPRgOZx2+oDwHBJaqZsV2Dz7UBfgV7kp1R/S+Ebf/4tX fD34PZ78VCdB4tEX8MwjTa7JmTINuQXh2uZL2uNREmAS6WY7YT/7Iz3N8MowSnjsYDtW hqQ0hTUOEMSrpnqRtLRtoa+0IisPMO6kAuLPvtrZyHRyHlw+pTICj6FPBBDZwUTj388P Gnh3v08CqZxB3bZOwfj9BKvFj5kkeAlQjqapopt+HaP4GlvCV52LhFC2lTNBDsJ0D/25 dihEuIRItUNFcKDLSCGIBIA2kwJECaoj0nWht7SzzDXIuDHEg5dvDmpu6JjYXkAbNrv0 Fi5A== X-Gm-Message-State: AOJu0Yz9+Smkpl0QudKP4OFcSOaLE5UEkPtVzICoLlRJkCta6VtLKypj wQ0RZIrnRSQAkcP/lDZET4ORb41to8dQRe5ri8gUgm02F8erSypCW7owuE3a1OzTp+inHn80qH7 5 X-Google-Smtp-Source: AGHT+IFA8Uj+UtZHyMEP8r1vYhuMDNxv8xuZXrI3rAHZy7jtsbwhFh2rhcLmjxVxXyD9r9y59G4hqg== X-Received: by 2002:a05:600c:5808:b0:41b:cc7d:1207 with SMTP id 5b1f17b1804b1-41f71ec26abmr15538075e9.19.1715155444710; Wed, 08 May 2024 01:04:04 -0700 (PDT) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w16-20020a05600c475000b0041c14061c71sm1351944wmo.15.2024.05.08.01.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:04:04 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v2 6/6] libcamera: shared_mem_object: Remove is_standard_layout restriction Date: Wed, 8 May 2024 09:04:01 +0100 Message-Id: <20240508080401.14850-7-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240508080401.14850-1-naush@raspberrypi.com> References: <20240508080401.14850-1-naush@raspberrypi.com> MIME-Version: 1.0 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 shared_mem_object may be used to construct complex classes, so remove the standard layout type restriction. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- include/libcamera/internal/shared_mem_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h index 9b1d939302a8..c9c0482062bd 100644 --- a/include/libcamera/internal/shared_mem_object.h +++ b/include/libcamera/internal/shared_mem_object.h @@ -56,7 +56,7 @@ private: Span mem_; }; -template::value>> +template class SharedMemObject : public SharedMem { public: