[{"id":32371,"web_url":"https://patchwork.libcamera.org/comment/32371/","msgid":"<tjeuff7wtfyy2ca4aeedxvg7zktjkw3ajw4vngcxzvgsldcmfo@7vsxtxissqku>","date":"2024-11-25T19:35:01","subject":"Re: [PATCH v2 8/8] pipeline: rkisp1: Add ScalerMaximumCrop property","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Stefan\n\nOn Mon, Nov 25, 2024 at 04:14:17PM +0100, Stefan Klug wrote:\n> The ScalerMaximumCrop property holds the biggest allowed ScalerCrop\n> value. Add it to the rkisp1.\n>\n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n> ---\n> Changes in v2:\n> - Moved one hunk to the correct patch 6/7\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 0a044b08bc87..993515c258ef 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -24,6 +24,7 @@\n>  #include <libcamera/control_ids.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/framebuffer.h>\n> +#include <libcamera/property_ids.h>\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  #include <libcamera/transform.h>\n> @@ -1247,6 +1248,7 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)\n>  \t\t\t\t\t\t\t\t     dewarperSensorCrop_);\n>\n>  \t\tcontrols[&controls::ScalerCrop] = ControlInfo(min, max, max);\n> +\t\tdata->properties_.set(properties::ScalerCropMaximum, max);\n\nAh, here you go :)\n\nDoes 'max', computed as\n\n\t\tstd::pair<Rectangle, Rectangle> cropLimits =\n\t\t\tdewarper_->inputCropBounds(&data->mainPathStream_);\n\t\tRectangle max = cropLimits.second.transformedBetween(cropLimits.second,\n\t\t\t\t\t\t\t\t     dewarperSensorCrop_);\n\ncontain the maximum limits of the dewarper, or does it take into\naccount the current configuration ? As suggested in the\nprevious patch, would using dewarperSensorCrop_ would give the limits taking\ninto account the currently applied crop-to-aspect-ratio ?\n\n>  \t\tactiveCrop_ = max;\n>  \t}\n>\n> --\n> 2.43.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 217FDBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Nov 2024 19:35:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7834A6604A;\n\tMon, 25 Nov 2024 20:35:08 +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 322D065F7E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Nov 2024 20:35:07 +0100 (CET)","from ideasonboard.com (mob-5-90-139-188.net.vodafone.it\n\t[5.90.139.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A22544AD;\n\tMon, 25 Nov 2024 20:34:44 +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=\"OwTQ+yxk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1732563285;\n\tbh=hQ88LXx+w2MzoPkNjpnwvbiI9rXUOyIWqMb+AmUzdA0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=OwTQ+yxkpYa0rZyBvlr0228fZhmOD0v7kjfP0qZdURkqQKcVU2mMSA1qyeiReCEk+\n\tu9Vp+SbxuegylF47lkkDZpPXjHWQ5tqlWfGEldaYAirDEF/zzf81upNovcdWrZT8u5\n\tRttAmbmJXxwEjT738sro1a79I4/0HHcsQ2Qv+d3Q=","Date":"Mon, 25 Nov 2024 20:35:01 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tPaul Elder <paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v2 8/8] pipeline: rkisp1: Add ScalerMaximumCrop property","Message-ID":"<tjeuff7wtfyy2ca4aeedxvg7zktjkw3ajw4vngcxzvgsldcmfo@7vsxtxissqku>","References":"<20241125151430.2437285-1-stefan.klug@ideasonboard.com>\n\t<20241125151430.2437285-9-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20241125151430.2437285-9-stefan.klug@ideasonboard.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":32429,"web_url":"https://patchwork.libcamera.org/comment/32429/","msgid":"<ezakokedtffyxyrdgglata2rbww5sv4rfkvknmjnjwt4bna7vo@rrzur5pzb6yz>","date":"2024-11-28T13:13:53","subject":"Re: [PATCH v2 8/8] pipeline: rkisp1: Add ScalerMaximumCrop property","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Nov 25, 2024 at 08:35:01PM +0100, Jacopo Mondi wrote:\n> Hi Stefan\n> \n> On Mon, Nov 25, 2024 at 04:14:17PM +0100, Stefan Klug wrote:\n> > The ScalerMaximumCrop property holds the biggest allowed ScalerCrop\n> > value. Add it to the rkisp1.\n> >\n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> >\n> > ---\n> > Changes in v2:\n> > - Moved one hunk to the correct patch 6/7\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++\n> >  1 file changed, 2 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 0a044b08bc87..993515c258ef 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -24,6 +24,7 @@\n> >  #include <libcamera/control_ids.h>\n> >  #include <libcamera/formats.h>\n> >  #include <libcamera/framebuffer.h>\n> > +#include <libcamera/property_ids.h>\n> >  #include <libcamera/request.h>\n> >  #include <libcamera/stream.h>\n> >  #include <libcamera/transform.h>\n> > @@ -1247,6 +1248,7 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)\n> >  \t\t\t\t\t\t\t\t     dewarperSensorCrop_);\n> >\n> >  \t\tcontrols[&controls::ScalerCrop] = ControlInfo(min, max, max);\n> > +\t\tdata->properties_.set(properties::ScalerCropMaximum, max);\n> \n> Ah, here you go :)\n> \n> Does 'max', computed as\n> \n> \t\tstd::pair<Rectangle, Rectangle> cropLimits =\n> \t\t\tdewarper_->inputCropBounds(&data->mainPathStream_);\n> \t\tRectangle max = cropLimits.second.transformedBetween(cropLimits.second,\n> \t\t\t\t\t\t\t\t     dewarperSensorCrop_);\n> \n> contain the maximum limits of the dewarper, or does it take into\n> account the current configuration ? As suggested in the\n> previous patch, would using dewarperSensorCrop_ would give the limits taking\n> into account the currently applied crop-to-aspect-ratio ?\n\nI replaced the max = ... line with scalerMaxCrop_ in v3. This will also\nchange in the next series.\n\nCheers,\nStefan\n\n> \n> >  \t\tactiveCrop_ = max;\n> >  \t}\n> >\n> > --\n> > 2.43.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 D013FBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Nov 2024 13:13:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1360D65F98;\n\tThu, 28 Nov 2024 14:13:59 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2A52F65898\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Nov 2024 14:13:57 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:22e0:a94:b035:820])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 372E1526;\n\tThu, 28 Nov 2024 14:13:33 +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=\"D8vfKi0T\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1732799613;\n\tbh=9BEkd5Sn5j+htclKdfh21Fd40g6W5Ocjb7UwiCM8YxQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=D8vfKi0TrjKbJWvu+aP7hdAkaQT5M54S9SfeZwSWUh2I0sJGPesI+Uj5E/WGb3IyD\n\tmWFFpPnfjomvXVoGBFsw5f8r+eTADv7bVvyb8RrTcJ2Wf2mHlZHZGwTXkbtZftZrQV\n\t5bAiYfU74+yZisGAL/MBQq8Jzyx+ECPoywMzp1Wo=","Date":"Thu, 28 Nov 2024 14:13:53 +0100","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tPaul Elder <paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v2 8/8] pipeline: rkisp1: Add ScalerMaximumCrop property","Message-ID":"<ezakokedtffyxyrdgglata2rbww5sv4rfkvknmjnjwt4bna7vo@rrzur5pzb6yz>","References":"<20241125151430.2437285-1-stefan.klug@ideasonboard.com>\n\t<20241125151430.2437285-9-stefan.klug@ideasonboard.com>\n\t<tjeuff7wtfyy2ca4aeedxvg7zktjkw3ajw4vngcxzvgsldcmfo@7vsxtxissqku>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<tjeuff7wtfyy2ca4aeedxvg7zktjkw3ajw4vngcxzvgsldcmfo@7vsxtxissqku>","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>"}}]