[{"id":12062,"web_url":"https://patchwork.libcamera.org/comment/12062/","msgid":"<20200820090021.7bvrml4tn3bsvz7p@uno.localdomain>","date":"2020-08-20T09:00:21","subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Thu, Aug 13, 2020 at 02:52:40AM +0200, Niklas Söderlund wrote:\n> Changing resolutions back and forth can provoke the crop rectangle to go\n> out of sync, set it as port of format configuration.\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\nNot knowing the driver, does the crop rectangle always follow the\ndesired output size ? How is that handled with two outputs ? I guess\nI'll find it out later ?\n\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++\n>  1 file changed, 5 insertions(+)\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 8e0f6db5faa96928..59614a9f470b7802 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -632,6 +632,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>\n> +\tRectangle rect(0, 0, format.size);\n> +\tret = isp_->setSelection(0, V4L2_SEL_TGT_CROP, &rect);\n> +\tif (ret < 0)\n> +\t\treturn ret;\n> +\n>  \tLOG(RkISP1, Debug) << \"ISP input pad configured with \" << format.toString();\n>\n>  \t/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */\n> --\n> 2.28.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 85197BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Aug 2020 08:56:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 15B0561F61;\n\tThu, 20 Aug 2020 10:56:40 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EA4E61ED9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Aug 2020 10:56:39 +0200 (CEST)","from uno.localdomain (host-82-52-18-94.retail.telecomitalia.it\n\t[82.52.18.94]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id BA5E424000F;\n\tThu, 20 Aug 2020 08:56:38 +0000 (UTC)"],"Date":"Thu, 20 Aug 2020 11:00:21 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200820090021.7bvrml4tn3bsvz7p@uno.localdomain>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-8-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200813005246.3265807-8-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12076,"web_url":"https://patchwork.libcamera.org/comment/12076/","msgid":"<20200820151248.GM6593@pendragon.ideasonboard.com>","date":"2020-08-20T15:12:48","subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Thu, Aug 13, 2020 at 02:52:40AM +0200, Niklas Söderlund wrote:\n> Changing resolutions back and forth can provoke the crop rectangle to go\n> out of sync, set it as port of format configuration.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++\n>  1 file changed, 5 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 8e0f6db5faa96928..59614a9f470b7802 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -632,6 +632,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>  \n> +\tRectangle rect(0, 0, format.size);\n> +\tret = isp_->setSelection(0, V4L2_SEL_TGT_CROP, &rect);\n> +\tif (ret < 0)\n> +\t\treturn ret;\n> +\n\nI wonder why this is necessary, as we set the format on the ISP sink\npad, and that should reset the crop rectangle. Isn't it a driver bug ?\n\nStill, this doesn't hurt, so\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \tLOG(RkISP1, Debug) << \"ISP input pad configured with \" << format.toString();\n>  \n>  \t/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */","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 1FA30BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Aug 2020 15:13:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9699761F7B;\n\tThu, 20 Aug 2020 17:13:07 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6080060381\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Aug 2020 17:13:06 +0200 (CEST)","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 D72CF23D;\n\tThu, 20 Aug 2020 17:13:05 +0200 (CEST)"],"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=\"FXBTWN+8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1597936386;\n\tbh=CzgvLNp4+3/XYGGLG44GPwJiPJ7xceC5L4hVEp8rmHY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FXBTWN+8mY8ehnpAuaHsAU0fR3Z3fp1r+XMm5IJE+WppHlOT43JRAvuV63YspTxUb\n\t7MMmHDxpoDn72eARIQRYDixXPKv/Bl52Q9s43G/co2+vUK3C/7uBwtYiYQzB5hXMYO\n\tOjf8kC5AT6n9q12cmEocirmOJFKAw5lmWQQ4DWHE=","Date":"Thu, 20 Aug 2020 18:12:48 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200820151248.GM6593@pendragon.ideasonboard.com>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-8-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200813005246.3265807-8-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12490,"web_url":"https://patchwork.libcamera.org/comment/12490/","msgid":"<20200914102115.GF1127199@oden.dyn.berto.se>","date":"2020-09-14T10:21:15","subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nOn 2020-08-20 11:00:21 +0200, Jacopo Mondi wrote:\n> Hi Niklas,\n> \n> On Thu, Aug 13, 2020 at 02:52:40AM +0200, Niklas Söderlund wrote:\n> > Changing resolutions back and forth can provoke the crop rectangle to go\n> > out of sync, set it as port of format configuration.\n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> Not knowing the driver, does the crop rectangle always follow the\n> desired output size ? How is that handled with two outputs ? I guess\n> I'll find it out later ?\n\nFor now it follows, I guess we might need to do something more clever \nwhen we start supporting digital zoom and such.\n\n> \n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++\n> >  1 file changed, 5 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 8e0f6db5faa96928..59614a9f470b7802 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -632,6 +632,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >  \tif (ret < 0)\n> >  \t\treturn ret;\n> >\n> > +\tRectangle rect(0, 0, format.size);\n> > +\tret = isp_->setSelection(0, V4L2_SEL_TGT_CROP, &rect);\n> > +\tif (ret < 0)\n> > +\t\treturn ret;\n> > +\n> >  \tLOG(RkISP1, Debug) << \"ISP input pad configured with \" << format.toString();\n> >\n> >  \t/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */\n> > --\n> > 2.28.0\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel","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 582EFC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Sep 2020 10:21:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC88762D99;\n\tMon, 14 Sep 2020 12:21:17 +0200 (CEST)","from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C56F662B90\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 12:21:16 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id w3so18125686ljo.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 03:21:16 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tl15sm3685926lfk.71.2020.09.14.03.21.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 14 Sep 2020 03:21:15 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"NCd7DNKE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=vPnAsZ0tEOJZz2S1MAT1rUx606+gms3WBx0F57gpTmQ=;\n\tb=NCd7DNKEdmmkiosQQdUvpW+OQ1MP/zwyFXRWBQ+BfaqB3iDTjTiTomXV70bapMA6AS\n\t7QpcZOKtO9xJ4UDGXFZ/g3gje3LZShoxVfMohQln1IH7q/+lAiq/6hu8t8bV1QkEVzZT\n\t7GyolJh1J+l66broT5DI7p2h2BtU7tNiPf0EdoCpZTONSYQP03A3NJXbI6tXUuBh6vWm\n\tqKkZ7bnqujLSFFEX/yEgVpGfjfFyliHO7UvjyukS1ILnGf1+dIdih+K8RgbGHRZD/oP9\n\tRdgRhU5vUzaBIxSUQmUl/4ciuAkbzrunj1Bg0VK10lkezfQA/J039h6Hkw2qh7gK8lWQ\n\tfl7w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=vPnAsZ0tEOJZz2S1MAT1rUx606+gms3WBx0F57gpTmQ=;\n\tb=T12Ud0SEPaDOFbqapfCKN7GGScbyLhATKc9hqACeEs6jF3gnLb8CrtHrxvGkFTCk25\n\t8aht3IhQP0PMeNLqF8ChTtRLmNQobN/PE2bYZKJCMeTwqU6We1e8RuP8YW+MFMiQQTa9\n\tlSJXCOzE4UpSLnMOuPXZJkIAtqkkW/cFHfD4ZqIOD5dEfuThFH1lJak4MeRnDvkMDgvK\n\thfTR7KOguuMi6ZslMqZgK1nEO4zmqHWh4nw60bUWUK8LV4lDdcsoUnXXluwg+auJdYYN\n\to4ilty6EuoqTPHiVlsHIYrPkekpb2vqbnVlo+76GgkK5VlkF8iPIIp5cTUlC304fY46X\n\tN3pg==","X-Gm-Message-State":"AOAM532ufMNZnWL9ZjJUZjq6mm9m7LSIsG0eeWl1Fbx8eGEW9kA1eVt4\n\t5Y1SjKlPd3eEgA0u+xE0KvLKdLj8li44LA==","X-Google-Smtp-Source":"ABdhPJyVNh9jbqLvGDPMAmMMvIlSY7Yib134MlR3mkFYj8C/adHr4RvnY+3HLq00dP8l8N1ewAxjUA==","X-Received":"by 2002:a2e:8e81:: with SMTP id z1mr643017ljk.379.1600078876209; \n\tMon, 14 Sep 2020 03:21:16 -0700 (PDT)","Date":"Mon, 14 Sep 2020 12:21:15 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200914102115.GF1127199@oden.dyn.berto.se>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-8-niklas.soderlund@ragnatech.se>\n\t<20200820090021.7bvrml4tn3bsvz7p@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200820090021.7bvrml4tn3bsvz7p@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 07/13] libcamera: pipeline: rkisp1:\n\tSet the crop rectangle","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=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]