[{"id":21432,"web_url":"https://patchwork.libcamera.org/comment/21432/","msgid":"<23ebdb65-9a89-658c-e5f1-7ea45844e301@ideasonboard.com>","date":"2021-11-30T09:47:53","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: Rectify gain value\n\treporting in request metadata","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Umang,\n\nOn 30/11/2021 06:22, Umang Jain wrote:\n> Report value of sensor's gain pertaining to the current request\n> completion, as that is the gain value the request completed with.\n> The Agc algorithm processes the gain value for incoming next request\n> hence it should not be reported in request's metadata.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nThanks for the explanation in previous patch.\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\n> ---\n>   src/ipa/ipu3/ipu3.cpp | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index b0c75541..76182587 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -628,7 +628,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>   \tint64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration_.get<std::micro>();\n>   \tctrls.set(controls::FrameDuration, frameDuration);\n>   \n> -\tctrls.set(controls::AnalogueGain, context_.frameContext.agc.gain);\n> +\tctrls.set(controls::AnalogueGain, context_.frameContext.sensor.gain);\n>   \n>   \tctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);\n>   \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 BC350BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 09:47:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76537605B4;\n\tTue, 30 Nov 2021 10:47:57 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3346660230\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 10:47:56 +0100 (CET)","from [IPV6:2a01:e0a:169:7140:699a:a10f:5b1e:89b7] (unknown\n\t[IPv6:2a01:e0a:169:7140:699a:a10f:5b1e:89b7])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF86393;\n\tTue, 30 Nov 2021 10:47:55 +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=\"Nxm9K68e\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638265675;\n\tbh=S4Pcx67/bFdk7s5MfUtFv4/wLQavbA3tZggqNkCEdTg=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=Nxm9K68ep7yKfZga+/tdGz1MyDBBoOB4W25GHaWVC76Uluw1QM0LlClgxw5yyh3d5\n\t8eqWrhMyZR3xNDSnyGEScct3qWVpmzMSt5TpK3aK+ItQwSivIv5uxnIXaMCAuE9vGH\n\t1oKVsUnbSy0inOAF5hpPwgJDhecnTOEtH9w9Kz2Y=","Message-ID":"<23ebdb65-9a89-658c-e5f1-7ea45844e301@ideasonboard.com>","Date":"Tue, 30 Nov 2021 10:47:53 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.3.1","Content-Language":"en-US","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20211130052253.513278-1-umang.jain@ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","In-Reply-To":"<20211130052253.513278-1-umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: Rectify gain value\n\treporting in request metadata","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":21438,"web_url":"https://patchwork.libcamera.org/comment/21438/","msgid":"<163826819260.3059017.15589713459197197908@Monstersaurus>","date":"2021-11-30T10:29:52","subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: Rectify gain value\n\treporting in request metadata","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Umang Jain (2021-11-30 05:22:53)\n> Report value of sensor's gain pertaining to the current request\n> completion, as that is the gain value the request completed with.\n> The Agc algorithm processes the gain value for incoming next request\n> hence it should not be reported in request's metadata.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipu3.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index b0c75541..76182587 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -628,7 +628,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>         int64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration_.get<std::micro>();\n>         ctrls.set(controls::FrameDuration, frameDuration);\n>  \n> -       ctrls.set(controls::AnalogueGain, context_.frameContext.agc.gain);\n> +       ctrls.set(controls::AnalogueGain, context_.frameContext.sensor.gain);\n\nAha, yes that looks like a more reasonable way to align the Gain and\nExposure.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nWe could probably add some extra/better comments on the gain/exposure to\nmake it clear, but this is a valid fix on it's own, and if we add extra\ndocumentation - we should align it with both the IPU3 and the RKISP now.\n\n--\nKieran\n\n\n>  \n>         ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);\n>  \n> -- \n> 2.31.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 44816BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 10:29:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F4090605B8;\n\tTue, 30 Nov 2021 11:29:57 +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 0E7F5605A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 11:29:56 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9CB3B2A5;\n\tTue, 30 Nov 2021 11:29:55 +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=\"sOjEDDy+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638268195;\n\tbh=QKn/5FKHn2xnHdFrPhX1gsGZmU2UtbuuVZQJXC4WtVI=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=sOjEDDy+tdvNo6ssn9Ce4Y1RRtsoKJLjJwfs2iM5w8QqLzsoVQOqVvY+rz9kaOUBb\n\tKlJ7fAqyFpHx1O/LxKhI49U+QyFt3PFmKRkXbd8XMHCEyIXQSfrCKAWoeJX9F2FAWY\n\tYdYXf/rROyABccOxD5eBp59m75Q0vZ6aWNVUBQtQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211130052253.513278-1-umang.jain@ideasonboard.com>","References":"<20211130052253.513278-1-umang.jain@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 30 Nov 2021 10:29:52 +0000","Message-ID":"<163826819260.3059017.15589713459197197908@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] ipa: ipu3: Rectify gain value\n\treporting in request metadata","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>"}}]