{"id":18566,"url":"https://patchwork.libcamera.org/api/covers/18566/?format=json","web_url":"https://patchwork.libcamera.org/cover/18566/","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":"<20230427144740.64075-1-jacopo.mondi@ideasonboard.com>","date":"2023-04-27T14:47:34","name":"[libcamera-devel,v3,0/6] libcamera: imx8-isi: Remove pixelformat-2-media-bus map","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/18566/mbox/","series":[{"id":3852,"url":"https://patchwork.libcamera.org/api/series/3852/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3852","date":"2023-04-27T14:47:34","name":"libcamera: imx8-isi: Remove pixelformat-2-media-bus map","version":3,"mbox":"https://patchwork.libcamera.org/series/3852/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18566/comments/","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 0D6B6C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 14:48:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A7F7627B7;\n\tThu, 27 Apr 2023 16:47:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C53CB627B7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 16:47:58 +0200 (CEST)","from uno.lan (unknown\n\t[IPv6:2001:b07:5d2e:52c9:1cf0:b3bc:c785:4625])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D90E802;\n\tThu, 27 Apr 2023 16:47:46 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682606879;\n\tbh=pofF/u9OtkdCGx/FHnlBNd3RsXhIvam7pIEcVN64tRs=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=M29PYbC6879iPL2yOzNgD4XQ3SfqOEj5ZORtxtL3SSGhIQrD5TnK6sYdwelFAeN9C\n\tv/F87/T6z0nRx7NWQyzBJE9LFPWs1N3JK1EJFEj1yeaag1ZZXhWdR7TafHiEnw0qPx\n\tJho9mj37CrSgEOzOvUgwjcC1tuQRpYwQbYK0WBLIfpI19LMyDR3muQRYL3p4QO8i44\n\tTv0g07IwDELSK7CVXNIBchs9v84tnrEFQg0llOqKnMMtbhckSBA/H3nTB6618SydzA\n\tGRf2GbR69C7oI7NeYaUeQZzL1APD/+cpvg3LhGXVVNc+f/EiwHClLigbpOmWaFgEZ6\n\taxdPOQzTwgpJg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682606866;\n\tbh=pofF/u9OtkdCGx/FHnlBNd3RsXhIvam7pIEcVN64tRs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=haT8Rgpz9iRiDpDh11q41SKophqAqdjYGYdiMKMr1bR844fF8dW61Zf5WtzLIAm3k\n\tDtQH7rY67e2kw/c9bHemWAORNWzADHVRpomLNHfuHudC4Q9IvPqhFpRUClbD/1Oc/b\n\tm3Lli88M0cbIe/l4jqq2QBxvfoteo0qHYro6JNOw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"haT8Rgpz\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 27 Apr 2023 16:47:34 +0200","Message-Id":"<20230427144740.64075-1-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.40.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 0/6] libcamera: imx8-isi: Remove\n\tpixelformat-2-media-bus map","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":"The ISI pipeline handler currently associates the output PixelFormat with the\nmedia bus code that can produce it. This mapping is however limiting as\nthe ISI can produce any YUV/RGB format from any non-RAW media bus format.\n\nRework the format selection procedures in order to remove the association\nbetween pixel formats and mbus codes by introducing 4 new functions.\n\nThis fixes the problem originally pointed out by Laurent that when used with\nRAW sensors, the generated CameraConfiguration does not work as it assumes a\nYUV media bus code is available.\n\nTested with ov5640 which can produce UYVY8, RGB565 and SBGGR8.\n\n\t$ cam -c1\n\tSelected sensor format: 1920x1080-UYVY8_1X16\n\n\t$ cam -c1 --stream role=raw\n\tSelected sensor format: 2592x1944-SBGGR8_1X8\n\n\t$ cam -c1 --stream pixelformat=RGB565\n\tSelected sensor format: 1920x1080-RGB565_\n\nTested with imx219 which can only produce SRGGB10\n\n\t$ cam -c1\n\tSelected sensor format: 3280x2464-SRGGB10_1X10\n\n\t$ cam -c1 --stream pixelformat=YUV\n\tWARN ISI imx8-isi.cpp:278 Cannot find a supported YUV/RGB format\n\n\t$ cam -c1 --stream role=viewfinder\n\tSelected sensor format: 3280x2464-SRGGB10_1X10\n\nAlso fix the available stream formats list for both YUV and RAW use cases.\n\nv2->v3:\n- Fix (for real) the formatsMap_ to contain the ISI format and not the sensor\n  format\n- Add RAW14 formats\n- Minor style fixes as suggested by Laurent\n\nv1->v2:\n- Split out \"libcamera: camera_sensor: Add tryFormat()\"\n- Fix resolution the generated format map for RAW configuration as we can't\n  downscale\n- Minor fixes\n\nJacopo Mondi (6):\n  libcamera: imx8-isi: Break out RAW format selection\n  libcamera: imx8-isi: Break out YUV format selection\n  libcamera: imx8-isi: Automatically select media bus code\n  libcamera: camera_sensor: Add tryFormat()\n  libcamera: imx8-isi: Split Bayer/YUV config generation\n  libcamera: imx8-isi: Remove mbusCode from formatsMap_\n\n include/libcamera/internal/camera_sensor.h   |   1 +\n src/libcamera/camera_sensor.cpp              |  17 +\n src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 627 +++++++++++--------\n 3 files changed, 387 insertions(+), 258 deletions(-)\n\n--\n2.40.0"}