[{"id":39870,"web_url":"https://patchwork.libcamera.org/comment/39870/","msgid":"<178515194716.1159743.5238363888598497305@ping.linuxembedded.co.uk>","date":"2026-07-27T11:32:27","subject":"Re: [PATCH v1] libcamera: v4l2_videodevice: Use `VIDEO_MAX_PLANES`","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 (2026-07-27 12:08:52)\n> The `V4L2DeviceFormat` type is directly initialized from `v4l2_pix_format_mplane`\n> in `V4L2VideoDevice::getFormatMultiplane()`. That type can store a maxumim\n\ns/maxumim/maximum/\n\n> of 8 planes. So adjust the number of planes that `V4L2DeviceFormat` supports\n> to match the V4L2 limit.\n\nHave we already hit a device trying to use more than 3 planes?\n\nAnyway, this seems accurate for the V4L2 device level and the\nallocation cost is cheap so:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  include/libcamera/internal/v4l2_videodevice.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index 10367e4e17..f63d74879f 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -176,7 +176,7 @@ public:\n>         Size size;\n>         std::optional<ColorSpace> colorSpace;\n>  \n> -       std::array<Plane, 3> planes;\n> +       std::array<Plane, VIDEO_MAX_PLANES> planes;\n>         unsigned int planesCount = 0;\n>  \n>         std::string toString() const;\n> -- \n> 2.55.0\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 37B50BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jul 2026 11:32:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7627D67F68;\n\tMon, 27 Jul 2026 13:32:31 +0200 (CEST)","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 F325E67EB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jul 2026 13:32:29 +0200 (CEST)","from monstersaurus.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 261B1492;\n\tMon, 27 Jul 2026 13:31:26 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KdtjaJ+w\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785151886;\n\tbh=DgrzMFNIFdGkiwP6yr2i2hY/u9OQ9H8Vrb0CJxmD5G4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=KdtjaJ+wFd6cHAyst342FTZy0LW1GQe7U23CFjVwjAYKQtiXwHYYqaNUlNOXLMob/\n\t/z2ekJnCyPcKrFYPsPiOVUQoG5BAuqm7GYvVlaAekByIpauMdd9Uh7kdaDO25jD1bk\n\tfp1haQE0Y1ByEoQR+Uhao3dxLb8axYpTqx2V43LM=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260727110852.260904-1-barnabas.pocze@ideasonboard.com>","References":"<20260727110852.260904-1-barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v1] libcamera: v4l2_videodevice: Use `VIDEO_MAX_PLANES`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 27 Jul 2026 12:32:27 +0100","Message-ID":"<178515194716.1159743.5238363888598497305@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>"}}]