Patch Detail
Show a patch.
GET /api/patches/18222/?format=api
{ "id": 18222, "url": "https://patchwork.libcamera.org/api/patches/18222/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18222/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230129135830.27490-6-jacopo.mondi@ideasonboard.com>", "date": "2023-01-29T13:58:30", "name": "[libcamera-devel,5/5] libcamera: imx8-isi: Remove mbusCode from formatsMap_", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a3214bee7c2e19ba3a3cfff862c3d6279cc73b9b", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18222/mbox/", "series": [ { "id": 3730, "url": "https://patchwork.libcamera.org/api/series/3730/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3730", "date": "2023-01-29T13:58:25", "name": "libcamera: imx8-isi: Remove pixelformat-2-media-bus map", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3730/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18222/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18222/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 35CBEC3242\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 29 Jan 2023 13:58:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6D6D0625E8;\n\tSun, 29 Jan 2023 14:58:53 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC4E9625E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 29 Jan 2023 14:58:49 +0100 (CET)", "from uno.localdomain (mob-5-90-54-203.net.vodafone.it\n\t[5.90.54.203])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 49FC9449;\n\tSun, 29 Jan 2023 14:58:49 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675000733;\n\tbh=Ofx7L4xjftg48uUvNiLDmYde6zcfpbM7wMHYVeRs3uQ=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=RSwVkSgcje7F6xWqAx+NGEcezR5H8+7Khoym6u7r/wcSVFeLxjNOFYUWrbM4TCR+f\n\t/+brawXW8SK5RfKckloonAuwU5mZz0c2OVxcNR5Xkz2oAd82q8Yj14OUymnFrdf+tq\n\t5pmXITQqL00AsPHZIhKkIOnXj0u3wlyNUSo4/Qyr83/T1Ql4wY+idE4bbj0ZFQLxBC\n\tFpiqhGI4gX84HSfmHFz7nXC8yXNPafyWocFZ4HpeeNQHBS9grOtzcFqR6ncGICeJxH\n\tfNtLGpf0/IwlnO/6Qm6pMix8hACEw0EfSxDYL5f0RH3eZ6+wCt44SzX8FJzKeTUmrF\n\tJvD7rjDH3bPgQ==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1675000729;\n\tbh=Ofx7L4xjftg48uUvNiLDmYde6zcfpbM7wMHYVeRs3uQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Ixg/bHU7E0HemQNguBt8omrDsG+A+lgCI9Yq/tRKxFYbYU2oFHlwX6Dvcf1MrFe/+\n\thzDx5g5r0iS93AM2hYWwBc2c0Dg6qcz0nd8iXVZO5+nNijrekkDjg+keFCD/4/qnvV\n\tnSViNeyUV1FwX3MVXsWTvGShfxYKh3ubpA1Hpt6Q=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Ixg/bHU7\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 29 Jan 2023 14:58:30 +0100", "Message-Id": "<20230129135830.27490-6-jacopo.mondi@ideasonboard.com>", "X-Mailer": "git-send-email 2.39.0", "In-Reply-To": "<20230129135830.27490-1-jacopo.mondi@ideasonboard.com>", "References": "<20230129135830.27490-1-jacopo.mondi@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 5/5] libcamera: imx8-isi: Remove mbusCode\n\tfrom formatsMap_", "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.mondi@ideasonboard.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that the media bus code selection procedure does not depend\non the ISICameraConfiguration::formatsMap_ remove the association\nbetween PixelFormat supported by the ISI and the media bus code produced\nby the sensor.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 159 ++++---------------\n 1 file changed, 29 insertions(+), 130 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\nindex 0e1e87c7a2aa..f754f5d77f90 100644\n--- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n+++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n@@ -76,18 +76,6 @@ public:\n class ISICameraConfiguration : public CameraConfiguration\n {\n public:\n-\t/*\n-\t * formatsMap_ records the association between an output pixel format\n-\t * and the combination of V4L2 pixel format and media bus codes that have\n-\t * to be applied to the pipeline.\n-\t */\n-\tstruct PipeFormat {\n-\t\tunsigned int isiCode;\n-\t\tunsigned int sensorCode;\n-\t};\n-\n-\tusing FormatMap = std::map<PixelFormat, PipeFormat>;\n-\n \tISICameraConfiguration(ISICameraData *data)\n \t\t: data_(data)\n \t{\n@@ -95,7 +83,7 @@ public:\n \n \tStatus validate() override;\n \n-\tstatic const FormatMap formatsMap_;\n+\tstatic const std::map<PixelFormat, unsigned int> formatsMap_;\n \n \tV4L2SubdeviceFormat sensorFormat_;\n \n@@ -333,121 +321,33 @@ unsigned int ISICameraData::getMediaBusFormat(PixelFormat *pixelFormat) const\n * Camera Configuration\n */\n \n-/**\n- * \\todo Do not associate the sensor format to non-RAW pixelformats, as\n- * the ISI can do colorspace conversion.\n+/*\n+ * ISICameraConfiguration::formatsMap_ records the association between an output\n+ * pixel format and the ISI source pixel format to be applied to the pipeline.\n */\n-const ISICameraConfiguration::FormatMap ISICameraConfiguration::formatsMap_ = {\n-\t{\n-\t\tformats::YUYV,\n-\t\t{ MEDIA_BUS_FMT_YUV8_1X24,\n-\t\t MEDIA_BUS_FMT_UYVY8_1X16 },\n-\t},\n-\t{\n-\t\tformats::AVUY8888,\n-\t\t{ MEDIA_BUS_FMT_YUV8_1X24,\n-\t\t MEDIA_BUS_FMT_UYVY8_1X16 },\n-\t},\n-\t{\n-\t\tformats::NV12,\n-\t\t{ MEDIA_BUS_FMT_YUV8_1X24,\n-\t\t MEDIA_BUS_FMT_UYVY8_1X16 },\n-\t},\n-\t{\n-\t\tformats::NV16,\n-\t\t{ MEDIA_BUS_FMT_YUV8_1X24,\n-\t\t MEDIA_BUS_FMT_UYVY8_1X16 },\n-\t},\n-\t{\n-\t\tformats::YUV444,\n-\t\t{ MEDIA_BUS_FMT_YUV8_1X24,\n-\t\t MEDIA_BUS_FMT_UYVY8_1X16 },\n-\t},\n-\t{\n-\t\tformats::RGB565,\n-\t\t{ MEDIA_BUS_FMT_RGB888_1X24,\n-\t\t MEDIA_BUS_FMT_RGB565_1X16 },\n-\t},\n-\t{\n-\t\tformats::BGR888,\n-\t\t{ MEDIA_BUS_FMT_RGB888_1X24,\n-\t\t MEDIA_BUS_FMT_RGB565_1X16 },\n-\t},\n-\t{\n-\t\tformats::RGB888,\n-\t\t{ MEDIA_BUS_FMT_RGB888_1X24,\n-\t\t MEDIA_BUS_FMT_RGB565_1X16 },\n-\t},\n-\t{\n-\t\tformats::XRGB8888,\n-\t\t{ MEDIA_BUS_FMT_RGB888_1X24,\n-\t\t MEDIA_BUS_FMT_RGB565_1X16 },\n-\t},\n-\t{\n-\t\tformats::ABGR8888,\n-\t\t{ MEDIA_BUS_FMT_RGB888_1X24,\n-\t\t MEDIA_BUS_FMT_RGB565_1X16 },\n-\t},\n-\t{\n-\t\tformats::SBGGR8,\n-\t\t{ MEDIA_BUS_FMT_SBGGR8_1X8,\n-\t\t MEDIA_BUS_FMT_SBGGR8_1X8 },\n-\t},\n-\t{\n-\t\tformats::SGBRG8,\n-\t\t{ MEDIA_BUS_FMT_SGBRG8_1X8,\n-\t\t MEDIA_BUS_FMT_SGBRG8_1X8 },\n-\t},\n-\t{\n-\t\tformats::SGRBG8,\n-\t\t{ MEDIA_BUS_FMT_SGRBG8_1X8,\n-\t\t MEDIA_BUS_FMT_SGRBG8_1X8 },\n-\t},\n-\t{\n-\t\tformats::SRGGB8,\n-\t\t{ MEDIA_BUS_FMT_SRGGB8_1X8,\n-\t\t MEDIA_BUS_FMT_SRGGB8_1X8 },\n-\t},\n-\t{\n-\t\tformats::SBGGR10,\n-\t\t{ MEDIA_BUS_FMT_SBGGR10_1X10,\n-\t\t MEDIA_BUS_FMT_SBGGR10_1X10 },\n-\t},\n-\t{\n-\t\tformats::SGBRG10,\n-\t\t{ MEDIA_BUS_FMT_SGBRG10_1X10,\n-\t\t MEDIA_BUS_FMT_SGBRG10_1X10 },\n-\t},\n-\t{\n-\t\tformats::SGRBG10,\n-\t\t{ MEDIA_BUS_FMT_SGRBG10_1X10,\n-\t\t MEDIA_BUS_FMT_SGRBG10_1X10 },\n-\t},\n-\t{\n-\t\tformats::SRGGB10,\n-\t\t{ MEDIA_BUS_FMT_SRGGB10_1X10,\n-\t\t MEDIA_BUS_FMT_SRGGB10_1X10 },\n-\t},\n-\t{\n-\t\tformats::SBGGR12,\n-\t\t{ MEDIA_BUS_FMT_SBGGR12_1X12,\n-\t\t MEDIA_BUS_FMT_SBGGR12_1X12 },\n-\t},\n-\t{\n-\t\tformats::SGBRG12,\n-\t\t{ MEDIA_BUS_FMT_SGBRG12_1X12,\n-\t\t MEDIA_BUS_FMT_SGBRG12_1X12 },\n-\t},\n-\t{\n-\t\tformats::SGRBG12,\n-\t\t{ MEDIA_BUS_FMT_SGRBG12_1X12,\n-\t\t MEDIA_BUS_FMT_SGRBG12_1X12 },\n-\t},\n-\t{\n-\t\tformats::SRGGB12,\n-\t\t{ MEDIA_BUS_FMT_SRGGB12_1X12,\n-\t\t MEDIA_BUS_FMT_SRGGB12_1X12 },\n-\t},\n+const std::map<PixelFormat, unsigned int> ISICameraConfiguration::formatsMap_ = {\n+\t{ formats::YUYV, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::AVUY8888, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::NV12, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::NV16, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::YUV444, MEDIA_BUS_FMT_UYVY8_1X16 },\n+\t{ formats::RGB565, MEDIA_BUS_FMT_RGB565_1X16 },\n+\t{ formats::BGR888, MEDIA_BUS_FMT_RGB565_1X16 },\n+\t{ formats::RGB888, MEDIA_BUS_FMT_RGB565_1X16 },\n+\t{ formats::XRGB8888, MEDIA_BUS_FMT_RGB565_1X16 },\n+\t{ formats::ABGR8888, MEDIA_BUS_FMT_RGB565_1X16 },\n+\t{ formats::SBGGR8, MEDIA_BUS_FMT_SBGGR8_1X8 },\n+\t{ formats::SGBRG8, MEDIA_BUS_FMT_SGBRG8_1X8 },\n+\t{ formats::SGRBG8, MEDIA_BUS_FMT_SGRBG8_1X8 },\n+\t{ formats::SRGGB8, MEDIA_BUS_FMT_SRGGB8_1X8 },\n+\t{ formats::SBGGR10, MEDIA_BUS_FMT_SBGGR10_1X10 },\n+\t{ formats::SGBRG10, MEDIA_BUS_FMT_SGBRG10_1X10 },\n+\t{ formats::SGRBG10, MEDIA_BUS_FMT_SGRBG10_1X10 },\n+\t{ formats::SRGGB10, MEDIA_BUS_FMT_SRGGB10_1X10 },\n+\t{ formats::SBGGR12, MEDIA_BUS_FMT_SBGGR12_1X12 },\n+\t{ formats::SGBRG12, MEDIA_BUS_FMT_SGBRG12_1X12 },\n+\t{ formats::SGRBG12, MEDIA_BUS_FMT_SGRBG12_1X12 },\n+\t{ formats::SRGGB12, MEDIA_BUS_FMT_SRGGB12_1X12 },\n };\n \n /*\n@@ -991,11 +891,10 @@ int PipelineHandlerISI::configure(Camera *camera, CameraConfiguration *c)\n \t\t * size is taken from the sink's COMPOSE (or source's CROP,\n \t\t * if any) rectangles.\n \t\t */\n-\t\tconst ISICameraConfiguration::PipeFormat &pipeFormat =\n-\t\t\tISICameraConfiguration::formatsMap_.at(config.pixelFormat);\n+\t\tunsigned int isiCode = ISICameraConfiguration::formatsMap_.at(config.pixelFormat);\n \n \t\tV4L2SubdeviceFormat isiFormat{};\n-\t\tisiFormat.mbus_code = pipeFormat.isiCode;\n+\t\tisiFormat.mbus_code = isiCode;\n \t\tisiFormat.size = config.size;\n \n \t\tret = pipe->isi->setFormat(1, &isiFormat);\n", "prefixes": [ "libcamera-devel", "5/5" ] }