[{"id":31512,"web_url":"https://patchwork.libcamera.org/comment/31512/","msgid":"<3oike44qpjyz6uu3mo4sl7hz4mbyc6m3rofm2es66hvf3eqesu@c4rtdext6hyn>","date":"2024-10-01T18:25:49","subject":"Re: [PATCH v2 6/7] pipeline: rpi: Pass ISP output index into\n\tplatformSetIspCrop()","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Mon, Sep 30, 2024 at 03:14:14PM GMT, Naushir Patuck wrote:\n> At this point, the index is unused, but will be in a future commit where\n> we can set different crops on each ISP output.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> ---\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n>  src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 4 ++--\n>  3 files changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 220c7b962280..267e6bd9cd70 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -1321,7 +1321,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n>\n>  \t\tif (ispCrop != cropParams.ispCrop) {\n>  \t\t\tcropParams.ispCrop = ispCrop;\n> -\t\t\tplatformSetIspCrop(ispCrop);\n> +\t\t\tplatformSetIspCrop(cropParams.ispIndex, ispCrop);\n>  \t\t}\n>  \t}\n>  }\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> index 9d23a1994f00..3c47411f745a 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n> @@ -83,7 +83,7 @@ public:\n>\n>  \tRectangle scaleIspCrop(const Rectangle &ispCrop) const;\n>  \tvoid applyScalerCrop(const ControlList &controls);\n> -\tvirtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n> +\tvirtual void platformSetIspCrop(unsigned int index, const Rectangle &ispCrop) = 0;\n>\n>  \tvoid cameraTimeout();\n>  \tvoid frameStarted(uint32_t sequence);\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index cfed214ddbd4..fd8d84b14f15 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -109,7 +109,7 @@ public:\n>  \tConfig config_;\n>\n>  private:\n> -\tvoid platformSetIspCrop(const Rectangle &ispCrop) override\n> +\tvoid platformSetIspCrop([[maybe_unused]] unsigned int index, const Rectangle &ispCrop) override\n>  \t{\n>  \t\tRectangle crop = ispCrop;\n>  \t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n> @@ -707,7 +707,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n>  \tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n>  \tRectangle ispCrop = size.centeredTo(Rectangle(unicamFormat.size).center());\n>\n> -\tplatformSetIspCrop(ispCrop);\n> +\tplatformSetIspCrop(0, ispCrop);\n>  \t/*\n>  \t * Set the scaler crop to the value we are using (scaled to native sensor\n>  \t * coordinates).\n> --\n> 2.34.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 E0A94BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  1 Oct 2024 18:25:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8737A63527;\n\tTue,  1 Oct 2024 20:25:55 +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 9FF4F60553\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  1 Oct 2024 20:25:53 +0200 (CEST)","from ideasonboard.com (unknown [5.77.89.72])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A689DA1A;\n\tTue,  1 Oct 2024 20:24:21 +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=\"IxbLwIHW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727807061;\n\tbh=uc7q/0lu7TA2NBlTwYg4ESI21/hqc26KymloghSnAj0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IxbLwIHWZR+EjXJdfh4v9DR245saPmTJp49chCR470/p4uGCh7jYCq9hn9TJtN4Pf\n\tSHhXXKlywpcnawK4Zza8lWdSik+qjY8Mz49+krMkzJpaumMybrfFjmMsx5L9ECNXdS\n\tmd9mNybIODGjRYGGrZAW/2z9xgWwkYTg0JK0ItH0=","Date":"Tue, 1 Oct 2024 20:25:49 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2 6/7] pipeline: rpi: Pass ISP output index into\n\tplatformSetIspCrop()","Message-ID":"<3oike44qpjyz6uu3mo4sl7hz4mbyc6m3rofm2es66hvf3eqesu@c4rtdext6hyn>","References":"<20240930141415.8857-1-naush@raspberrypi.com>\n\t<20240930141415.8857-7-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240930141415.8857-7-naush@raspberrypi.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>"}}]