From patchwork Thu Oct 28 08:46:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14379 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 CEE44C324E for ; Thu, 28 Oct 2021 08:47:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7E02860103; Thu, 28 Oct 2021 10:47:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="k5WurwBq"; dkim-atps=neutral Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6967C600C1 for ; Thu, 28 Oct 2021 10:46:55 +0200 (CEST) Received: by mail-wm1-x32c.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so400029wme.4 for ; Thu, 28 Oct 2021 01:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4gQklNV8u9ONgLGzJ6qWEeraVIm9dy+r6zmPAgc0niU=; b=k5WurwBqIzupnYPozqQGhulwXvwMuRmkD3Y6RQbOFGcnRSwlFD+eHDr7ZnvW9TKNnD E2BFmJFtSqmtxw5W2lENeKj9l120wLtkW9LHsY/iZiVRVefIMY8mdMnVGkaQI5E5O9VI npw34zvSvKpxNMcq1BaNgQzv9cEmA+rNK2gC1RnKlSddxCirjD96/AVxk5O/KbGIaxXx 8ZWO8orwKfkoNVOMwOz/ppIOvE8jObXW19S7Zdbck+mod3PIHrFYFMGUwgvFCN4cOALi QNGaBe0B4x/9j158X6HIcUwnZG7XV7Px0atoCmTKu11cPROPFDGmgomE86ybv9qITeS7 wIug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4gQklNV8u9ONgLGzJ6qWEeraVIm9dy+r6zmPAgc0niU=; b=DoJH+cJUp4wnSzYehPtQT5oC1hTMlWQSY8c2GCt68Zgj1TlkneNU4ruxg28T5wO0xT TdJsLqMlqPbPxOAZNVKLv8LZBmKl0rAEAT2OiVA7Pa0jM17Pk73XhgKEs+8O2k5MJBHs lhgcp8jw7UQIANrUTfTqos6EQ/xT9+SBjG0ux851SMcWI0rOLZ+LK9xl0UE04qm8gKh1 9Xgy1vyGOJfGk8cLfcPEDHxJhBj6SDgONBTOoOQDZPRm3eqs3HvKQVidRrwaVAp6twDu gXtLQz6QTWj1R9dryTC25Lcuc7Kv3UI3y/bAiG7qZhPRaygNf9XjE2ExIVFM9VE8XcjX C5jQ== X-Gm-Message-State: AOAM530Hl8qRt0h6ocwtDNIgZd1ikZAUuS6EUO7Gnrm/E5eub8R/h/rp GxqJVixmn2tuqE7sdCheRVlMwio1bfvdtmsQ X-Google-Smtp-Source: ABdhPJzyM/BdTZQuOxYuHA+s52esfbJsueFZhUASvSE4M/HT6CFhNallhrm/wPi+UdW0G8bWWOir0Q== X-Received: by 2002:a05:600c:1d05:: with SMTP id l5mr3019192wms.97.1635410814889; Thu, 28 Oct 2021 01:46:54 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:b894:feb0:b828:13b]) by smtp.gmail.com with ESMTPSA id z2sm1955281wmk.19.2021.10.28.01.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 01:46:54 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Oct 2021 09:46:39 +0100 Message-Id: <20211028084646.453775-4-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 Subject: [libcamera-devel] [PATCH v4 03/10] libcamera: formats: Add R10_CSI2P format 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" This new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10P format, and is a CSI2-packed version of the DRM_FORMAT_R10 format. Signed-off-by: Naushir Patuck --- src/libcamera/formats.cpp | 13 +++++++++++++ src/libcamera/formats.yaml | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index d4781dfb3874..9b6ccdca0663 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -510,6 +510,19 @@ const std::map pixelFormatInfo{ .pixelsPerGroup = 1, .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, } }, + { formats::R10_CSI2P, { + .name = "R10_CSI2P", + .format = formats::R10, + .v4l2Formats = { + .single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P), + .multi = V4L2PixelFormat(), + }, + .bitsPerPixel = 10, + .colourEncoding = PixelFormatInfo::ColourEncodingYUV, + .packed = true, + .pixelsPerGroup = 1, + .planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }}, + } }, /* Bayer formats. */ { formats::SBGGR8, { diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml index 22a8e473a183..1f3f043302c3 100644 --- a/src/libcamera/formats.yaml +++ b/src/libcamera/formats.yaml @@ -109,6 +109,10 @@ formats: - SBGGR16: fourcc: DRM_FORMAT_SBGGR16 + - R10_CSI2P: + fourcc: DRM_FORMAT_R10 + mod: MIPI_FORMAT_MOD_CSI2_PACKED + - SRGGB10_CSI2P: fourcc: DRM_FORMAT_SRGGB10 mod: MIPI_FORMAT_MOD_CSI2_PACKED