[{"id":17456,"web_url":"https://patchwork.libcamera.org/comment/17456/","msgid":"<YL6j2iwTzRuOLOBH@pendragon.ideasonboard.com>","date":"2021-06-07T22:55:22","subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Wed, Jun 02, 2021 at 03:53:26PM +0530, Umang Jain wrote:\n> Frame duration is hard-coded for CTS as per [1]. Ideally, to accurately\n> calculate the frame duration, it needs the VBLANK value from every\n> frame's exposure. However, this particular bit is yet to be implemented\n> in IPAIPU3.\n> \n> Meanwhile, we can atleast head in the right direction by not hard\n> coding the value, instead using the minimum VBLANK value as reported\n\ns/reported/reported by/\n\n> the sensor. Update the existing \\todo, to use the derived VBLANK value\n> as and when it's available from each frame exposure.\n> \n> [1] 6c5f3fe6ced7 (\"ipa: ipu3: Set output frame duration metadata\")\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n> \n> For reference, on `nautilus`:\n> - minVBlank_ was reported as '104'\n> - Calculating frame-duration using minVBlank_ came out to be: 34041\n> \n> ---\n>  src/ipa/ipu3/ipu3.cpp | 16 +++++++++++++---\n>  1 file changed, 13 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 97ddb863..db4ec684 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -72,6 +72,7 @@ private:\n>  \tuint32_t gain_;\n>  \tuint32_t minGain_;\n>  \tuint32_t maxGain_;\n> +\tuint32_t minVBlank_;\n>  \n>  \t/* Interface to the AWB algorithm */\n>  \tstd::unique_ptr<IPU3Awb> awbAlgo_;\n> @@ -162,6 +163,12 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \t\treturn;\n>  \t}\n>  \n> +\tconst auto itVBlank = ctrls_.find(V4L2_CID_VBLANK);\n> +\tif (itVBlank == ctrls_.end()) {\n> +\t\tLOG(IPAIPU3, Error) << \"Can't find VBLANK control\";\n> +\t\treturn;\n> +\t}\n> +\n>  \tminExposure_ = std::max(itExp->second.min().get<int32_t>(), 1);\n>  \tmaxExposure_ = itExp->second.max().get<int32_t>();\n>  \texposure_ = minExposure_;\n> @@ -170,6 +177,8 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \tmaxGain_ = itGain->second.max().get<int32_t>();\n>  \tgain_ = minGain_;\n>  \n> +\tminVBlank_ = itVBlank->second.min().get<int32_t>();\n\nWe should address vblank setting sooner than later, I'm a bit worried\nbit possible regressions introduced by this patch. At the very least,\ncould we use the default vblank value instead of the minimum ? That\nwould have a better chance of matching what the sensor driver uses.\n\nJean-Michel, could you test this series ton SGo2 to verify there's no\nregression ? Ideally, could you try both the min and def options ?\nAssuming no regression,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\n> +\n>  \tparams_ = {};\n>  \n>  \tcalculateBdsGrid(configInfo.bdsOutputSize);\n> @@ -273,9 +282,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>  \tif (agcAlgo_->updateControls())\n>  \t\tsetControls(frame);\n>  \n> -\t/* \\todo Populate this with real values */\n> -\tctrls.set(controls::FrameDuration,\n> -\t\t  static_cast<int64_t>(33334));\n> +\t/* \\todo Use VBlank value calculated from each frame exposure. */\n> +\tint64_t frameDuration = sensorInfo_.lineLength * (minVBlank_ + sensorInfo_.outputSize.height) /\n> +\t\t\t\t(sensorInfo_.pixelRate / 1e6);\n> +\tctrls.set(controls::FrameDuration, frameDuration);\n>  \n>  \tIPU3Action op;\n>  \top.op = ActionMetadataReady;","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 DEF74C3206\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Jun 2021 22:55:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A9DA68922;\n\tTue,  8 Jun 2021 00:55:38 +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 DEB706891C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Jun 2021 00:55:36 +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 4DD1D292;\n\tTue,  8 Jun 2021 00:55:36 +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=\"cHS83PJa\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623106536;\n\tbh=VxC6pc1A+COG5bKOG7cjq4vLz2ADOwidCouaiyZ/nkw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cHS83PJaPKbam1peRJbg1A/0lxcR64TmUfM+qlp+ziq32eK7Mm7fTSqIw5q+X95s2\n\twxIa569uBOwUNqBzUiR9OzBgvy74cE2ulIG2iqJO6E5gMVsh+mu+E963ROgscOMZDO\n\tlplbRGWRZmYlkVoCAuV8M9VhNOZvyNEejC19q/ms=","Date":"Tue, 8 Jun 2021 01:55:22 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YL6j2iwTzRuOLOBH@pendragon.ideasonboard.com>","References":"<20210602102326.106549-1-umang.jain@ideasonboard.com>\n\t<20210602102326.106549-5-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210602102326.106549-5-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","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>"}},{"id":17462,"web_url":"https://patchwork.libcamera.org/comment/17462/","msgid":"<34d442e3-010f-12e5-f1c5-ed5343403b94@ideasonboard.com>","date":"2021-06-08T05:25:32","subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 08/06/2021 00:55, Laurent Pinchart wrote:\n> Hi Umang,\n> \n> Thank you for the patch.\n> \n> On Wed, Jun 02, 2021 at 03:53:26PM +0530, Umang Jain wrote:\n>> Frame duration is hard-coded for CTS as per [1]. Ideally, to accurately\n>> calculate the frame duration, it needs the VBLANK value from every\n>> frame's exposure. However, this particular bit is yet to be implemented\n>> in IPAIPU3.\n>>\n>> Meanwhile, we can atleast head in the right direction by not hard\n>> coding the value, instead using the minimum VBLANK value as reported\n> \n> s/reported/reported by/\n> \n>> the sensor. Update the existing \\todo, to use the derived VBLANK value\n>> as and when it's available from each frame exposure.\n>>\n>> [1] 6c5f3fe6ced7 (\"ipa: ipu3: Set output frame duration metadata\")\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>> ---\n>>\n>> For reference, on `nautilus`:\n>> - minVBlank_ was reported as '104'\n>> - Calculating frame-duration using minVBlank_ came out to be: 34041\n>>\n>> ---\n>>  src/ipa/ipu3/ipu3.cpp | 16 +++++++++++++---\n>>  1 file changed, 13 insertions(+), 3 deletions(-)\n>>\n>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>> index 97ddb863..db4ec684 100644\n>> --- a/src/ipa/ipu3/ipu3.cpp\n>> +++ b/src/ipa/ipu3/ipu3.cpp\n>> @@ -72,6 +72,7 @@ private:\n>>  \tuint32_t gain_;\n>>  \tuint32_t minGain_;\n>>  \tuint32_t maxGain_;\n>> +\tuint32_t minVBlank_;\n>>  \n>>  \t/* Interface to the AWB algorithm */\n>>  \tstd::unique_ptr<IPU3Awb> awbAlgo_;\n>> @@ -162,6 +163,12 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>  \t\treturn;\n>>  \t}\n>>  \n>> +\tconst auto itVBlank = ctrls_.find(V4L2_CID_VBLANK);\n>> +\tif (itVBlank == ctrls_.end()) {\n>> +\t\tLOG(IPAIPU3, Error) << \"Can't find VBLANK control\";\n>> +\t\treturn;\n>> +\t}\n>> +\n>>  \tminExposure_ = std::max(itExp->second.min().get<int32_t>(), 1);\n>>  \tmaxExposure_ = itExp->second.max().get<int32_t>();\n>>  \texposure_ = minExposure_;\n>> @@ -170,6 +177,8 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>  \tmaxGain_ = itGain->second.max().get<int32_t>();\n>>  \tgain_ = minGain_;\n>>  \n>> +\tminVBlank_ = itVBlank->second.min().get<int32_t>();\n> \n> We should address vblank setting sooner than later, I'm a bit worried\n> bit possible regressions introduced by this patch. At the very least,\n> could we use the default vblank value instead of the minimum ? That\n> would have a better chance of matching what the sensor driver uses.\n> \n> Jean-Michel, could you test this series ton SGo2 to verify there's no\n> regression ? Ideally, could you try both the min and def options ?\n> Assuming no regression,\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nSure !\nI don't have any regression, and the durations calculated are:\n- 32726 for min\n- 33331 for def\n\nThe def one is more accurate, which is expected as this is set by the\ndriver based on the current timings.\nI did not expect regressions with the current IPA AGC because VBLANK is\nnot set at all.\nSo:\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nTested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\n> \n>> +\n>>  \tparams_ = {};\n>>  \n>>  \tcalculateBdsGrid(configInfo.bdsOutputSize);\n>> @@ -273,9 +282,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>>  \tif (agcAlgo_->updateControls())\n>>  \t\tsetControls(frame);\n>>  \n>> -\t/* \\todo Populate this with real values */\n>> -\tctrls.set(controls::FrameDuration,\n>> -\t\t  static_cast<int64_t>(33334));\n>> +\t/* \\todo Use VBlank value calculated from each frame exposure. */\n>> +\tint64_t frameDuration = sensorInfo_.lineLength * (minVBlank_ + sensorInfo_.outputSize.height) /\n>> +\t\t\t\t(sensorInfo_.pixelRate / 1e6);\n>> +\tctrls.set(controls::FrameDuration, frameDuration);\n>>  \n>>  \tIPU3Action op;\n>>  \top.op = ActionMetadataReady;\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 730D5BD22E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  8 Jun 2021 05:25:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD97C68926;\n\tTue,  8 Jun 2021 07:25:35 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9BE9F6029D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Jun 2021 07:25:33 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:2d50:21bc:f0b3:7d2f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2916B3E6;\n\tTue,  8 Jun 2021 07:25:33 +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=\"kzzXAVVe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623129933;\n\tbh=e/mRg082Hw2CA9t82iZf/+AaIEerHSo+q5KRMhjteVs=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=kzzXAVVegclN5CWQpKyF5JgYV4UQoD5e6DrfxNXczHhjt1/r7///fM2B6MZCcGr/f\n\tG6P7IJQAFCu65O7uuKaETgwsHCM2ME2ykpvjQ5TeeKnzxQ4sDLtVVq2j8TCBFOQMwr\n\tidBztZWJXt6OOHSTR1uBWMVGVIHN/lPfwiYGfRIk=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tUmang Jain <umang.jain@ideasonboard.com>","References":"<20210602102326.106549-1-umang.jain@ideasonboard.com>\n\t<20210602102326.106549-5-umang.jain@ideasonboard.com>\n\t<YL6j2iwTzRuOLOBH@pendragon.ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<34d442e3-010f-12e5-f1c5-ed5343403b94@ideasonboard.com>","Date":"Tue, 8 Jun 2021 07:25:32 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<YL6j2iwTzRuOLOBH@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","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>"}},{"id":17465,"web_url":"https://patchwork.libcamera.org/comment/17465/","msgid":"<6f12accc-07c4-8ce9-ba64-5b377a2c665a@ideasonboard.com>","date":"2021-06-08T06:09:24","subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi JM, Laurent,\n\nOn 6/8/21 10:55 AM, Jean-Michel Hautbois wrote:\n> Hi Laurent,\n>\n> On 08/06/2021 00:55, Laurent Pinchart wrote:\n>> Hi Umang,\n>>\n>> Thank you for the patch.\n>>\n>> On Wed, Jun 02, 2021 at 03:53:26PM +0530, Umang Jain wrote:\n>>> Frame duration is hard-coded for CTS as per [1]. Ideally, to accurately\n>>> calculate the frame duration, it needs the VBLANK value from every\n>>> frame's exposure. However, this particular bit is yet to be implemented\n>>> in IPAIPU3.\n>>>\n>>> Meanwhile, we can atleast head in the right direction by not hard\n>>> coding the value, instead using the minimum VBLANK value as reported\n>> s/reported/reported by/\n>>\n>>> the sensor. Update the existing \\todo, to use the derived VBLANK value\n>>> as and when it's available from each frame exposure.\n>>>\n>>> [1] 6c5f3fe6ced7 (\"ipa: ipu3: Set output frame duration metadata\")\n>>>\n>>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>>> ---\n>>>\n>>> For reference, on `nautilus`:\n>>> - minVBlank_ was reported as '104'\n>>> - Calculating frame-duration using minVBlank_ came out to be: 34041\n>>>\n>>> ---\n>>>   src/ipa/ipu3/ipu3.cpp | 16 +++++++++++++---\n>>>   1 file changed, 13 insertions(+), 3 deletions(-)\n>>>\n>>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>>> index 97ddb863..db4ec684 100644\n>>> --- a/src/ipa/ipu3/ipu3.cpp\n>>> +++ b/src/ipa/ipu3/ipu3.cpp\n>>> @@ -72,6 +72,7 @@ private:\n>>>   \tuint32_t gain_;\n>>>   \tuint32_t minGain_;\n>>>   \tuint32_t maxGain_;\n>>> +\tuint32_t minVBlank_;\n>>>   \n>>>   \t/* Interface to the AWB algorithm */\n>>>   \tstd::unique_ptr<IPU3Awb> awbAlgo_;\n>>> @@ -162,6 +163,12 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>>   \t\treturn;\n>>>   \t}\n>>>   \n>>> +\tconst auto itVBlank = ctrls_.find(V4L2_CID_VBLANK);\n>>> +\tif (itVBlank == ctrls_.end()) {\n>>> +\t\tLOG(IPAIPU3, Error) << \"Can't find VBLANK control\";\n>>> +\t\treturn;\n>>> +\t}\n>>> +\n>>>   \tminExposure_ = std::max(itExp->second.min().get<int32_t>(), 1);\n>>>   \tmaxExposure_ = itExp->second.max().get<int32_t>();\n>>>   \texposure_ = minExposure_;\n>>> @@ -170,6 +177,8 @@ void IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>>   \tmaxGain_ = itGain->second.max().get<int32_t>();\n>>>   \tgain_ = minGain_;\n>>>   \n>>> +\tminVBlank_ = itVBlank->second.min().get<int32_t>();\n>> We should address vblank setting sooner than later, I'm a bit worried\n>> bit possible regressions introduced by this patch. At the very least,\n>> could we use the default vblank value instead of the minimum ? That\n>> would have a better chance of matching what the sensor driver uses.\n>>\n>> Jean-Michel, could you test this series ton SGo2 to verify there's no\n>> regression ? Ideally, could you try both the min and def options ?\n>> Assuming no regression,\n>>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Sure !\n> I don't have any regression, and the durations calculated are:\n> - 32726 for min\n> - 33331 for def\n>\n> The def one is more accurate, which is expected as this is set by the\n> driver based on the current timings.\n> I did not expect regressions with the current IPA AGC because VBLANK is\n> not set at all.\nInteresting, on nautilus (imx258) the min and default VBLANK values \nturns out to be the same. I'll change it to use the default one, as per \nyour feedback here.\n> So:\n> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nThanks for Testing!\n>\n>>> +\n>>>   \tparams_ = {};\n>>>   \n>>>   \tcalculateBdsGrid(configInfo.bdsOutputSize);\n>>> @@ -273,9 +282,10 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>>>   \tif (agcAlgo_->updateControls())\n>>>   \t\tsetControls(frame);\n>>>   \n>>> -\t/* \\todo Populate this with real values */\n>>> -\tctrls.set(controls::FrameDuration,\n>>> -\t\t  static_cast<int64_t>(33334));\n>>> +\t/* \\todo Use VBlank value calculated from each frame exposure. */\n>>> +\tint64_t frameDuration = sensorInfo_.lineLength * (minVBlank_ + sensorInfo_.outputSize.height) /\n>>> +\t\t\t\t(sensorInfo_.pixelRate / 1e6);\n>>> +\tctrls.set(controls::FrameDuration, frameDuration);\n>>>   \n>>>   \tIPU3Action op;\n>>>   \top.op = ActionMetadataReady;","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 62E50C3206\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  8 Jun 2021 06:09:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4BC436892D;\n\tTue,  8 Jun 2021 08:09:30 +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 88A4F6029D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  8 Jun 2021 08:09:29 +0200 (CEST)","from [192.168.0.107] (unknown [103.251.226.98])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 60FF53E6;\n\tTue,  8 Jun 2021 08:09:28 +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=\"gLAjKEN/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623132569;\n\tbh=EepC6QB1s42Y5OEioZYpCpu+eonw9qnDUUqyc4bYmyQ=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=gLAjKEN/z5l7xsYeV3A5uwrkiHmuvCzDTWqf944PUE8qTEPuIqGV5E8i5RtpIXsMK\n\tNPoosIWbWRZchAm+6gTjh7rX8YYi85Va00KM86VcbpiyyjnHNUC73EGmr/xDYdSyCa\n\tWAGRcFa3ixL03fszChR2L/RrF6YHGOitrPEat6Es=","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210602102326.106549-1-umang.jain@ideasonboard.com>\n\t<20210602102326.106549-5-umang.jain@ideasonboard.com>\n\t<YL6j2iwTzRuOLOBH@pendragon.ideasonboard.com>\n\t<34d442e3-010f-12e5-f1c5-ed5343403b94@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<6f12accc-07c4-8ce9-ba64-5b377a2c665a@ideasonboard.com>","Date":"Tue, 8 Jun 2021 11:39:24 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<34d442e3-010f-12e5-f1c5-ed5343403b94@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH 4/4] ipa: ipu3: Calculate frame\n\tduration from minimum VBLANK value","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>"}}]