From patchwork Mon Nov 1 09:15:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 14438 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 985E0C324E for ; Mon, 1 Nov 2021 09:15:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92139600F9; Mon, 1 Nov 2021 10:15:17 +0100 (CET) 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="oCEtz6RQ"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A6F4E600BF for ; Mon, 1 Nov 2021 10:15:15 +0100 (CET) Received: by mail-wr1-x429.google.com with SMTP id r8so14352939wra.7 for ; Mon, 01 Nov 2021 02:15:15 -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=euyjLCE+1e2oMFePuUF4DYfqmMu3lRUlmwKChksNLN0=; b=oCEtz6RQNyynQ6OqQPd4GJ+ri10P4QAhqeDNj6jCg1LvjKCauohzX1AGrGtB37N2Zd ZgRcamtZbgJmdZuUT3Z1Pj1hEOWO4D+V3SurB853GqjqazuluOTMNR+3DbnGpzgDuV2u nivHbC4KC4llojj/VwHsi+dvckg0I+nM1+6TAcHz9OmeeiPD6jstqA5sfWJ5QKA3iqrb HKQCpW2xaIqsTmq++qcbGEJ59xG4lIHucsJCNCZuSZe7c7DHQhzTTBK022Z2BFLUU5Y6 f+jmA1wGVnnnl/vTmJX6hB3IrnbuUGpV/ZfFGuK+VRW9q49lMhzO32YEr/XkFINq3ezc XW7Q== 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=euyjLCE+1e2oMFePuUF4DYfqmMu3lRUlmwKChksNLN0=; b=ZAWOAvuANbNKtVWcRjHUnD9Ux05wB6zjx1hEaU5YWrC4tl1rG/AMcU5SDTOubDmZLR paFiZs8WrU64viNnR40K40WsEvMlyhMPo2kzt3hG5IfcKTOzlCJRITn9MyeQ5vEHbfHh rYInFsFEG5dYf9G9TxYKg1Gmvizmw4W/IR6arjRbSinSk/znBucumys7D3dxgmaAf7Mi aa+uB60sMwiawMHXgI9qSs/LX44P8evKZ4OI0nNNoRKLi//RLBZm9SjeAYwMaSEAcyJz Lim/MT6UKacNTLOymqfixelelDH0BxONNm8Pfd9FOmET9EzASQ9SoASpJrG+4QSdOJIf xHPg== X-Gm-Message-State: AOAM533SUdMOx7CWbbmQBjRa9Bn9eQ3XibJiOJh94cvFDcq/Zw74u6mk deWThtnhE6Kb9IACQ8o/Nz4h9XJoOSFVlc6r X-Google-Smtp-Source: ABdhPJx+UGqo0hJy+97SvLRC31s5f+Y6jFusS7BcSZekFH0NY9tmPqXLaEClFEmycRfqOetVPQIWsg== X-Received: by 2002:a5d:44d1:: with SMTP id z17mr24994211wrr.143.1635758115226; Mon, 01 Nov 2021 02:15:15 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6]) by smtp.gmail.com with ESMTPSA id w10sm13168849wrq.88.2021.11.01.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 02:15:14 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 1 Nov 2021 09:15:02 +0000 Message-Id: <20211101091510.23204-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211101091510.23204-1-naush@raspberrypi.com> References: <20211101091510.23204-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 03/11] 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 Reviewed-by: Kieran Bingham --- 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..afcaabc519f7 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 = 4, + .planes = {{ { 5, 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