[{"id":25367,"web_url":"https://patchwork.libcamera.org/comment/25367/","msgid":"<20221010093745.knws36r4m2ura3er@uno.localdomain>","date":"2022-10-10T09:37:45","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Xavier\n\nOn Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n> From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n>\n> The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n> \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n> simple pipeline handler with NXP ISI hardware.\n> The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n> missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n> between a media bus format and a colour encoding. So populate the structure with\n> the missing media bus formats.\n>\n> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n\nJust to point out that for JPEG, the entries we have in the main\nformats map, report YUV as color encoding\n\nsrc/libcamera/formats.cpp-      /* Compressed formats. */\nsrc/libcamera/formats.cpp-      { formats::MJPEG, {\nsrc/libcamera/formats.cpp-              .name = \"MJPEG\",\nsrc/libcamera/formats.cpp-              .format = formats::MJPEG,\nsrc/libcamera/formats.cpp-              .v4l2Formats = {\nsrc/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\nsrc/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\nsrc/libcamera/formats.cpp-              },\nsrc/libcamera/formats.cpp-              .bitsPerPixel = 0,\nsrc/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\nsrc/libcamera/formats.cpp-              .packed = false,\nsrc/libcamera/formats.cpp-              .pixelsPerGroup = 1,\nsrc/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\nsrc/libcamera/formats.cpp-      } },\n\nUnfortunately the kernel documentation for the format doesn't help\nmuch:\n\nhttps://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\n> ---\n>  src/libcamera/v4l2_subdevice.cpp | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 9ef95963..f34eea24 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>  \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>  \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n>  \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n> +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>  \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n>  \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>  \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>  \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n>  \t/* \\todo Clarify colour encoding for HSV formats */\n>  \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n>  };\n>\n>  } /* namespace */\n> --\n> 2.37.3\n>","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 64A05BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 09:37:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A7BE862D57;\n\tMon, 10 Oct 2022 11:37:48 +0200 (CEST)","from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 326F360485\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 11:37:47 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 9B2086000C;\n\tMon, 10 Oct 2022 09:37:46 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665394668;\n\tbh=XT+l/SKxfdukHoIRqaB/CEnEe+9wDJcEFB5c8R51k2w=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=1iFtijC0bz73tD1c06LCbIkJE5oLZbxgRfevzmtKgNfbyaQC23neVeJgiHQkbMPPZ\n\tTuNBEJZ3KviWicBgajORwysuBCbeBFzvbt/y6yoQj9Fme01AfWUu/Z62dgy5bqPKBg\n\tSqo2nCGe+foJvM3hYXi3sm6pBu4UmmVtdLU0fc9yskk/h9rywQ8F3XXxPMKg2gzGvj\n\taAqcxf5saDfBq9KzkIsa5U0iQxDPdWMIh0AHXe8J4xvAvUM0ZWCZ50QpLhHwQEv3zp\n\tj8Q4bVsOm8YBK2wZGsB8rDYjBA7WB2ZQ6MR5QR6XoQaMONZjMX1XSksYNJUu8DmVT7\n\tcimnw4e/5YqPw==","Date":"Mon, 10 Oct 2022 11:37:45 +0200","To":"\"Xavier Roumegue (OSS)\" <xavier.roumegue@oss.nxp.com>","Message-ID":"<20221010093745.knws36r4m2ura3er@uno.localdomain>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25368,"web_url":"https://patchwork.libcamera.org/comment/25368/","msgid":"<72ce0fbf-2a1b-398c-753a-8dff5f04f89e@oss.nxp.com>","date":"2022-10-10T10:40:36","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":107,"url":"https://patchwork.libcamera.org/api/people/107/","name":"Xavier Roumegue","email":"xavier.roumegue@oss.nxp.com"},"content":"Hi Jacopo,\n\nOn 10/10/22 11:37, Jacopo Mondi wrote:\n> Hi Xavier\n> \n> On Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n>> From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n>>\n>> The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n>> \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n>> simple pipeline handler with NXP ISI hardware.\n>> The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n>> missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n>> between a media bus format and a colour encoding. So populate the structure with\n>> the missing media bus formats.\n>>\n>> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> \n> Just to point out that for JPEG, the entries we have in the main\n> formats map, report YUV as color encoding\n> \n> src/libcamera/formats.cpp-      /* Compressed formats. */\n> src/libcamera/formats.cpp-      { formats::MJPEG, {\n> src/libcamera/formats.cpp-              .name = \"MJPEG\",\n> src/libcamera/formats.cpp-              .format = formats::MJPEG,\n> src/libcamera/formats.cpp-              .v4l2Formats = {\n> src/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n> src/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\n> src/libcamera/formats.cpp-              },\n> src/libcamera/formats.cpp-              .bitsPerPixel = 0,\n> src/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> src/libcamera/formats.cpp-              .packed = false,\n> src/libcamera/formats.cpp-              .pixelsPerGroup = 1,\n> src/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n> src/libcamera/formats.cpp-      } },\n> \n> Unfortunately the kernel documentation for the format doesn't help\n> much:\n> \n> https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\nMy poor colorspace knowledge does not give me a valuable opinion on that. It \nseems that jpeg is not really bound to a colorspace.\nI posted a v2 version with YUV as color encoding for JPEG so that the encoding \nremains consistant in libcamera.\n\nXavier\n\n>> ---\n>>   src/libcamera/v4l2_subdevice.cpp | 2 ++\n>>   1 file changed, 2 insertions(+)\n>>\n>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>> index 9ef95963..f34eea24 100644\n>> --- a/src/libcamera/v4l2_subdevice.cpp\n>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>> @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>   \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>> +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>> @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>   \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n>>   \t/* \\todo Clarify colour encoding for HSV formats */\n>>   \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>> +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n>>   };\n>>\n>>   } /* namespace */\n>> --\n>> 2.37.3\n>>","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 B7E1CBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 10:40:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 038FB62D58;\n\tMon, 10 Oct 2022 12:40:48 +0200 (CEST)","from EUR04-VI1-obe.outbound.protection.outlook.com\n\t(mail-eopbgr80080.outbound.protection.outlook.com [40.107.8.80])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4EDD362272\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 12:40:46 +0200 (CEST)","from PAXPR04MB8703.eurprd04.prod.outlook.com\n\t(2603:10a6:102:21e::22)\n\tby VE1PR04MB7455.eurprd04.prod.outlook.com (2603:10a6:800:1a1::23)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.15;\n\tMon, 10 Oct 2022 10:40:44 +0000","from PAXPR04MB8703.eurprd04.prod.outlook.com\n\t([fe80::4f72:a35a:8c60:63f1]) by\n\tPAXPR04MB8703.eurprd04.prod.outlook.com\n\t([fe80::4f72:a35a:8c60:63f1%6]) with mapi id 15.20.5709.015;\n\tMon, 10 Oct 2022 10:40:44 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665398448;\n\tbh=xurRRvorEM+4TGXSzpMvPjC1tM6c/o87sIn8j5z0gJU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Ld2TtdJchMckqTBooOoblt3FfOGBoKyapL5BcKn0iStKbQ35veAwRa6u9xtnwL7Tc\n\tx+VHylXoW/K2ObL9U6ONP/1i9Z1GOtAoxeZfIxqkL5zV3bYiqPmkIaoTqbhD8esz3c\n\tKfn0xJqxKvDJ1AZh5kFj4Eba/zbSufHNCmjC8fuXfMCGWDtIEtWQuLUb1onDMNQhL5\n\tLcrs5+Plg+7KCRkQ3CUbmNjCAk/fxAvnllGtcWNaqUgDS+Hkof4DHkkOOycqDYheAM\n\t+iJxmhf/X1XrxNKeoj+l+HEBarXuEE226MMiGKE2/uhMfei4iCN156qCqvUXu98UMm\n\tSj8pfGWzOwQAQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com;\n\ts=selector2-NXP1-onmicrosoft-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=4jXpodm+FRkgCf/6oTmzyGXvDQS280kQ4iRQuCVHUAU=;\n\tb=EXQzw4nBxd1QTvsDG63OSgh/+DxBaUqKDsPxxZr21SjIQyllWw11UVRaVWtwR0/9N0OrgoSyTOGvLrxmo/h//B58BEl1hNPVL+QCaHrivj/LqZ949qfftL2r/erxRaQWFtE4DxoLLrg71ew5l3zDR5vA9ZzgyG4Q+1AOFizJ2iI="],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=NXP1.onmicrosoft.com\n\theader.i=@NXP1.onmicrosoft.com\n\theader.b=\"EXQzw4nB\"; dkim-atps=neutral","dkim=none (message not signed)\n\theader.d=none;dmarc=none action=none header.from=oss.nxp.com;"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n\tb=iRZOeG4BeqTuwXZVbrMlEU7IH1+x9S8Jx+kQPIOnTdunpi12txhw3sUZwfkoGWVYTXq7nbQg+af34i7ZzPxOcMDaAGdxtV3gcp8xKNqzRgWE5GP9TKX14CTQT0YyxWNSgPVOIxDSQ7tBU/koeoG52bwREIowkIg4KTXJ409YfBxuBPZlDTqtvyTXhD4LFQGMIDO3ocBbcWiKsnhxmB7gaAzddR+ZrB7pSwYzbMUV2H9HusawmFHK/pO5nX+rg2PImrbO/Zh6b3WrQ4DwOIENNqaK8XqVtmUWbJTsBdQ7NOUDt0wSu3HJ2Gfbc7N00dJgW6wz98EqMgoojceq0V5lDA==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n\ts=arcselector9901;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n\tbh=4jXpodm+FRkgCf/6oTmzyGXvDQS280kQ4iRQuCVHUAU=;\n\tb=UmYd8ZXSp09xDRJzFxWIOfEQf1TiuyOYKskPQqvCiJ9Dn0ffGkG5fEZGnB5ke+zxJMEC3yeVXfmTCmJeZxYSk1beuiB7UNBWpHvZ7KGoTpVMl5gU424ikY1eQaRUh3U6KQcIfLhiuF0jczgZoE1Xe8B1j3wc3OC+mp3sU+xJ+0V5JER+RRwMcXn2CfqR7r424QVgOxratTcjGpicRhyO+mRiB/lNWsrIPjd0fvvEcdoO8C7MUbcAc2T+Gail49oRt5oNrBGBcjwXHp25BpDxBRKO4QBP1qmNPnmobVvcC5LHj7/bJCKXvghfmY38I05ZcRTU+9qHwXm2xwgaYxGD+A==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n\tsmtp.mailfrom=oss.nxp.com;\n\tdmarc=pass action=none header.from=oss.nxp.com; \n\tdkim=pass header.d=oss.nxp.com; arc=none","Message-ID":"<72ce0fbf-2a1b-398c-753a-8dff5f04f89e@oss.nxp.com>","Date":"Mon, 10 Oct 2022 12:40:36 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.3.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>\n\t<20221010093745.knws36r4m2ura3er@uno.localdomain>","In-Reply-To":"<20221010093745.knws36r4m2ura3er@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"BY3PR05CA0032.namprd05.prod.outlook.com\n\t(2603:10b6:a03:39b::7) To PAXPR04MB8703.eurprd04.prod.outlook.com\n\t(2603:10a6:102:21e::22)","MIME-Version":"1.0","X-MS-Exchange-MessageSentRepresentingType":"1","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"PAXPR04MB8703:EE_|VE1PR04MB7455:EE_","X-MS-Office365-Filtering-Correlation-Id":"c45f6c7c-7df3-4e6a-9cb8-08daaaabe271","X-MS-Exchange-SharedMailbox-RoutingAgent-Processed":"True","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"BCL:0;","X-Microsoft-Antispam-Message-Info":"Eh/a1zdq6aaL5wD5HTAHRsEyWH7La6F/CQvgScNlbmV/RPvQ+bOKimeGzarnbk8LLGMFV0cQbYivryhsF+6iq8OZAa0vMdDUJz1BkLyf83RG1bTY/oX16Cc2YAlxzNJhJ/Wkh4t9UmCvfrVe1oYKDINxXfdfsRBcfHWJd50oXjzcSBS2f+qF5scpStTdStz+NWVKXm5ULghkdSAq2KwVy4bEwLSP7QG1ZEItGMCJiYhRBko+nkLKTyfAjY77Cl/TSMw1uMAOYCo1sN8uXK22bQizf5XPCfsLfl+GiKNbAuWfbU2ImdFSvm+T3RPjz2M9EgqgGCGYtzPE8gIy3XhkkKMpYlzTsTATAR4MiCnUoYDmmVkEiskCMlYID3uz5aqQ8FLnvB7jlp4Byna6Li7Ui2QswkJedKzV36FyJmz2fh07aO0+QNJVgUhOtZ9khvy1bqFt1TuUlTSxntth2tKO/H2UhdJvsBA1tQnYKvyuEELELyyGArosik6Z4dU5AAdiCiRzWEKhytXYNedCv1/DCpQbCwUJmIDL+9XTC3j/6LSZvQhnkt6EW80p7tEgSlaki5UVX8MIXwYYCSw3VTqrK+3cglaWD038i6bt1+V/JzYz3jVRX0UWF+svo/DvoUCVjrWQyburZDJMt+gPJbfy7F1s4NHKg5RxlFGX35DTB7HgWYbGoH9jtSMJwjrzbZJKSUnows5F5qmm5ByrSU3BxOPM6gTVNiZXz5ElRmPRq/EnsNJn6wf3ATVBUFtFa4qxxTPMxnqD9GDizo3NiUrZWieHiTNzPpQi3Wyj7+n2jwTLt8eMx9UwHqYxrfhGdysfynqT1gTrm74oQRMc4NmsEcKnInRbW+SFAhFjSXM3CX4=","X-Forefront-Antispam-Report":"CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n\tIPV:NLI; SFV:NSPM; H:PAXPR04MB8703.eurprd04.prod.outlook.com; PTR:;\n\tCAT:NONE; \n\tSFS:(13230022)(4636009)(396003)(346002)(366004)(376002)(136003)(39860400002)(451199015)(8936002)(4326008)(66476007)(66556008)(2906002)(8676002)(66946007)(86362001)(31696002)(38100700002)(38350700002)(41300700001)(19627235002)(26005)(6512007)(5660300002)(2616005)(966005)(6486002)(478600001)(6506007)(55236004)(53546011)(52116002)(6666004)(186003)(83380400001)(316002)(6916009)(31686004)(43740500002)(45980500001);\n\tDIR:OUT; SFP:1101; ","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?ufSJOZNABTuMAJls0F2F136yV?=\n\t=?utf-8?q?FY2LC7HMxAYGcpIddFdUmGza7BGvCgPnmje/jxuh0iRjweoKTYPj38nw?=\n\t=?utf-8?q?UZbKTTnAFDqbJ23XDMS+mQ+rwaOlp/5MzD36XFhdAff5r0ipT2rxhJIm?=\n\t=?utf-8?q?IgmbxKSbL5jK9mKIWxzBjO8KnfWnuMMTWdIoijg627dgNnvHJgD6fWb+?=\n\t=?utf-8?q?r7OeSaHXQH7j/Z4ac91+b4TRxabkGs01yw+S0vF68TNkrXkIu1t1f6RO?=\n\t=?utf-8?q?0HSniHQZygxYdvi5q22qWvQu4cI3763VbuLdnKjt13oqAAAm9YSePTAH?=\n\t=?utf-8?q?5UEW525FWYa3jCqqRhTVXidUkpStJzAUdGY4/G3CLJ2F7yQm3LHM4eEG?=\n\t=?utf-8?q?4KGq5tzJvpapF+sCjAKvQwVN4nTG52VS/TY5DTbcsEmy/zUqAJRdR/7K?=\n\t=?utf-8?q?hoxD14mev3IsSafXT0stKuhH5ZbiMsqEGYwMhH9wMa5ZJggduGYdewym?=\n\t=?utf-8?q?vKSGYQ4Wm68T44AEmP8ifKFXYYEC/JIEa46i7Pcf8JNf1Rah4Nln9XlL?=\n\t=?utf-8?q?WCdsmzMJbCdBaxZMMFjQQ0/BYw2BBr6Btz4b7j4Un4GhhuKzX90WmfYW?=\n\t=?utf-8?q?A+317iKF4eVr7hpIXApQk/LV0XzHy/xAuwVwPZE+vyGUDGl7pYSMuWR5?=\n\t=?utf-8?q?6K7isvYI7/acsyg+epNuAZtVWdA63IFetZgVYshueYiZdXJMe+X7FIyx?=\n\t=?utf-8?q?/366byLt03Svl3D1pOfX6Sx0Hl7fFphOTHuaHUrD6DtqBjZucFWKnWsC?=\n\t=?utf-8?q?SV6ajwUWsimcT3C3SopjwDVrM47M71PVCmD9VOBZl/+rBTNb+j5irxCe?=\n\t=?utf-8?q?6qBN3fiGwE315AoPpJ0gnBL+yfrNT+mWtkYvBRoDPTzTGubLPRF6tMPX?=\n\t=?utf-8?q?0lkAgi4vlLZJ36aL8Qr9EPo3fVE2rNkZ9yx5UA4/iwHFOEYQdeME+Fm6?=\n\t=?utf-8?q?3OIBxkSE/u17tWRxUP/P4RSuDWwfUnD0uKJSxMbt+jrbuBPxDPE1bnva?=\n\t=?utf-8?q?tvyURu7qM/kdykDSvDuSmnsLQnqBxRyYwqOhsFwgD80j18YLzQfe6drA?=\n\t=?utf-8?q?5+Bqe9y3U/kc1gAMVhL0TGWXqH3k05aAaSf2NcDgqwPldxvUi63X3t0f?=\n\t=?utf-8?q?CEgQHfw3Q/H0Si//weX6Do3pmYFMlxVyfv3FD7WEM8lFIxmBiuIAJSMS?=\n\t=?utf-8?q?5qhuUfIDkzaVzDrINd1RcVL/MuzWXARTljO0zy9UlGkU6MHhDsiE8vn3?=\n\t=?utf-8?q?Mjo9l+8LnmXI6AmY8eK6gmnX7/58A+JBOYwguq1X2scF3GrMeNH8VTJF?=\n\t=?utf-8?q?lTiA11b/zcEj0U36aLFjdxm1D/o5CDIW6y6hb/OA4rgNB9ZS2D8jZRnd?=\n\t=?utf-8?q?mwkrGvO+v4n067lizGKdiN5bG8w2ozaQH/90npjNsDyV0TVw5nh6U1ab?=\n\t=?utf-8?q?rhwbd1mQUmtYJQu9bvCFPA268KLESXvXwsCimZAfOdLycqa0+XFbq+T/?=\n\t=?utf-8?q?hNh7mGVZ6+8A9HBMhrh4Hul7eCm7UIB9vuSl6lNviioT6PQnFJrIEXd/?=\n\t=?utf-8?q?DWFPx781ZabU3aqdDGKfcDQg12VzjL/ZH+I2YQTvYQP6Ty+WD5KL1mMh?=\n\t=?utf-8?q?O9KrvjA+j8LEkI7s877a5u/PbU4mGh1B1ku4818h2287IzeXmsx7zS73?=\n\t=?utf-8?q?Bp8VvJzVkG3aQcEWXvtTCwPYvgMWQ=3D=3D?=","X-OriginatorOrg":"oss.nxp.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"c45f6c7c-7df3-4e6a-9cb8-08daaaabe271","X-MS-Exchange-CrossTenant-AuthSource":"PAXPR04MB8703.eurprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"10 Oct 2022 10:40:44.2666\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"686ea1d3-bc2b-4c6f-a92c-d99c5c301635","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"BJALKjDcYwvPfTA1NFb0mGWjrRhnUGypgiUZciPYDCE0hrzDxI3Z2mdjsGBefbFWKcRF5dU8ste8IKk3Gr+fxQ==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"VE1PR04MB7455","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"\"Xavier Roumegue \\(OSS\\) via libcamera-devel\"\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"\"Xavier Roumegue \\(OSS\\)\" <xavier.roumegue@oss.nxp.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25370,"web_url":"https://patchwork.libcamera.org/comment/25370/","msgid":"<20221010113454.3uebx5crdruuf3rd@uno.localdomain>","date":"2022-10-10T11:34:54","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Xavier\n\nOn Mon, Oct 10, 2022 at 12:40:36PM +0200, Xavier Roumegue (OSS) wrote:\n> Hi Jacopo,\n>\n> On 10/10/22 11:37, Jacopo Mondi wrote:\n> > Hi Xavier\n> >\n> > On Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n> > > From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> > >\n> > > The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n> > > \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n> > > simple pipeline handler with NXP ISI hardware.\n> > > The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n> > > missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n> > > between a media bus format and a colour encoding. So populate the structure with\n> > > the missing media bus formats.\n> > >\n> > > Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> >\n> > Just to point out that for JPEG, the entries we have in the main\n> > formats map, report YUV as color encoding\n> >\n> > src/libcamera/formats.cpp-      /* Compressed formats. */\n> > src/libcamera/formats.cpp-      { formats::MJPEG, {\n> > src/libcamera/formats.cpp-              .name = \"MJPEG\",\n> > src/libcamera/formats.cpp-              .format = formats::MJPEG,\n> > src/libcamera/formats.cpp-              .v4l2Formats = {\n> > src/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n> > src/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\n> > src/libcamera/formats.cpp-              },\n> > src/libcamera/formats.cpp-              .bitsPerPixel = 0,\n> > src/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> > src/libcamera/formats.cpp-              .packed = false,\n> > src/libcamera/formats.cpp-              .pixelsPerGroup = 1,\n> > src/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n> > src/libcamera/formats.cpp-      } },\n> >\n> > Unfortunately the kernel documentation for the format doesn't help\n> > much:\n> >\n> > https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\n> My poor colorspace knowledge does not give me a valuable opinion on that. It\n> seems that jpeg is not really bound to a colorspace.\n> I posted a v2 version with YUV as color encoding for JPEG so that the\n> encoding remains consistant in libcamera.\n\nSame for me, I cannot confirm which one is \"right\", but given that\ncolorspaces have been investigated in detail recently, I would use the\nmain formats table as a reference.\n\nThanks\n  j\n\n>\n> Xavier\n>\n> > > ---\n> > >   src/libcamera/v4l2_subdevice.cpp | 2 ++\n> > >   1 file changed, 2 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> > > index 9ef95963..f34eea24 100644\n> > > --- a/src/libcamera/v4l2_subdevice.cpp\n> > > +++ b/src/libcamera/v4l2_subdevice.cpp\n> > > @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n> > >   \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n> > > +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> > > @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n> > >   \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n> > >   \t/* \\todo Clarify colour encoding for HSV formats */\n> > >   \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> > > +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   };\n> > >\n> > >   } /* namespace */\n> > > --\n> > > 2.37.3\n> > >","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 072EFBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 11:34:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3BC4C62272;\n\tMon, 10 Oct 2022 13:34:58 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::224])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F18A562272\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 13:34:56 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 6A974E0009;\n\tMon, 10 Oct 2022 11:34:56 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665401698;\n\tbh=qKIgkH4Ztm4Lh0l8BtOK67+iJs08rgidGM7qv8l8HFM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=wIjBf7zJILTLVXosiN9Y1NNnt6Yk8jHCsKv5BqIcMMQUW5YySzNrVqafj66zfibmI\n\t2wbsJc5rbFmj88RPdYa6VNd1pD/ypfJZrhy5rY7p7xf5RmhbseyYjMJwDMnOxCvlMj\n\tECVUnGLzS3TeVUniq0wCGuI59GHle2VAsHByfhBHrCAhv2p0PwvFPdA8Hxrb/XxqWb\n\tYg6t8Dskqo0SMiqFkytx4VKht/qlqZWfoTARXbWHsEqTkR0Ywnk3YBEdwwzN4wrZWR\n\tgvPOpqjTUiTVdA52CF4IEYhyUe65pedDBPENKG5WNJqy+8ki7FUVHmxLFT5HxagQ0v\n\tq64ByKGYyEqgA==","Date":"Mon, 10 Oct 2022 13:34:54 +0200","To":"\"Xavier Roumegue (OSS)\" <xavier.roumegue@oss.nxp.com>","Message-ID":"<20221010113454.3uebx5crdruuf3rd@uno.localdomain>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>\n\t<20221010093745.knws36r4m2ura3er@uno.localdomain>\n\t<72ce0fbf-2a1b-398c-753a-8dff5f04f89e@oss.nxp.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<72ce0fbf-2a1b-398c-753a-8dff5f04f89e@oss.nxp.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25371,"web_url":"https://patchwork.libcamera.org/comment/25371/","msgid":"<70c2cb49-00b1-0e2c-c83c-c20d067e8d7f@ideasonboard.com>","date":"2022-10-10T17:12:23","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hello\n\nOn 10/10/22 3:07 PM, Jacopo Mondi via libcamera-devel wrote:\n> Hi Xavier\n>\n> On Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n>> From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n>>\n>> The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n>> \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n>> simple pipeline handler with NXP ISI hardware.\n>> The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n>> missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n>> between a media bus format and a colour encoding. So populate the structure with\n>> the missing media bus formats.\n>>\n>> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> Just to point out that for JPEG, the entries we have in the main\n> formats map, report YUV as color encoding\n\nAren't we comparing two different things here. I remember asking Laurent \nthat we do colorEncoding / PixelFormatInfo like structures for media-bus \nformats as well and we ended up with  [1]\n\nIt's mentioned in the documentation [2] that V4L2 Pixel formats are \ndifferent from media bus formats. So I guess the formats mentioned in \nformats.cpp do not apply / convey any kind of reference here\n\n\"The media bus pixel codes describe image formats as flowing over \nphysical buses (both between separate physical components and inside SoC \ndevices).\n  This should not be confused with the V4L2 pixel formats that describe, \nusing four character codes, image formats as stored in memory.\"\n\n[1] https://git.libcamera.org/libcamera/libcamera.git/commit/?id=d5ad19b\n[2] \nhttps://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html#media-bus-pixel-codes\n>\n> src/libcamera/formats.cpp-      /* Compressed formats. */\n> src/libcamera/formats.cpp-      { formats::MJPEG, {\n> src/libcamera/formats.cpp-              .name = \"MJPEG\",\n> src/libcamera/formats.cpp-              .format = formats::MJPEG,\n> src/libcamera/formats.cpp-              .v4l2Formats = {\n> src/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n> src/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\n> src/libcamera/formats.cpp-              },\n> src/libcamera/formats.cpp-              .bitsPerPixel = 0,\n> src/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> src/libcamera/formats.cpp-              .packed = false,\n> src/libcamera/formats.cpp-              .pixelsPerGroup = 1,\n> src/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n> src/libcamera/formats.cpp-      } },\n>\n> Unfortunately the kernel documentation for the format doesn't help\n> much:\n>\n> https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\n>> ---\n>>   src/libcamera/v4l2_subdevice.cpp | 2 ++\n>>   1 file changed, 2 insertions(+)\n>>\n>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>> index 9ef95963..f34eea24 100644\n>> --- a/src/libcamera/v4l2_subdevice.cpp\n>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>> @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>   \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>> +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n\nThis looks good to me\n>>   \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>   \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>> @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>   \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n>>   \t/* \\todo Clarify colour encoding for HSV formats */\n>>   \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>> +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n\nThis needs some investigation to be sure...\n>>   };\n>>\n>>   } /* namespace */\n>> --\n>> 2.37.3\n>>","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 30AA4C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 11:43:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A52E62D5D;\n\tMon, 10 Oct 2022 13:43:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 51A4462272\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 13:43:13 +0200 (CEST)","from [192.168.1.103] (unknown [103.86.18.150])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A4DE2BB0;\n\tMon, 10 Oct 2022 13:43:11 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665402194;\n\tbh=lEsJpyAbnUywC/4ZE5ZOB4bAJ1QAQNMZidbTjlgRb00=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=e0PxE1CKnsC4f9WH0anIvJbMdrEkdmI3Lz1THS3WmQLyxS9Eihn9KqrFdt+a+nlVM\n\t4Xwf40Jn0YBRTpN8Rwx/i6kTDRDfZz3xgzauQRXG6saE9Sweyzu3GnQMG6mex8si1V\n\tRoYWpGalBACiYsn4HZrXZhqFVDIZ0rdD41FSG4Y/sZYZt7ZNamBOyr5zojQ21o2N7Z\n\tJsNCABjqmdhS+vXW0FJCIXpTDeG5Zo5h765L4GWjLOEzYqEb01Dy3TZlkDHYn1G3yR\n\t0Xej3dNANlPwfpmfoNQlkQOKE2R5LBUHnRdNvMRmmHtR7KqQYsOxokElmCCdrZNyTo\n\tYfQxrmWok1CKA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665402192;\n\tbh=lEsJpyAbnUywC/4ZE5ZOB4bAJ1QAQNMZidbTjlgRb00=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=IuZFScwbuIWUKG3BB15GWq80VWNfyi55s+Dr7kb5PJVLgjvQHlP78MI3C2AA+boYK\n\t9cDDHw51SSgSg0nhvkwR8umBCZIu0yerFlTt1fE81S5YL4eZIvMwLeEdd9mdtZtjrC\n\tmr+nUerfaseRUkYObfvEk98gAlHVBD8pSz6NU17M="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IuZFScwb\"; dkim-atps=neutral","Message-ID":"<70c2cb49-00b1-0e2c-c83c-c20d067e8d7f@ideasonboard.com>","Date":"Mon, 10 Oct 2022 22:42:23 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.2.1","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\t\"Xavier Roumegue (OSS)\" <xavier.roumegue@oss.nxp.com>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>\n\t<20221010093745.knws36r4m2ura3er@uno.localdomain>","Content-Language":"en-US","In-Reply-To":"<20221010093745.knws36r4m2ura3er@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25372,"web_url":"https://patchwork.libcamera.org/comment/25372/","msgid":"<20221010123628.fjyn3jtcx6van3cd@uno.localdomain>","date":"2022-10-10T12:36:28","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang\n\nOn Mon, Oct 10, 2022 at 10:42:23PM +0530, Umang Jain wrote:\n> Hello\n>\n> On 10/10/22 3:07 PM, Jacopo Mondi via libcamera-devel wrote:\n> > Hi Xavier\n> >\n> > On Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n> > > From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> > >\n> > > The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n> > > \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n> > > simple pipeline handler with NXP ISI hardware.\n> > > The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n> > > missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n> > > between a media bus format and a colour encoding. So populate the structure with\n> > > the missing media bus formats.\n> > >\n> > > Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n> > Just to point out that for JPEG, the entries we have in the main\n> > formats map, report YUV as color encoding\n>\n> Aren't we comparing two different things here. I remember asking Laurent\n> that we do colorEncoding / PixelFormatInfo like structures for media-bus\n> formats as well and we ended up with  [1]\n>\n> It's mentioned in the documentation [2] that V4L2 Pixel formats are\n> different from media bus formats. So I guess the formats mentioned in\n> formats.cpp do not apply / convey any kind of reference here\n\nSure the two identifier spaces represent different things, as\npixelformats describe how pixels are displaced in memory while media\nbus formats describe how pixel are transported \"on the wires\", but as\nMEDIA_BUS_FMT_YUYV_* and V4L2_PIX_FMT_YUYV (and NV16/61, for this matter)\nconvey the same information about the downsampling ratio between\nthe luminance and chrominances components (they're all 4:2:2\ndownsampled), it is legit to assume that JPEG-encoded formats share the\nsame encoding scheme.\n\nHowever, being JPEG (in)famously under-specified as a term I cannot say with\nfull-confidence that ColourEncodingYUV is correct, but I would be\nsurprised if the color encoding scheme gets changed when transmitted\nin JPEG_1X8 format are stored into memory.\n\n>\n> \"The media bus pixel codes describe image formats as flowing over physical\n> buses (both between separate physical components and inside SoC devices).\n>  This should not be confused with the V4L2 pixel formats that describe,\n> using four character codes, image formats as stored in memory.\"\n>\n> [1] https://git.libcamera.org/libcamera/libcamera.git/commit/?id=d5ad19b\n> [2] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html#media-bus-pixel-codes\n> >\n> > src/libcamera/formats.cpp-      /* Compressed formats. */\n> > src/libcamera/formats.cpp-      { formats::MJPEG, {\n> > src/libcamera/formats.cpp-              .name = \"MJPEG\",\n> > src/libcamera/formats.cpp-              .format = formats::MJPEG,\n> > src/libcamera/formats.cpp-              .v4l2Formats = {\n> > src/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n> > src/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\n> > src/libcamera/formats.cpp-              },\n> > src/libcamera/formats.cpp-              .bitsPerPixel = 0,\n> > src/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> > src/libcamera/formats.cpp-              .packed = false,\n> > src/libcamera/formats.cpp-              .pixelsPerGroup = 1,\n> > src/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n> > src/libcamera/formats.cpp-      } },\n> >\n> > Unfortunately the kernel documentation for the format doesn't help\n> > much:\n> >\n> > https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\n> > > ---\n> > >   src/libcamera/v4l2_subdevice.cpp | 2 ++\n> > >   1 file changed, 2 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> > > index 9ef95963..f34eea24 100644\n> > > --- a/src/libcamera/v4l2_subdevice.cpp\n> > > +++ b/src/libcamera/v4l2_subdevice.cpp\n> > > @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n> > >   \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n> > > +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>\n> This looks good to me\n> > >   \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n> > >   \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> > > @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n> > >   \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n> > >   \t/* \\todo Clarify colour encoding for HSV formats */\n> > >   \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n> > > +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n>\n> This needs some investigation to be sure...\n> > >   };\n> > >\n> > >   } /* namespace */\n> > > --\n> > > 2.37.3\n> > >\n>","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 6A0BFBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 10 Oct 2022 12:36:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9913062D5E;\n\tMon, 10 Oct 2022 14:36:31 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 801FE62272\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 10 Oct 2022 14:36:30 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id A935420011;\n\tMon, 10 Oct 2022 12:36:29 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665405391;\n\tbh=9M7xGIRGv0YQfHxQTcOHzP+1jC+pRmJW6kxbXPFTwhI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=lpxeH5eAimbxKPw2Mg4Uch3akDDuhg71dYajct7OLdLRFsKGpD8rzMigRueZ//4ec\n\tciA6f5isN4/18lhnpm6nWtvcOcQMo4LWg0gP5I873GNUIpEUdWVRKyOVGP+ZK74AGa\n\tWH6RhKF2n56Ms1j5hRg5EqGSa0S4zZc9M9mvWoEd0O6BN0gHybnmkgPlEjLmucrXFl\n\tJJjzzQdsk3yLz/mf9yZhXrDA8oAIw54/pzuRIo9xe59v8juyNcSL2PMZ7Cz46NW5xt\n\tIIUi4TAB/WQXgh/OUJDkYI9t/EwRjTnOiRh1fhRCSFzicYxX3MOQb5unfpcUeY4IMA\n\th1FQqivX9KzoA==","Date":"Mon, 10 Oct 2022 14:36:28 +0200","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20221010123628.fjyn3jtcx6van3cd@uno.localdomain>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>\n\t<20221010093745.knws36r4m2ura3er@uno.localdomain>\n\t<70c2cb49-00b1-0e2c-c83c-c20d067e8d7f@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<70c2cb49-00b1-0e2c-c83c-c20d067e8d7f@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25418,"web_url":"https://patchwork.libcamera.org/comment/25418/","msgid":"<9f5269ba-fab4-05c5-67a0-756b04e29b60@ideasonboard.com>","date":"2022-10-14T14:16:26","subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo , Xavier\n\nFollowing up on the discussion\n\nOn 10/10/22 6:06 PM, Jacopo Mondi wrote:\n> Hi Umang\n>\n> On Mon, Oct 10, 2022 at 10:42:23PM +0530, Umang Jain wrote:\n>> Hello\n>>\n>> On 10/10/22 3:07 PM, Jacopo Mondi via libcamera-devel wrote:\n>>> Hi Xavier\n>>>\n>>> On Mon, Oct 10, 2022 at 11:22:56AM +0200, Xavier Roumegue (OSS) via libcamera-devel wrote:\n>>>> From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n>>>>\n>>>> The warnings \"Unknown subdev format 0x4001, defaulting to RGB encoding\" and\n>>>> \"Unknown subdev format 0x1013, defaulting to RGB encoding\" are thrown while using\n>>>> simple pipeline handler with NXP ISI hardware.\n>>>> The JPEG_1X8 and BGR888_1X24 media bus formats, supported by the ISI driver, are\n>>>> missing in the V4L2SubdeviceFormatInfo structure storing the correspondence\n>>>> between a media bus format and a colour encoding. So populate the structure with\n>>>> the missing media bus formats.\n>>>>\n>>>> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>\n>>> Just to point out that for JPEG, the entries we have in the main\n>>> formats map, report YUV as color encoding\n>> Aren't we comparing two different things here. I remember asking Laurent\n>> that we do colorEncoding / PixelFormatInfo like structures for media-bus\n>> formats as well and we ended up with  [1]\n>>\n>> It's mentioned in the documentation [2] that V4L2 Pixel formats are\n>> different from media bus formats. So I guess the formats mentioned in\n>> formats.cpp do not apply / convey any kind of reference here\n> Sure the two identifier spaces represent different things, as\n> pixelformats describe how pixels are displaced in memory while media\n> bus formats describe how pixel are transported \"on the wires\", but as\n> MEDIA_BUS_FMT_YUYV_* and V4L2_PIX_FMT_YUYV (and NV16/61, for this matter)\n> convey the same information about the downsampling ratio between\n> the luminance and chrominances components (they're all 4:2:2\n> downsampled), it is legit to assume that JPEG-encoded formats share the\n> same encoding scheme.\n>\n> However, being JPEG (in)famously under-specified as a term I cannot say with\n> full-confidence that ColourEncodingYUV is correct, but I would be\n> surprised if the color encoding scheme gets changed when transmitted\n> in JPEG_1X8 format are stored into memory.\n\nThat's correct, I guess we can't say will full confidence after all.\n\nHence I would adopt a pragmatic approach and say ColourEncodingYUV for \nJPEG media-bus format  as well.\n\nThere is v2 attached to this thread separately, so I'll give a R-B tag \nthere.\n>\n>> \"The media bus pixel codes describe image formats as flowing over physical\n>> buses (both between separate physical components and inside SoC devices).\n>>   This should not be confused with the V4L2 pixel formats that describe,\n>> using four character codes, image formats as stored in memory.\"\n>>\n>> [1] https://git.libcamera.org/libcamera/libcamera.git/commit/?id=d5ad19b\n>> [2] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html#media-bus-pixel-codes\n>>> src/libcamera/formats.cpp-      /* Compressed formats. */\n>>> src/libcamera/formats.cpp-      { formats::MJPEG, {\n>>> src/libcamera/formats.cpp-              .name = \"MJPEG\",\n>>> src/libcamera/formats.cpp-              .format = formats::MJPEG,\n>>> src/libcamera/formats.cpp-              .v4l2Formats = {\n>>> src/libcamera/formats.cpp-                      V4L2PixelFormat(V4L2_PIX_FMT_MJPEG),\n>>> src/libcamera/formats.cpp:                      V4L2PixelFormat(V4L2_PIX_FMT_JPEG),\n>>> src/libcamera/formats.cpp-              },\n>>> src/libcamera/formats.cpp-              .bitsPerPixel = 0,\n>>> src/libcamera/formats.cpp-              .colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n>>> src/libcamera/formats.cpp-              .packed = false,\n>>> src/libcamera/formats.cpp-              .pixelsPerGroup = 1,\n>>> src/libcamera/formats.cpp-              .planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n>>> src/libcamera/formats.cpp-      } },\n>>>\n>>> Unfortunately the kernel documentation for the format doesn't help\n>>> much:\n>>>\n>>> https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/subdev-formats.html?highlight=media_bus_fmt_jpeg_1x8\n>>>> ---\n>>>>    src/libcamera/v4l2_subdevice.cpp | 2 ++\n>>>>    1 file changed, 2 insertions(+)\n>>>>\n>>>> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n>>>> index 9ef95963..f34eea24 100644\n>>>> --- a/src/libcamera/v4l2_subdevice.cpp\n>>>> +++ b/src/libcamera/v4l2_subdevice.cpp\n>>>> @@ -68,6 +68,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>>>    \t{ MEDIA_BUS_FMT_RGB565_2X8_LE, { 16, \"RGB565_2X8_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>>>    \t{ MEDIA_BUS_FMT_RGB666_1X18, { 18, \"RGB666_1X18\", PixelFormatInfo::ColourEncodingRGB } },\n>>>>    \t{ MEDIA_BUS_FMT_RGB888_1X24, { 24, \"RGB888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>>>> +\t{ MEDIA_BUS_FMT_BGR888_1X24, { 24, \"BGR888_1X24\", PixelFormatInfo::ColourEncodingRGB } },\n>> This looks good to me\n>>>>    \t{ MEDIA_BUS_FMT_RGB888_2X12_BE, { 24, \"RGB888_2X12_BE\", PixelFormatInfo::ColourEncodingRGB } },\n>>>>    \t{ MEDIA_BUS_FMT_RGB888_2X12_LE, { 24, \"RGB888_2X12_LE\", PixelFormatInfo::ColourEncodingRGB } },\n>>>>    \t{ MEDIA_BUS_FMT_ARGB8888_1X32, { 32, \"ARGB8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>>>> @@ -133,6 +134,7 @@ const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {\n>>>>    \t{ MEDIA_BUS_FMT_SRGGB12_1X12, { 12, \"SRGGB12_1X12\", PixelFormatInfo::ColourEncodingRAW } },\n>>>>    \t/* \\todo Clarify colour encoding for HSV formats */\n>>>>    \t{ MEDIA_BUS_FMT_AHSV8888_1X32, { 32, \"AHSV8888_1X32\", PixelFormatInfo::ColourEncodingRGB } },\n>>>> +\t{ MEDIA_BUS_FMT_JPEG_1X8, { 8, \"JPEG_1X8\", PixelFormatInfo::ColourEncodingRGB } },\n>> This needs some investigation to be sure...\n>>>>    };\n>>>>\n>>>>    } /* namespace */\n>>>> --\n>>>> 2.37.3\n>>>>","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 EF161C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 Oct 2022 08:47:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4527362DB1;\n\tFri, 14 Oct 2022 10:47:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A8BBE61F67\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Oct 2022 10:47:17 +0200 (CEST)","from [192.168.1.103] (unknown [103.238.109.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 92CF06DE;\n\tFri, 14 Oct 2022 10:47:15 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1665737239;\n\tbh=oe3ijcbBv/uJeAJ9mVXIKmOVrrDwYuAialIWjJHI5bQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=qPWonfJeaXACgey8Q9SQJnb1VI0Fyxt+Jec8i7yvojvkDzdlTS+HxCkmyRQ57Tp7Z\n\t0LjSkSq+dGixsb5QBF+GJju+TdwA13PS0DyTyzJSof4cms6q26WnT1NQZzIlmLrqZ9\n\tQskkNkJh9Edr7fxbST6sRnDJBmoe+NoyNbvKU0vOBnOmOU24t2e+Vy/cO4wKY7rYyB\n\tGk8scXb2y8FlhAIMJ6sC8rVCidmfMYDCxMYFj3vJ3VseMsYJlm4QHvqLnEoZHay+aq\n\tEZJIUADDMl2l9ePy6oxx2sD836EtpxvDMFOJe9HjvzSX8wRReaixayFiqJv2qseZIo\n\tujNmDJg3wLiJw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1665737237;\n\tbh=oe3ijcbBv/uJeAJ9mVXIKmOVrrDwYuAialIWjJHI5bQ=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=nOxFDpRvNcrtY+IkE9boYaQ0KdsOj1bdrga/geHD4aRBb1G4nVRUcQhxfBC6JEWi1\n\t1dBZo5SqvlRvrhWor6Kw8ED+g8XU3JGK2GfAQDOsHFFRNpxpenspGfBY/jWKNUMUHU\n\tfmEfDlUEDMjoDB1egzJ0IbbTNkp1H/Z0yz97rPTE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"nOxFDpRv\"; dkim-atps=neutral","Message-ID":"<9f5269ba-fab4-05c5-67a0-756b04e29b60@ideasonboard.com>","Date":"Fri, 14 Oct 2022 19:46:26 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.2.1","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20221010092256.400870-1-xavier.roumegue@oss.nxp.com>\n\t<20221010093745.knws36r4m2ura3er@uno.localdomain>\n\t<70c2cb49-00b1-0e2c-c83c-c20d067e8d7f@ideasonboard.com>\n\t<20221010123628.fjyn3jtcx6van3cd@uno.localdomain>","Content-Language":"en-US","In-Reply-To":"<20221010123628.fjyn3jtcx6van3cd@uno.localdomain>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: v4l2_subdevice: Add\n\tJPEG_1X8 and BGR888_1X24 mbus formats to formatInfoMap","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]