[{"id":36887,"web_url":"https://patchwork.libcamera.org/comment/36887/","msgid":"<5b0d420e-af29-48d3-8382-02527f198f73@ideasonboard.com>","date":"2025-11-18T13:20:01","subject":"Re: [PATCH] pipeline: simple: Reduce warning of unknown pixel\n\tformats","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 11. 18. 14:08 keltezéssel, Kieran Bingham írta:\n> The Simple Pipeline is designed to support a wide variety of pipeline\n> configurations and attached devices and will enumerate the pixel formats\n> of the connected sensors to map these to libcamera formats where\n> available.\n> \n> In fixed pipelines, where the pixel format is not mapped correctly it is\n> a desired behaviour to express this warning so that the pixelformat can\n> be added, while in the simple-pipeline case we do not expect warnings\n> for every discovered pixel format which is not supported by libcamera.\n> \n> This currently manifests itself as very highly verbose warnings about\n> unsupported pixel formats are not desired when there are working formats\n> that have already been enumerated.\n> \n> Fortunately in commit 434edb7b4480 (\"libcamera: formats: Fix warning for\n> unknown V4L2 pixfmt\") we have a mechanism to disable the warning for\n> occasions where we wish to ignore unsupported formats.\n> \n> Use this feature to disable the warning print of unsupported formats\n> when enumerating devices in the simple pipeline handler camera\n> tryPipeline construction.\n> \n> On devices such as the Pinephone, this removes overly verbose warnings\n> for tiled YUV formats:\n> \n> [0:06:39.291083146] [1922] ERROR SimplePipeline simple.cpp:1600 No valid pipeline for sensor 'gc2145 0-003c', skipping\n> [0:06:39.302229740] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.302779117] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.303417578] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.303928998] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> [0:06:39.304615751] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> \n> Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291\n> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n\nI think this makes sense. It might still be useful to log these at the \"debug\" level.\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/libcamera/pipeline/simple/simple.cpp | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 91715b7f8afd..5a722ce7cab9 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -710,7 +710,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size)\n>   \t\t<< \" ]\";\n>   \n>   \tfor (const auto &videoFormat : videoFormats) {\n> -\t\tPixelFormat pixelFormat = videoFormat.first.toPixelFormat();\n> +\t\tPixelFormat pixelFormat = videoFormat.first.toPixelFormat(false);\n>   \t\tif (!pixelFormat)\n>   \t\t\tcontinue;\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 93905C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Nov 2025 13:20:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1245609D8;\n\tTue, 18 Nov 2025 14:20:10 +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 C1B1E606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Nov 2025 14:20:07 +0100 (CET)","from [192.168.33.33] (185.221.143.100.nat.pool.zt.hu\n\t[185.221.143.100])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C4941F37;\n\tTue, 18 Nov 2025 14:18:02 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IaX8w6HL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763471883;\n\tbh=6csM3rcV09X50+DoR5DheLynY6MqrmVFFnk7I9QKpsA=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=IaX8w6HLcRSj1tuElpFzCNQAhu43e05im0M+y+aZJqkIaiUP0MmCiEnnu0RP6QW2K\n\tg3NMDpZ3qYcJ5evKTQFtFVUB+BxOWp0WpGTfvpOtS1JwVma5Lt0+u55A24pR5AB0X0\n\tnCx/RXVXYy7xVeFcs1wXoA/B8wZk8X1INY/C8y1U=","Message-ID":"<5b0d420e-af29-48d3-8382-02527f198f73@ideasonboard.com>","Date":"Tue, 18 Nov 2025 14:20:01 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] pipeline: simple: Reduce warning of unknown pixel\n\tformats","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20251118130812.17594-1-kieran.bingham@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251118130812.17594-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":36888,"web_url":"https://patchwork.libcamera.org/comment/36888/","msgid":"<176347209104.567526.14760330743746424018@ping.linuxembedded.co.uk>","date":"2025-11-18T13:21:31","subject":"Re: [PATCH] pipeline: simple: Reduce warning of unknown pixel\n\tformats","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2025-11-18 13:20:01)\n> 2025. 11. 18. 14:08 keltezéssel, Kieran Bingham írta:\n> > The Simple Pipeline is designed to support a wide variety of pipeline\n> > configurations and attached devices and will enumerate the pixel formats\n> > of the connected sensors to map these to libcamera formats where\n> > available.\n> > \n> > In fixed pipelines, where the pixel format is not mapped correctly it is\n> > a desired behaviour to express this warning so that the pixelformat can\n> > be added, while in the simple-pipeline case we do not expect warnings\n> > for every discovered pixel format which is not supported by libcamera.\n> > \n> > This currently manifests itself as very highly verbose warnings about\n> > unsupported pixel formats are not desired when there are working formats\n> > that have already been enumerated.\n> > \n> > Fortunately in commit 434edb7b4480 (\"libcamera: formats: Fix warning for\n> > unknown V4L2 pixfmt\") we have a mechanism to disable the warning for\n> > occasions where we wish to ignore unsupported formats.\n> > \n> > Use this feature to disable the warning print of unsupported formats\n> > when enumerating devices in the simple pipeline handler camera\n> > tryPipeline construction.\n> > \n> > On devices such as the Pinephone, this removes overly verbose warnings\n> > for tiled YUV formats:\n> > \n> > [0:06:39.291083146] [1922] ERROR SimplePipeline simple.cpp:1600 No valid pipeline for sensor 'gc2145 0-003c', skipping\n> > [0:06:39.302229740] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> > [0:06:39.302779117] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> > [0:06:39.303417578] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> > [0:06:39.303928998] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> > [0:06:39.304615751] [1922]  WARN V4L2 v4l2_pixelformat.cpp:346 Unsupported V4L2 pixel format HM12\n> > \n> > Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/291\n> > Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> \n> I think this makes sense. It might still be useful to log these at the \"debug\" level.\n\nLets do that explictily in the simple pipeline handler then.\n\nv2 incoming.\n\n> \n> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> \n> \n> >   src/libcamera/pipeline/simple/simple.cpp | 2 +-\n> >   1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> > index 91715b7f8afd..5a722ce7cab9 100644\n> > --- a/src/libcamera/pipeline/simple/simple.cpp\n> > +++ b/src/libcamera/pipeline/simple/simple.cpp\n> > @@ -710,7 +710,7 @@ void SimpleCameraData::tryPipeline(unsigned int code, const Size &size)\n> >               << \" ]\";\n> >   \n> >       for (const auto &videoFormat : videoFormats) {\n> > -             PixelFormat pixelFormat = videoFormat.first.toPixelFormat();\n> > +             PixelFormat pixelFormat = videoFormat.first.toPixelFormat(false);\n> >               if (!pixelFormat)\n> >                       continue;\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 C4E07C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Nov 2025 13:21:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 54D6F60A81;\n\tTue, 18 Nov 2025 14:21:35 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 92FF2606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Nov 2025 14:21:33 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D240D1E33;\n\tTue, 18 Nov 2025 14:19:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TbCKy7iU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763471969;\n\tbh=cNV4bxzVuyozbwvPo6Cv401wzMZxHm5THQx1W2J2j8w=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=TbCKy7iUgCOSHeJHYUCaS9xCGHPeHwVvmRHAni/LDcCKxU1z5ytpMsHFfdU9hOlps\n\ttYIlUzAs5QFBcPTCEHLFvqhiyPUqzTn/jYcIKhwe6sP+1AhSzSJVLxhhdjFsmWEdfE\n\t3/QWfKks4QefFJfhqYNbtg/Bx17Fp4smh223kEF8=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<5b0d420e-af29-48d3-8382-02527f198f73@ideasonboard.com>","References":"<20251118130812.17594-1-kieran.bingham@ideasonboard.com>\n\t<5b0d420e-af29-48d3-8382-02527f198f73@ideasonboard.com>","Subject":"Re: [PATCH] pipeline: simple: Reduce warning of unknown pixel\n\tformats","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 18 Nov 2025 13:21:31 +0000","Message-ID":"<176347209104.567526.14760330743746424018@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]