[{"id":29863,"web_url":"https://patchwork.libcamera.org/comment/29863/","msgid":"<bxmleydiz4s6jqeomvli4a4pwjpup5ni5kuq5k3gdfvj7bd4vc@2s2okatttlfh>","date":"2024-06-12T07:45:24","subject":"Re: [PATCH 5/6] ipa: rkisp1: goc: Avoid use of auto for short type","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Laurent,\n\nthanks for the patch. Out if curiosity: Why __u16 and not uint16_t? In\nC++ code I would have expected the latter.\n\nOn Wed, Jun 12, 2024 at 12:21:00AM +0300, Laurent Pinchart wrote:\n> Replace one occurrence of the auto type qualifier with the explicit type\n> it represents to increase readability.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\nCheers,\nStefan\n\n> ---\n>  src/ipa/rkisp1/algorithms/goc.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp\n> index e98c9526722f..a82cee3bbf61 100644\n> --- a/src/ipa/rkisp1/algorithms/goc.cpp\n> +++ b/src/ipa/rkisp1/algorithms/goc.cpp\n> @@ -112,7 +112,7 @@ void GammaOutCorrection::prepare(IPAContext &context,\n>  \t\t64, 64, 64, 64, 128, 128, 128, 128, 256,\n>  \t\t256, 256, 512, 512, 512, 512, 512, 0\n>  \t};\n> -\tauto gamma_y = params->others.goc_config.gamma_y;\n> +\t__u16 *gamma_y = params->others.goc_config.gamma_y;\n>  \n>  \tif (!frameContext.goc.update)\n>  \t\treturn;\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 53688BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Jun 2024 07:45:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 77EAE6545E;\n\tWed, 12 Jun 2024 09:45:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24E3A6545A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 09:45:27 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:31fd:fdd2:5613:c54c])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E30E64D0;\n\tWed, 12 Jun 2024 09:45:13 +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=\"sepelatr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718178314;\n\tbh=YJW1miylSgu329PofmrOisvJQnJP4nSN056zR8TdYK8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sepelatrXbApapGt1mDuzoBnM8FIF2Cbq6ISvnlF2tZbjpbhQq3CYaEbtjDdS3ZWV\n\tTQCwHQGGrXGw+G99JAkRZEtBZsK05jA3gDIZfV20EU8bmw/0ikAPkawLHXlt2zfRSa\n\t9hBgJIkeL9mNfbgy6G0FsaJR8kOyuan40LKQKhL0=","Date":"Wed, 12 Jun 2024 09:45:24 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 5/6] ipa: rkisp1: goc: Avoid use of auto for short type","Message-ID":"<bxmleydiz4s6jqeomvli4a4pwjpup5ni5kuq5k3gdfvj7bd4vc@2s2okatttlfh>","References":"<20240611212101.14313-1-laurent.pinchart@ideasonboard.com>\n\t<20240611212101.14313-6-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240611212101.14313-6-laurent.pinchart@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":29865,"web_url":"https://patchwork.libcamera.org/comment/29865/","msgid":"<20240612075228.GC28989@pendragon.ideasonboard.com>","date":"2024-06-12T07:52:28","subject":"Re: [PATCH 5/6] ipa: rkisp1: goc: Avoid use of auto for short type","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Jun 12, 2024 at 09:45:24AM +0200, Stefan Klug wrote:\n> Hi Laurent,\n> \n> thanks for the patch. Out if curiosity: Why __u16 and not uint16_t? In\n> C++ code I would have expected the latter.\n\nI picked __u16 as it directly matches the type of\nparams->others.goc_config.gamma_y. I would be fine with uint16_t too.\n\n> On Wed, Jun 12, 2024 at 12:21:00AM +0300, Laurent Pinchart wrote:\n> > Replace one occurrence of the auto type qualifier with the explicit type\n> > it represents to increase readability.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n> \n> > ---\n> >  src/ipa/rkisp1/algorithms/goc.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp\n> > index e98c9526722f..a82cee3bbf61 100644\n> > --- a/src/ipa/rkisp1/algorithms/goc.cpp\n> > +++ b/src/ipa/rkisp1/algorithms/goc.cpp\n> > @@ -112,7 +112,7 @@ void GammaOutCorrection::prepare(IPAContext &context,\n> >  \t\t64, 64, 64, 64, 128, 128, 128, 128, 256,\n> >  \t\t256, 256, 512, 512, 512, 512, 512, 0\n> >  \t};\n> > -\tauto gamma_y = params->others.goc_config.gamma_y;\n> > +\t__u16 *gamma_y = params->others.goc_config.gamma_y;\n> >  \n> >  \tif (!frameContext.goc.update)\n> >  \t\treturn;","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 CDF64C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 12 Jun 2024 07:52:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 031346545E;\n\tWed, 12 Jun 2024 09:52:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34C6161A2A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 12 Jun 2024 09:52:49 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B09004D0;\n\tWed, 12 Jun 2024 09:52:35 +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=\"m32UoWo+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718178755;\n\tbh=K5nSGXC80sELLVvwUF7XN05Xc9rbCT9XEQI0H2/l0Fc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m32UoWo+QEvcIxx843x4B7DSN1YV2JKsb4Zo4MAOh88yaFR6ncenIxGg4ulMjGE5P\n\tASqlzXotL+SwYtIdtQSFKGb4hgUatMGHHQBZOZav+qWxzfNEHHnYUpdvOJ23gvdmYM\n\t73mTqo9nWrvZsXG6WcW0K/OaD1+XkjrAuZkSPchg=","Date":"Wed, 12 Jun 2024 10:52:28 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 5/6] ipa: rkisp1: goc: Avoid use of auto for short type","Message-ID":"<20240612075228.GC28989@pendragon.ideasonboard.com>","References":"<20240611212101.14313-1-laurent.pinchart@ideasonboard.com>\n\t<20240611212101.14313-6-laurent.pinchart@ideasonboard.com>\n\t<bxmleydiz4s6jqeomvli4a4pwjpup5ni5kuq5k3gdfvj7bd4vc@2s2okatttlfh>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<bxmleydiz4s6jqeomvli4a4pwjpup5ni5kuq5k3gdfvj7bd4vc@2s2okatttlfh>","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>"}}]