[{"id":21658,"web_url":"https://patchwork.libcamera.org/comment/21658/","msgid":"<YbBuo/HhAQDRUmSE@pendragon.ideasonboard.com>","date":"2021-12-08T08:36:51","subject":"Re: [libcamera-devel] [PATCH v3 7/9] libcamera: ipa: Rename ctrls_\n\tmember","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Dan,\n\nThank you for the patch.\n\nOn Tue, Dec 07, 2021 at 10:45:10PM +0000, Daniel Scally wrote:\n> Now that we have added lens controls, rename the existiing\n> member of the class to clarify that it relates to the sensor's\n> controls.\n> \n> Signed-off-by: Daniel Scally <djrscally@gmail.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n> Changes in v3:\n> \n> \t- New patch\n> \n>  src/ipa/ipu3/ipu3.cpp | 22 +++++++++++-----------\n>  1 file changed, 11 insertions(+), 11 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 3828650d..fe2bc3af 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -161,7 +161,7 @@ private:\n>  \n>  \tstd::map<unsigned int, MappedFrameBuffer> buffers_;\n>  \n> -\tControlInfoMap ctrls_;\n> +\tControlInfoMap sensorCtrls_;\n>  \tControlInfoMap lensCtrls_;\n>  \n>  \tIPACameraSensorInfo sensorInfo_;\n> @@ -429,22 +429,22 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n>  \t * Compute the sensor V4L2 controls to be used by the algorithms and\n>  \t * to be set on the sensor.\n>  \t */\n> -\tctrls_ = configInfo.sensorControls;\n> +\tsensorCtrls_ = configInfo.sensorControls;\n>  \n> -\tconst auto itExp = ctrls_.find(V4L2_CID_EXPOSURE);\n> -\tif (itExp == ctrls_.end()) {\n> +\tconst auto itExp = sensorCtrls_.find(V4L2_CID_EXPOSURE);\n> +\tif (itExp == sensorCtrls_.end()) {\n>  \t\tLOG(IPAIPU3, Error) << \"Can't find exposure control\";\n>  \t\treturn -EINVAL;\n>  \t}\n>  \n> -\tconst auto itGain = ctrls_.find(V4L2_CID_ANALOGUE_GAIN);\n> -\tif (itGain == ctrls_.end()) {\n> +\tconst auto itGain = sensorCtrls_.find(V4L2_CID_ANALOGUE_GAIN);\n> +\tif (itGain == sensorCtrls_.end()) {\n>  \t\tLOG(IPAIPU3, Error) << \"Can't find gain control\";\n>  \t\treturn -EINVAL;\n>  \t}\n>  \n> -\tconst auto itVBlank = ctrls_.find(V4L2_CID_VBLANK);\n> -\tif (itVBlank == ctrls_.end()) {\n> +\tconst auto itVBlank = sensorCtrls_.find(V4L2_CID_VBLANK);\n> +\tif (itVBlank == sensorCtrls_.end()) {\n>  \t\tLOG(IPAIPU3, Error) << \"Can't find VBLANK control\";\n>  \t\treturn -EINVAL;\n>  \t}\n> @@ -467,10 +467,10 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,\n>  \tlineDuration_ = sensorInfo_.lineLength * 1.0s / sensorInfo_.pixelRate;\n>  \n>  \t/* Update the camera controls using the new sensor settings. */\n> -\tupdateControls(sensorInfo_, ctrls_, ipaControls);\n> +\tupdateControls(sensorInfo_, sensorCtrls_, ipaControls);\n>  \n>  \t/* Update the IPASessionConfiguration using the sensor settings. */\n> -\tupdateSessionConfiguration(ctrls_);\n> +\tupdateSessionConfiguration(sensorCtrls_);\n>  \n>  \tfor (auto const &algo : algorithms_) {\n>  \t\tint ret = algo->configure(context_, configInfo);\n> @@ -669,7 +669,7 @@ void IPAIPU3::setControls(unsigned int frame)\n>  \texposure_ = context_.frameContext.agc.exposure;\n>  \tgain_ = camHelper_->gainCode(context_.frameContext.agc.gain);\n>  \n> -\tControlList ctrls(ctrls_);\n> +\tControlList ctrls(sensorCtrls_);\n>  \tctrls.set(V4L2_CID_EXPOSURE, static_cast<int32_t>(exposure_));\n>  \tctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));\n>  \top.sensorControls = ctrls;","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 5B42ABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Dec 2021 08:37:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A947E60868;\n\tWed,  8 Dec 2021 09:37:22 +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 7B7BE60225\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Dec 2021 09:37:21 +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 EAA528BB;\n\tWed,  8 Dec 2021 09:37:20 +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=\"GrL+p0zq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638952641;\n\tbh=NXWKVLwYo2PciYkyZFKzx1DqzCL2ej8aFPhA8zH7hLw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GrL+p0zqITkxlFzPDYN9UjytJvnYFRyYHbCczG9zvrc60FtAqv4IkU4PRdHtRL61U\n\tH+qmXQ9368A9ZBhWWVkwE37B4f6lHHmAtF4CJ5VTl6YIrp3J1bJWAT2dy7ERlwMWLv\n\tyUMX8Sqe0i49lAeUHjfDu10/mv0MPWj+lkbZiQNw=","Date":"Wed, 8 Dec 2021 10:36:51 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Daniel Scally <djrscally@gmail.com>","Message-ID":"<YbBuo/HhAQDRUmSE@pendragon.ideasonboard.com>","References":"<20211207224512.753979-1-djrscally@gmail.com>\n\t<20211207224512.753979-8-djrscally@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211207224512.753979-8-djrscally@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v3 7/9] libcamera: ipa: Rename ctrls_\n\tmember","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]