{"id":19467,"url":"https://patchwork.libcamera.org/api/1.1/patches/19467/?format=json","web_url":"https://patchwork.libcamera.org/patch/19467/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20240123152034.119295-1-kieran.bingham@ideasonboard.com>","date":"2024-01-23T15:20:34","name":"[v2,4/4] libcamera: v4l2_subdevice: Explain sort order of formatInfoMap","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"0dad36f4720fcd31a7da8041500f0e1324ed3f47","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19467/mbox/","series":[{"id":4160,"url":"https://patchwork.libcamera.org/api/1.1/series/4160/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4160","date":"2024-01-23T15:20:34","name":null,"version":2,"mbox":"https://patchwork.libcamera.org/series/4160/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19467/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19467/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 05F51C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Jan 2024 15:21:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 35ABA62945;\n\tTue, 23 Jan 2024 16:20:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 39198628E9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Jan 2024 16:20:58 +0100 (CET)","from Monstersaurus.local\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66CF81B9A;\n\tTue, 23 Jan 2024 16:19:44 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VLFY0df1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1706023184;\n\tbh=DH/9+KyPCRyYuWW6EntMltni4yB5wldduq+XvGae4Y8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VLFY0df1vZ9+AW+5d8G5lA3iPyOFElbbJOFkjWGZfk/KG4bhAvSMQL+Uudb3Dc/Sz\n\t88MViiD2DOABCSSSTCY62UI1mr8dz+sYNb/2Rl6H6YhcXzGP5LVBf1r0xDWT3mS+mA\n\trGpSPQE339dg0fr1FG2Kzw72PEfJelCYeuB53Fa4=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"[PATCH v2 4/4] libcamera: v4l2_subdevice: Explain sort order of\n\tformatInfoMap","Date":"Tue, 23 Jan 2024 15:20:34 +0000","Message-Id":"<20240123152034.119295-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20240123143535.52255-1-kieran.bingham@ideasonboard.com>","References":"<20240123143535.52255-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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":"The sort order used in the table isn't obvious. Reference the source of\nlinux/media-bus-format.h at the top of the table for reference for\nfuture updates.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nThis patch replaces:\n [PATCH v2 4/4] libcamera: v4l2subdev: Organise the formatInfoMap\n\n src/libcamera/v4l2_subdevice.cpp | 1 +\n 1 file changed, 1 insertion(+)","diff":"diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 265240dbd405..6d0785b7b484 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -57,6 +57,7 @@ struct V4L2SubdeviceFormatInfo {\n  * bus codes\n  */\n const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n+\t/* This table is sorted to match the order in linux/media-bus-format.h */\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { 16, \"RGB444_2X8_PADHI_BE\", PixelFormatInfo::ColourEncodingRGB } },\n \t{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { 16, \"RGB444_2X8_PADHI_LE\", PixelFormatInfo::ColourEncodingRGB } },\n \t{ MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, { 16, \"RGB555_2X8_PADHI_BE\", PixelFormatInfo::ColourEncodingRGB } },\n","prefixes":["v2","4/4"]}