[{"id":39363,"web_url":"https://patchwork.libcamera.org/comment/39363/","msgid":"<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>","date":"2026-06-24T08:41:52","subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nThanks for this!\n\nOn Wed, 24 Jun 2026 at 09:35, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> In generateConfiguration(), set the default packing on RAW streams to\n> BayerFormat::Packing::None. This default is easier to handle over\n> CSI2 packed or PiSP Bayer compressed packaing options.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 5a5acf6a164b..e0f364272746 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -410,7 +410,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n>                         size = sensorSize;\n>                         sensorFormat = data->findBestFormat(size, defaultRawBitDepth);\n>                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.code,\n> -                                                           BayerFormat::Packing::CSI2);\n> +                                                           BayerFormat::Packing::None);\n>                         ASSERT(pixelFormat.isValid());\n>                         colorSpace = ColorSpace::Raw;\n>                         bufferCount = 2;\n> --\n> 2.53.0\n>\n\nI think we probably just want to check first whether all our\napplication-level code explicitly sets the packing after a\ngenerateConfiguration() or not, as otherwise it would be a bit of a\nbehaviour change. Will get back to you on this...!\n\nThanks!\n\nDavid","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 653E3C3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Jun 2026 08:42:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 009666587D;\n\tWed, 24 Jun 2026 10:42:05 +0200 (CEST)","from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E45E065871\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 10:42:04 +0200 (CEST)","by mail-ed1-x52b.google.com with SMTP id\n\t4fb4d7f45d1cf-697b8540279so1206460a12.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 01:42:04 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"hOGdKNj5\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1782290524; cv=none;\n\td=google.com; s=arc-20240605;\n\tb=KTzO8nkVf47mGrF+KejBi61GXnKAeJWNw2YaozWBu2wo+XL8cfhBtjCZHxPvbRpBPY\n\tJHcb/yduWNNNqlE36j+HM7iBSYwdYxdYib07Fb5jPuJhUYUk5Nk8w7P8oHW/o/xhfRpj\n\tjhFuoCB6LdwMmiNzRdASYtYb09SiPvPrtfQt47iwsrIu50iRF9E9SHlzvLnuMPZ0qQZe\n\tEHPSyr6FyqIZGy4YUiQ5kMYeArdLdonJU9g5tVnUG8DoRr/s/9w8/wFsZl1k+I3sxlf5\n\th3sdjmB3yspAeaeZKEryO+9E4AMIg8qYwXo+5hkGyb/BJoTTlxwK5AU2VwL6FCsVWwbo\n\t5Fpw==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20240605; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:dkim-signature;\n\tbh=7SzkrN8J2Rs6HY+6ZCPoX1SUl8UlkkEx4qw1+8ocDE4=;\n\tfh=24Q+cvxO2MyQyOWig8dQzAv5WkSICwpSuSPmFCG0Zgc=;\n\tb=Qt1NqPFLPyh0hxKoU6evAOwWNCvlOJN9pnCcKWO9j6D0D0wRX66ZAtOU9/4ww+zqlr\n\tsWVe77CLDTJSbMoKMV+pHk6y+XZQmkHET9iD/JtcV+efDDLEK86i3WVY15paAs86L2vj\n\twdle7M/9vRbSE+yuz48zOiPgQNGL2lUWb7tFFhscodSBQwW6Okxy2NK+Uk/ccJDZ4EvR\n\t3VRt2IaRoctrOLSHR/Mv2FwvqJpKnf2XrkD7bzxwkC9jLmXWsJlDMw8CsqanzOV+pj0e\n\t/jUtrQcHkCDBTwCnO4dfakQHV1Ye/UKiMxQGRnyLzzt8lmC51KlwzMW1GNc3matuBB6h\n\t3MXQ==; darn=lists.libcamera.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1782290524; x=1782895324;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=7SzkrN8J2Rs6HY+6ZCPoX1SUl8UlkkEx4qw1+8ocDE4=;\n\tb=hOGdKNj5FEFSHGFl2da6l7uRckeESXWcrW5h+GhVSmgrI4aexCpKuaoDtbkAmdaGr2\n\t4GjAlY+SMK3vELmnFXOjQu5DPQkyUlJZCK3VWNRT55UOdesgKjZYFY4e/p7FJi6toKyX\n\t5dpQ8NsN2ivf5QvMwYgXNvSGdwcIweZEWFJ/HAyBzhnbQOGfK8goeZPMUsOIaPDD8gxc\n\tC4uSTXW/1kaj7iY3aqFWwOySvEkFofBpOyt6JCGAcniL4liVb6cGkL5AHJb7jqEDKG90\n\tJfsQrmdToIL914ivjg1uUpLABDU1R4ceRTf8pTKM8KYfoFOftdMHwEtfLKXIF1i95mrF\n\tpKSw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782290524; x=1782895324;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=7SzkrN8J2Rs6HY+6ZCPoX1SUl8UlkkEx4qw1+8ocDE4=;\n\tb=QQqOjwoBWEEiGfCOFaSw4zpoCp9eP5UpezDM6aYEorryw2AsB1cArzZVU1LMiZSQm1\n\tR0KWSgMGvVvQK7eYRZROSZXG0Vtz5xBZk0MxMyZQicZCctvigyM3GG6MwQQrINqdewFw\n\t0LrRHJBje0dsxp1z3tq6Ei2swxn/yXNF70NHVZO5+strRXWRqT1fiHLY0rpCHUQU5Afu\n\tUOdH+fIpoe6tT0T+thQSXoHpxNbL5SK2tLEIMmmzVqyScXbyytLcsDC1iLUzNmdJuM/I\n\thldO/KkShQPry/Dia8nACkgKxf84NqvNZX+pDEqOy1q9d3J7zlFNynN6hRXIWuWQTEfQ\n\tSWPw==","X-Gm-Message-State":"AOJu0YzBFyz0HJZQYibgfblvvDLn0WxdVNwt7ZUAV6N2ykx01rN4UIOe\n\tmxO6e6Qb9lqBGCXf5iCpv+tZzwE67VehtgFktbDn91x+Ku/SRF3pMK/Bi81aOF7kViOEdFYkwH8\n\tdTA86nsljVcYPNw8Zi4hXVFPFxefY3SO7s4GoS1R7QA==","X-Gm-Gg":"AfdE7cm8HSyN7GLL2u+2jNIgwQwDUBhSyIIVwolbr6ffWyNJDj0GUT+xjhLyb3dnXsQ\n\taJcxrb6d3u5xfZQ/8KnwmVLFjlT6mgYmhugHPFZVqpUyDS81F3hBgMBvu1RKfBvM76izLVSaRY1\n\tZSznRwR1QYchiHWAJLbPIpHKYuiQ7Eq77T0TlHpyYgmVrySTsp6oAExVde3yJAcm0vpntqXiTJA\n\tIxZU7YxVIFH/RVTTQSrARfiasK4JmZ5CWIrVFaARuBzm7jqqpcgFVTasScyKOjulB9Qrcglh+Lb\n\t4wjoyOmtbsJEhMBwJ4ompgPQHgnnlmx2vfYQcixoCteT5OGNb+/wMphOZrTO5pHd/T0I2EQXgin\n\tQwTJdt0/DjCszOg==","X-Received":"by 2002:a05:6402:274e:b0:697:ef1c:b5f7 with SMTP id\n\t4fb4d7f45d1cf-697ef1cb708mr1378836a12.7.1782290524325;\n\tWed, 24 Jun 2026 01:42:04 -0700 (PDT)","MIME-Version":"1.0","References":"<20260624082705.272795-1-naush@raspberrypi.com>\n\t<20260624082705.272795-2-naush@raspberrypi.com>","In-Reply-To":"<20260624082705.272795-2-naush@raspberrypi.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Wed, 24 Jun 2026 09:41:52 +0100","X-Gm-Features":"AVVi8Ce-uTDZeZ72--IKSfe41Q4jLjjfzfZU0UZBOaFHE5MOf8zYsoGccdb_OLk","Message-ID":"<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>","Subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org, laurent.pinchart@ideasonboard.com","Content-Type":"text/plain; charset=\"UTF-8\"","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":39398,"web_url":"https://patchwork.libcamera.org/comment/39398/","msgid":"<20260624201446.GK851255@killaraus.ideasonboard.com>","date":"2026-06-24T20:14:46","subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Jun 24, 2026 at 09:41:52AM +0100, David Plowman wrote:\n> On Wed, 24 Jun 2026 at 09:35, Naushir Patuck <naush@raspberrypi.com> wrote:\n> >\n> > In generateConfiguration(), set the default packing on RAW streams to\n> > BayerFormat::Packing::None. This default is easier to handle over\n> > CSI2 packed or PiSP Bayer compressed packaing options.\n\ns/packaing/packing/\n\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > index 5a5acf6a164b..e0f364272746 100644\n> > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > @@ -410,7 +410,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n> >                         size = sensorSize;\n> >                         sensorFormat = data->findBestFormat(size, defaultRawBitDepth);\n> >                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.code,\n> > -                                                           BayerFormat::Packing::CSI2);\n> > +                                                           BayerFormat::Packing::None);\n> >                         ASSERT(pixelFormat.isValid());\n> >                         colorSpace = ColorSpace::Raw;\n> >                         bufferCount = 2;\n> \n> I think we probably just want to check first whether all our\n> application-level code explicitly sets the packing after a\n> generateConfiguration() or not, as otherwise it would be a bit of a\n> behaviour change. Will get back to you on this...!\n\nGood idea.\n\nI'd be fine defaulting to CSI-2 packing as that's standard, but on Pi 5\nthat's not a valid option. We could make this conditional and default to\nCSI-2 for Pi 4 and None for Pi 5 if desired.","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 0F729C3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Jun 2026 20:14:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2469E658B7;\n\tWed, 24 Jun 2026 22:14:49 +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 34772658AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Jun 2026 22:14:48 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 58E6C21C;\n\tWed, 24 Jun 2026 22:14:08 +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=\"NNI7bXla\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782332048;\n\tbh=KAJaRRmlJtA85NBw/sOzhfsaXeaLRW5kSYYxcRNK+Ao=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NNI7bXlaJaPyGGq9eoVFoYTbZZFOzvk/W3F5DtyrkauG/qphJvFKqXq2XGgEWUWgH\n\tZuMlj87bne4OPa87CluE8bJMy8wKyLN5eaDZz/85SfT4yKCDIZuMhEe3+RBFAKqwhR\n\toX71t+09FZI5SpyqLScGrioINnqiWIfPwu7PvGP0=","Date":"Wed, 24 Jun 2026 23:14:46 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","Message-ID":"<20260624201446.GK851255@killaraus.ideasonboard.com>","References":"<20260624082705.272795-1-naush@raspberrypi.com>\n\t<20260624082705.272795-2-naush@raspberrypi.com>\n\t<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>","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":39409,"web_url":"https://patchwork.libcamera.org/comment/39409/","msgid":"<CAHW6GYJ9KDJ9KP3uiWpwzsbg_JdiE-=Sv2uiJz2NgXUawb3Dbg@mail.gmail.com>","date":"2026-06-25T09:01:45","subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Laurent\n\nOn Wed, 24 Jun 2026 at 21:14, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> On Wed, Jun 24, 2026 at 09:41:52AM +0100, David Plowman wrote:\n> > On Wed, 24 Jun 2026 at 09:35, Naushir Patuck <naush@raspberrypi.com> wrote:\n> > >\n> > > In generateConfiguration(), set the default packing on RAW streams to\n> > > BayerFormat::Packing::None. This default is easier to handle over\n> > > CSI2 packed or PiSP Bayer compressed packaing options.\n>\n> s/packaing/packing/\n>\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > index 5a5acf6a164b..e0f364272746 100644\n> > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > @@ -410,7 +410,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n> > >                         size = sensorSize;\n> > >                         sensorFormat = data->findBestFormat(size, defaultRawBitDepth);\n> > >                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.code,\n> > > -                                                           BayerFormat::Packing::CSI2);\n> > > +                                                           BayerFormat::Packing::None);\n> > >                         ASSERT(pixelFormat.isValid());\n> > >                         colorSpace = ColorSpace::Raw;\n> > >                         bufferCount = 2;\n> >\n> > I think we probably just want to check first whether all our\n> > application-level code explicitly sets the packing after a\n> > generateConfiguration() or not, as otherwise it would be a bit of a\n> > behaviour change. Will get back to you on this...!\n>\n> Good idea.\n>\n> I'd be fine defaulting to CSI-2 packing as that's standard, but on Pi 5\n> that's not a valid option. We could make this conditional and default to\n> CSI-2 for Pi 4 and None for Pi 5 if desired.\n\nIt looks to me like all our application code does normally specify\nwhat it wants, which would mean it's pretty safe to change the\nbehaviour. There might be a couple of corner cases, for example when\nyou explicitly ask *not* to have the raw stream, but this is not the\nnorm. There will also be a very small number of people writing\napplications from the ground up who might be affected.\n\nI'm also a little unsure whether the default behaviour should give you\nthe \"easiest to use\" format (and if you haven't defined the format\nexplicitly then presumably you have no intention of using it?) or the\nmost efficient (= better performance for probably everyone in this\nsituation), but mostly I can't escape the feeling that the whole thing\ndoesn't matter all that much. Though I wouldn't want purposefully to\nintroduce (further!) differences between Pi 4s and 5s if I didn't have\nto.\n\nWe do also publish decompression code, in both C/C++ and Python/numpy.\n\nAfter all that, I think this is probably OK so:\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nthough I've probably spent too much time thinking about this already!!\n\nDavid\n\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 43B15C3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Jun 2026 09:02:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 54485658BE;\n\tThu, 25 Jun 2026 11:01:59 +0200 (CEST)","from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com\n\t[IPv6:2a00:1450:4864:20::62d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9451D656DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Jun 2026 11:01:57 +0200 (CEST)","by mail-ej1-x62d.google.com with SMTP id\n\ta640c23a62f3a-c0868ca8738so405976066b.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Jun 2026 02:01:57 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"qCTRNdOx\"; dkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1782378117; cv=none;\n\td=google.com; s=arc-20260327;\n\tb=lod0L7b0cPKjW+C8z1zLiO40azoMrL5b04MkCPL22NH07BGq1gkkMGtC+mdGnJLMuA\n\tBWJQxSpLkKf22w4cAKN8irz7RmbEgO3D3IAwFexMbjGTEwM0Znz7j+Ud5BwX7pxm7c5J\n\tc/iMBtQukjvG8gyfjzdNmvaT9Y/O5dbD4aJxs9wNx9VFiqiTTeUz9ABC+PGEDCaiKCfY\n\tqmI9GG1tbuL3G1CRakKTw4l2Oc1+RWW6zLR+f/cUZDsBP3Uhu3T9AjVKCfbGH5wtwtN4\n\tB+AhFxPlEP6uY30B1C/3TKov+l6aVQIwdf0HodcVDrVTMyHI54eFFrpvw6V7i5R61i3J\n\t7nTQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20260327; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:dkim-signature;\n\tbh=aVzTitZd3WvnZdNR1oRzzjlAkPE4knBs1pZC8SxCtQM=;\n\tfh=xwVU+ClctttJnTMuHUqGxXcqnSd+0PsE6jJFuaTzImU=;\n\tb=SgbXp6vcinVe8PqBl8KpLeQkFGtOepYW/B4h1F8t/O4FX4O+34iO58tPqQHLLtXCEL\n\tn4fMM/KBwqPKHuqzrSF4jFVl6XuCmDpm2rouE+vs/Vf0fz4cdAoz68WQ/zru6t9Fk7s1\n\tWtLVGrGFiyCoErB7HJ9+SMktM5iYgAIZyMbC/I4VLZjTfIh/BrfLBEvudytItYL45au4\n\tw62D68bntr6y1NZ9NLCXa25cBp90xM542giTDtC6Mwm+Q+QrnAUivwDLda3YZQ5r/7bu\n\tKRB7LKjlAyP54BiSrjEnPOR6viS5EBBVTxsxTDfOvKBiYQAbKPhOvXj0os5DwlQzBsff\n\tpHOA==; darn=lists.libcamera.org","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1782378117; x=1782982917;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=aVzTitZd3WvnZdNR1oRzzjlAkPE4knBs1pZC8SxCtQM=;\n\tb=qCTRNdOxF5IaP8sMJpv2rj5QX5EwkcQfjLppfyWdpi8KCcl1gFmJEmczp4YsNZKgHH\n\tXp6EIR7zXlC1WhEkw1BGe+pxvlyNtcduc54aObtNACPKwxX9m5re09dL6a9ZCs8KumkU\n\t9pMzIibErtvfdnC4Sfi7pRXY8zxcpmTI66IMlfXkn9QK8HzLwqPjHIEvOHfrzMGp3lKB\n\t9+4v0+nfdAbIGR+0QDTgNxfP+VXPa1SGfdTGmvNNmkq+3wZHEs0u0molklCfYTrUmbAi\n\tkm3RAhyaYlpG3HwScyg87Z+0MjQw4jpiOoZv9XpidplxJ/wicrNiemU4NKVEnn1GnYZr\n\t0Rgg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20251104; t=1782378117; x=1782982917;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=aVzTitZd3WvnZdNR1oRzzjlAkPE4knBs1pZC8SxCtQM=;\n\tb=SZ64zdr3zVcmpZC1d3CAvPpHe5iCez3XvOEzN/rSXel1oRmy+Lsz9kghN+p5MU8Htk\n\tyz6ZnznSrWsiO/nxFeg5T0QyO+2URZFF1kyz/nf/8wfdY9hvzF5zBE1VU95HZDbGfXuy\n\t6mPnqlGHxigvvhCqAWpHOTRp1FVWuRpwdHxNN1u8pIjsItgHgnT5lvHiYReGbDC2xEfu\n\tbfqG411qMPBjaoD6M54JHkUWeef/wo80Cg7NsSCV4hPuEl53KV+z1vEaP8ROzC0O3fU5\n\tjKMo6ZBgDeVP6YYHPuJ63pxsaaxpg41lmzlVqMU20jC93phzFA9W32ZXU2cmohBSXBhK\n\tIg+w==","X-Forwarded-Encrypted":"i=1;\n\tAHgh+RrRW7BThmLsSq2ZtyIFC50eOhcp9n+VrcVN5aMdAzwUtRX7LwxUS9Mpk0jLXDgQcO0yRxnaCWus6utYkOtIZCQ=@lists.libcamera.org","X-Gm-Message-State":"AOJu0YzzMapsNyHWGz4pSgH+0Fbv4Wy4d6hyG1azVCg3YdAatJkZQrZ+\n\touEK5q/MsjrWY5LQ3g/zEs7Ph7Rl9T7DuQPOaziDuqj1XzedFVrD2qUVcn3kU1E/4gPlulcHbCk\n\tvLYTMamuqDFIEnMdNuL2ceZnC05zfDaHcWVwBXCnEUg==","X-Gm-Gg":"AfdE7cm5gHPhRFbsD/KN9DePQQ3aW9zZFNAvQd1eH3m6+SIZENna6EiGI+zWl3YuzZN\n\t6mU7yi4TePCWJs09rFwZ7iunAykhQ5gaJ/7cmAotWJVajVI0hQCwW9oUthCG3oUVD6uLLwNHcbp\n\tSS0Nxsmxt9B0VGBV32ipSHaTse+pTqAnb/GUAgERmrYtE47ACIY8rZKfZMwG6UhxEcFb3lS1dFC\n\tp51xXjd316y94x9kADioGicoIV58f0t2u3MmIf5LcKiJOFyaXZGUNE1dNCR4pMHY3MxsVb1rPVv\n\tyOGJd28Y3h2aiEnqrWHIjquwPRPaufiZYTqT/rm6/xrCm41EIxszpnmtyHTA1aVZ0C6DulGLICH\n\thWCQP3VSSMJsQPw==","X-Received":"by 2002:a17:906:478c:b0:bd3:7c5d:c712 with SMTP id\n\ta640c23a62f3a-c1205d97069mr97939866b.7.1782378116922; Thu, 25 Jun 2026\n\t02:01:56 -0700 (PDT)","MIME-Version":"1.0","References":"<20260624082705.272795-1-naush@raspberrypi.com>\n\t<20260624082705.272795-2-naush@raspberrypi.com>\n\t<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>\n\t<20260624201446.GK851255@killaraus.ideasonboard.com>","In-Reply-To":"<20260624201446.GK851255@killaraus.ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 25 Jun 2026 10:01:45 +0100","X-Gm-Features":"AVVi8Ceu4-gJvSObSJZk-Vca7thu3RQ9BvqFod96fGFh46xrHwjNAALPMepikZM","Message-ID":"<CAHW6GYJ9KDJ9KP3uiWpwzsbg_JdiE-=Sv2uiJz2NgXUawb3Dbg@mail.gmail.com>","Subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","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":39489,"web_url":"https://patchwork.libcamera.org/comment/39489/","msgid":"<20260626221139.GA2918904@killaraus.ideasonboard.com>","date":"2026-06-26T22:11:39","subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jun 25, 2026 at 10:01:45AM +0100, David Plowman wrote:\n> On Wed, 24 Jun 2026 at 21:14, Laurent Pinchart wrote:\n> > On Wed, Jun 24, 2026 at 09:41:52AM +0100, David Plowman wrote:\n> > > On Wed, 24 Jun 2026 at 09:35, Naushir Patuck <naush@raspberrypi.com> wrote:\n> > > >\n> > > > In generateConfiguration(), set the default packing on RAW streams to\n> > > > BayerFormat::Packing::None. This default is easier to handle over\n> > > > CSI2 packed or PiSP Bayer compressed packaing options.\n> >\n> > s/packaing/packing/\n> >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > ---\n> > > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n> > > >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > > >\n> > > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > index 5a5acf6a164b..e0f364272746 100644\n> > > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > > @@ -410,7 +410,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole\n> > > >                         size = sensorSize;\n> > > >                         sensorFormat = data->findBestFormat(size, defaultRawBitDepth);\n> > > >                         pixelFormat = mbusCodeToPixelFormat(sensorFormat.code,\n> > > > -                                                           BayerFormat::Packing::CSI2);\n> > > > +                                                           BayerFormat::Packing::None);\n> > > >                         ASSERT(pixelFormat.isValid());\n> > > >                         colorSpace = ColorSpace::Raw;\n> > > >                         bufferCount = 2;\n> > >\n> > > I think we probably just want to check first whether all our\n> > > application-level code explicitly sets the packing after a\n> > > generateConfiguration() or not, as otherwise it would be a bit of a\n> > > behaviour change. Will get back to you on this...!\n> >\n> > Good idea.\n> >\n> > I'd be fine defaulting to CSI-2 packing as that's standard, but on Pi 5\n> > that's not a valid option. We could make this conditional and default to\n> > CSI-2 for Pi 4 and None for Pi 5 if desired.\n> \n> It looks to me like all our application code does normally specify\n> what it wants, which would mean it's pretty safe to change the\n> behaviour. There might be a couple of corner cases, for example when\n> you explicitly ask *not* to have the raw stream, but this is not the\n> norm. There will also be a very small number of people writing\n> applications from the ground up who might be affected.\n> \n> I'm also a little unsure whether the default behaviour should give you\n> the \"easiest to use\" format (and if you haven't defined the format\n> explicitly then presumably you have no intention of using it?) or the\n> most efficient (= better performance for probably everyone in this\n> situation), but mostly I can't escape the feeling that the whole thing\n> doesn't matter all that much. Though I wouldn't want purposefully to\n> introduce (further!) differences between Pi 4s and 5s if I didn't have\n> to.\n\nIt's a good question.\n\nThe Camera class has a generateConfiguration() function that takes a\nlist of stream roles and is documented as returning a configuration\n\"containing suitable streams and their suggested default\nconfigurations\". It doesn't tell what a suggest default should be, and I\nsee pros and cons in providing a standard format or an optimized format.\nWhat is however pretty clear to me is that the default should be a valid\nconfiguration, and at the moment, that's not the case on Pi 5 as CSI2\npacking is not supported.\n\n> We do also publish decompression code, in both C/C++ and Python/numpy.\n\nThat's a good point. Maybe I'm overly concerned, and selecting\nPacking::PISP on Pi 5 would be fine too. I'll leave it up to Naush and\nyou. Please let me know if you want to continue with this patch, or use\na different approach.\n\n> After all that, I think this is probably OK so:\n> \n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> though I've probably spent too much time thinking about this already!!\n> \n> David","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 34FBDC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 22:11:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2753565F0C;\n\tSat, 27 Jun 2026 00:11:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8AECA658C7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 27 Jun 2026 00:11:40 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 334D7296;\n\tSat, 27 Jun 2026 00:10:59 +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=\"IcCjiVSr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782511859;\n\tbh=ssP05Izxb4inFJntPSPXeZRW03cb/21nfpLIW0L2Pi8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IcCjiVSrJqgGQD3aLZWy4kLHkV9FjiP7rMUZ/pShFAJbnHzB6sKYCyq9UD8fXYCiC\n\th/8m0Vf1P+AKXe46GOAvbo6X8ERBZ5FAynyr5S85vXH/EF/eYjULQqgrkf2ZZFuJsG\n\tfd7oVMSw8uqRQXZddjV3JlgSuhvSwvZKbdButTUE=","Date":"Sat, 27 Jun 2026 01:11:39 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] pipeline: rpi: Default to BayerFormat::Packing::None\n\tfor RAW streams","Message-ID":"<20260626221139.GA2918904@killaraus.ideasonboard.com>","References":"<20260624082705.272795-1-naush@raspberrypi.com>\n\t<20260624082705.272795-2-naush@raspberrypi.com>\n\t<CAHW6GYLoYVPH58yDJa44O+F9mrkaXipyc_AjkAi0iPDC5+B-ag@mail.gmail.com>\n\t<20260624201446.GK851255@killaraus.ideasonboard.com>\n\t<CAHW6GYJ9KDJ9KP3uiWpwzsbg_JdiE-=Sv2uiJz2NgXUawb3Dbg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYJ9KDJ9KP3uiWpwzsbg_JdiE-=Sv2uiJz2NgXUawb3Dbg@mail.gmail.com>","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>"}}]