{"id":14438,"url":"https://patchwork.libcamera.org/api/patches/14438/?format=json","web_url":"https://patchwork.libcamera.org/patch/14438/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211101091510.23204-4-naush@raspberrypi.com>","date":"2021-11-01T09:15:02","name":"[libcamera-devel,v5,03/11] libcamera: formats: Add R10_CSI2P format","commit_ref":"9e3470ad3e4f03364c8160917117d62fde5a7d88","pull_url":null,"state":"accepted","archived":false,"hash":"5acb3925c49e3c65bc0b0d5e030487695296e27e","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14438/mbox/","series":[{"id":2684,"url":"https://patchwork.libcamera.org/api/series/2684/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2684","date":"2021-11-01T09:14:59","name":"Raspberry Pi: Conversion to media controller","version":5,"mbox":"https://patchwork.libcamera.org/series/2684/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14438/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14438/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 985E0C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Nov 2021 09:15:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 92139600F9;\n\tMon,  1 Nov 2021 10:15:17 +0100 (CET)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6F4E600BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Nov 2021 10:15:15 +0100 (CET)","by mail-wr1-x429.google.com with SMTP id r8so14352939wra.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Nov 2021 02:15:15 -0700 (PDT)","from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6])\n\tby smtp.gmail.com with ESMTPSA id\n\tw10sm13168849wrq.88.2021.11.01.02.15.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Nov 2021 02:15:14 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"oCEtz6RQ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=euyjLCE+1e2oMFePuUF4DYfqmMu3lRUlmwKChksNLN0=;\n\tb=oCEtz6RQNyynQ6OqQPd4GJ+ri10P4QAhqeDNj6jCg1LvjKCauohzX1AGrGtB37N2Zd\n\tZgRcamtZbgJmdZuUT3Z1Pj1hEOWO4D+V3SurB853GqjqazuluOTMNR+3DbnGpzgDuV2u\n\tnivHbC4KC4llojj/VwHsi+dvckg0I+nM1+6TAcHz9OmeeiPD6jstqA5sfWJ5QKA3iqrb\n\tHKQCpW2xaIqsTmq++qcbGEJ59xG4lIHucsJCNCZuSZe7c7DHQhzTTBK022Z2BFLUU5Y6\n\tf+jmA1wGVnnnl/vTmJX6hB3IrnbuUGpV/ZfFGuK+VRW9q49lMhzO32YEr/XkFINq3ezc\n\tXW7Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=euyjLCE+1e2oMFePuUF4DYfqmMu3lRUlmwKChksNLN0=;\n\tb=ZAWOAvuANbNKtVWcRjHUnD9Ux05wB6zjx1hEaU5YWrC4tl1rG/AMcU5SDTOubDmZLR\n\tpaFiZs8WrU64viNnR40K40WsEvMlyhMPo2kzt3hG5IfcKTOzlCJRITn9MyeQ5vEHbfHh\n\trYInFsFEG5dYf9G9TxYKg1Gmvizmw4W/IR6arjRbSinSk/znBucumys7D3dxgmaAf7Mi\n\taa+uB60sMwiawMHXgI9qSs/LX44P8evKZ4OI0nNNoRKLi//RLBZm9SjeAYwMaSEAcyJz\n\tLim/MT6UKacNTLOymqfixelelDH0BxONNm8Pfd9FOmET9EzASQ9SoASpJrG+4QSdOJIf\n\txHPg==","X-Gm-Message-State":"AOAM533SUdMOx7CWbbmQBjRa9Bn9eQ3XibJiOJh94cvFDcq/Zw74u6mk\n\tdeWThtnhE6Kb9IACQ8o/Nz4h9XJoOSFVlc6r","X-Google-Smtp-Source":"ABdhPJx+UGqo0hJy+97SvLRC31s5f+Y6jFusS7BcSZekFH0NY9tmPqXLaEClFEmycRfqOetVPQIWsg==","X-Received":"by 2002:a5d:44d1:: with SMTP id\n\tz17mr24994211wrr.143.1635758115226; \n\tMon, 01 Nov 2021 02:15:15 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","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","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 03/11] libcamera: formats: Add\n\tR10_CSI2P format","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10P format, and is a\nCSI2-packed version of the DRM_FORMAT_R10 format.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/formats.cpp  | 13 +++++++++++++\n src/libcamera/formats.yaml |  4 ++++\n 2 files changed, 17 insertions(+)","diff":"diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex d4781dfb3874..afcaabc519f7 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -510,6 +510,19 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.pixelsPerGroup = 1,\n \t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n \t} },\n+\t{ formats::R10_CSI2P, {\n+\t\t.name = \"R10_CSI2P\",\n+\t\t.format = formats::R10,\n+\t\t.v4l2Formats = {\n+\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P),\n+\t\t\t.multi = V4L2PixelFormat(),\n+\t\t},\n+\t\t.bitsPerPixel = 10,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n+\t\t.packed = true,\n+\t\t.pixelsPerGroup = 4,\n+\t\t.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n \n \t/* Bayer formats. */\n \t{ formats::SBGGR8, {\ndiff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\nindex 22a8e473a183..1f3f043302c3 100644\n--- a/src/libcamera/formats.yaml\n+++ b/src/libcamera/formats.yaml\n@@ -109,6 +109,10 @@ formats:\n   - SBGGR16:\n       fourcc: DRM_FORMAT_SBGGR16\n \n+  - R10_CSI2P:\n+      fourcc: DRM_FORMAT_R10\n+      mod: MIPI_FORMAT_MOD_CSI2_PACKED\n+\n   - SRGGB10_CSI2P:\n       fourcc: DRM_FORMAT_SRGGB10\n       mod: MIPI_FORMAT_MOD_CSI2_PACKED\n","prefixes":["libcamera-devel","v5","03/11"]}