From patchwork Fri Feb 2 08:58:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne X-Patchwork-Id: 19475 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 C9CBABE173 for ; Fri, 2 Feb 2024 08:58:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8D07862807; Fri, 2 Feb 2024 09:58:29 +0100 (CET) Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1ACB261D13 for ; Fri, 2 Feb 2024 09:58:28 +0100 (CET) Received: from nicolas-tpx395.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CB1EE3782096; Fri, 2 Feb 2024 08:58:27 +0000 (UTC) From: Nicolas Dufresne To: libcamera-devel@lists.libcamera.org Subject: [PATCH 2/2] gstreamer: Map 10/12/14/16 bayer formats supports Date: Fri, 2 Feb 2024 09:58:19 +0100 Message-ID: <20240202085819.119320-2-nicolas@ndufresne.ca> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240202085819.119320-1-nicolas@ndufresne.ca> References: <20240202085819.119320-1-nicolas@ndufresne.ca> 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: , Cc: Nicolas Dufresne Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Nicolas Dufresne These formats are now defined in upstream GStreamer main branch, so it is now safe to use their names. Note that libcamera only supports little endian variants of these formats. Signed-off-by: Nicolas Dufresne Reviewed-by: Laurent Pinchart --- src/gstreamer/gstlibcamera-utils.cpp | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp index 2a0b77f4..469ac810 100644 --- a/src/gstreamer/gstlibcamera-utils.cpp +++ b/src/gstreamer/gstlibcamera-utils.cpp @@ -25,6 +25,22 @@ static struct { { GST_VIDEO_FORMAT_ENCODED, formats::SGBRG8 }, { GST_VIDEO_FORMAT_ENCODED, formats::SGRBG8 }, { GST_VIDEO_FORMAT_ENCODED, formats::SRGGB8 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SBGGR10 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGBRG10 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGRBG10 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SRGGB10 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SBGGR12 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGBRG12 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGRBG12 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SRGGB12 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SBGGR14 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGBRG14 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGRBG14 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SRGGB14 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SBGGR16 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGBRG16 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SGRBG16 }, + { GST_VIDEO_FORMAT_ENCODED, formats::SRGGB16 }, /* Monochrome */ { GST_VIDEO_FORMAT_GRAY8, formats::R8 }, @@ -250,6 +266,38 @@ bayer_format_to_string(int format) return "grbg"; case formats::SRGGB8: return "rggb"; + case formats::SBGGR10: + return "bggr10le"; + case formats::SGBRG10: + return "gbrg10le"; + case formats::SGRBG10: + return "grbg10le"; + case formats::SRGGB10: + return "rggb10le"; + case formats::SBGGR12: + return "bggr12le"; + case formats::SGBRG12: + return "gbrg12le"; + case formats::SGRBG12: + return "grbg12le"; + case formats::SRGGB12: + return "rggb12le"; + case formats::SBGGR14: + return "bggr14le"; + case formats::SGBRG14: + return "gbrg14le"; + case formats::SGRBG14: + return "grbg14le"; + case formats::SRGGB14: + return "rggb14le"; + case formats::SBGGR16: + return "bggr16le"; + case formats::SGBRG16: + return "gbrg16le"; + case formats::SGRBG16: + return "grbg16le"; + case formats::SRGGB16: + return "rggb16le"; } return NULL; }