[{"id":14475,"web_url":"https://patchwork.libcamera.org/comment/14475/","msgid":"<20210108113233.7pifszetc2y67fgv@uno.localdomain>","date":"2021-01-08T11:32:33","subject":"Re: [libcamera-devel] [PATCH v2 3/4] libcamera: pipeline: rpi:\n\tAdjust to new implementation","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Sebastian\n\nOn Thu, Dec 31, 2020 at 04:53:35PM +0100, Sebastian Fricke wrote:\n> Remove the construction of a BayerFormat from a V4L2PixelFormat through\n> the old constructor. Add the new 'fromV4L2PixelFormat' static member\n> function.\n\nAh here you go. I would squash this in 1/4\n\nThanks\n   j\n>\n> Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n> ---\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 7a5f5881..8ca9b9cf 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -358,7 +358,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n>  \t\t\t */\n>  \t\t\tV4L2PixelFormat fourcc = sensorFormat.fourcc;\n>  \t\t\tif (data_->flipsAlterBayerOrder_) {\n> -\t\t\t\tBayerFormat bayer(fourcc);\n> +\t\t\t\tBayerFormat bayer = BayerFormat::fromV4L2PixelFormat(fourcc);\n>  \t\t\t\tbayer.order = data_->nativeBayerOrder_;\n>  \t\t\t\tbayer = bayer.transform(combined);\n>  \t\t\t\tfourcc = bayer.toV4L2PixelFormat();\n> @@ -1007,7 +1007,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n>  \tBayerFormat bayerFormat;\n>  \tfor (const auto &iter : dev->formats()) {\n>  \t\tV4L2PixelFormat v4l2Format = iter.first;\n> -\t\tbayerFormat = BayerFormat(v4l2Format);\n> +\t\tbayerFormat = BayerFormat::fromV4L2PixelFormat(v4l2Format);\n>  \t\tif (bayerFormat.isValid())\n>  \t\t\tbreak;\n>  \t}\n> --\n> 2.25.1\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 29AAFC3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 Jan 2021 11:32:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C27F3635A0;\n\tFri,  8 Jan 2021 12:32:20 +0100 (CET)","from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9ECC263138\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Jan 2021 12:32:19 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id 984DC100003;\n\tFri,  8 Jan 2021 11:32:18 +0000 (UTC)"],"Date":"Fri, 8 Jan 2021 12:32:33 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Sebastian Fricke <sebastian.fricke.linux@gmail.com>","Message-ID":"<20210108113233.7pifszetc2y67fgv@uno.localdomain>","References":"<20201231155336.7058-1-sebastian.fricke.linux@gmail.com>\n\t<20201231155336.7058-4-sebastian.fricke.linux@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201231155336.7058-4-sebastian.fricke.linux@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/4] libcamera: pipeline: rpi:\n\tAdjust to new implementation","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":14516,"web_url":"https://patchwork.libcamera.org/comment/14516/","msgid":"<X/uiOY7uR6PPo0ET@pendragon.ideasonboard.com>","date":"2021-01-11T00:56:25","subject":"Re: [libcamera-devel] [PATCH v2 3/4] libcamera: pipeline: rpi:\n\tAdjust to new implementation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jan 08, 2021 at 12:32:33PM +0100, Jacopo Mondi wrote:\n> Hi Sebastian\n> \n> On Thu, Dec 31, 2020 at 04:53:35PM +0100, Sebastian Fricke wrote:\n> > Remove the construction of a BayerFormat from a V4L2PixelFormat through\n> > the old constructor. Add the new 'fromV4L2PixelFormat' static member\n> > function.\n> \n> Ah here you go. I would squash this in 1/4\n\nYes, otherwise it breaks bisection. Another option would be to have a\nfirst patch that adds the new function, a second patch that updates the\nRPi pipeline handler, and a third patch that removes the constructor.\nGiven that the change to the pipeline handler is small, it's not worth\nsplitting it in three patches.\n\n> >\n> > Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n> > ---\n> >  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 7a5f5881..8ca9b9cf 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -358,7 +358,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n> >  \t\t\t */\n> >  \t\t\tV4L2PixelFormat fourcc = sensorFormat.fourcc;\n> >  \t\t\tif (data_->flipsAlterBayerOrder_) {\n> > -\t\t\t\tBayerFormat bayer(fourcc);\n> > +\t\t\t\tBayerFormat bayer = BayerFormat::fromV4L2PixelFormat(fourcc);\n> >  \t\t\t\tbayer.order = data_->nativeBayerOrder_;\n> >  \t\t\t\tbayer = bayer.transform(combined);\n> >  \t\t\t\tfourcc = bayer.toV4L2PixelFormat();\n> > @@ -1007,7 +1007,7 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator)\n> >  \tBayerFormat bayerFormat;\n> >  \tfor (const auto &iter : dev->formats()) {\n> >  \t\tV4L2PixelFormat v4l2Format = iter.first;\n> > -\t\tbayerFormat = BayerFormat(v4l2Format);\n> > +\t\tbayerFormat = BayerFormat::fromV4L2PixelFormat(v4l2Format);\n> >  \t\tif (bayerFormat.isValid())\n> >  \t\t\tbreak;\n> >  \t}","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 F05AEBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jan 2021 00:56:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEE966809A;\n\tMon, 11 Jan 2021 01:56:40 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A8D460317\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jan 2021 01:56:39 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E6367EC;\n\tMon, 11 Jan 2021 01:56:38 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P7KqnOxK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1610326599;\n\tbh=G91pEoN46WOtf2rw0qKMVlfTCVp/fx5iChkLIN3v94g=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=P7KqnOxK9m2FIGaHsPe9Oh2eCJxjFtgfhR3PgGljyF3wETcX+CPfAyHs4VeidY03r\n\txwwOBtRh4qS3AvGxpOykjkKHHkMmmKtkcRyk1BQcCYAZ/InW0YELq7q7U3xYK9lpqF\n\tYIbmHYXmYztL6dag8gp6OIWgkPxfduyNLkt6j0vY=","Date":"Mon, 11 Jan 2021 02:56:25 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<X/uiOY7uR6PPo0ET@pendragon.ideasonboard.com>","References":"<20201231155336.7058-1-sebastian.fricke.linux@gmail.com>\n\t<20201231155336.7058-4-sebastian.fricke.linux@gmail.com>\n\t<20210108113233.7pifszetc2y67fgv@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210108113233.7pifszetc2y67fgv@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH v2 3/4] libcamera: pipeline: rpi:\n\tAdjust to new implementation","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]