[{"id":25270,"web_url":"https://patchwork.libcamera.org/comment/25270/","msgid":"<YzxoQa2ZbbjWFWXa@pendragon.ideasonboard.com>","date":"2022-10-04T17:07:13","subject":"Re: [libcamera-devel] [PATCH v1 6/9] ipa: raspberrypi: Add line\n\tlength to DeviceStatus","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Mon, Oct 03, 2022 at 09:39:32AM +0100, Naushir Patuck via libcamera-devel wrote:\n> Add a lineLength field to the DeviceStatus structure to store the line length\n> used for a particular frame.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/raspberrypi/controller/device_status.cpp | 1 +\n>  src/ipa/raspberrypi/controller/device_status.h   | 4 +++-\n>  src/ipa/raspberrypi/raspberrypi.cpp              | 2 ++\n>  3 files changed, 6 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/raspberrypi/controller/device_status.cpp\n> index 2360a77bf1ea..c907efdd7511 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.cpp\n> +++ b/src/ipa/raspberrypi/controller/device_status.cpp\n> @@ -12,6 +12,7 @@ std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)\n>  {\n>  \tout << \"Exposure: \" << d.shutterSpeed\n>  \t    << \" Frame length: \" << d.frameLength\n> +\t    << \" Line length: \" << d.lineLength\n>  \t    << \" Gain: \" << d.analogueGain;\n>  \n>  \tif (d.aperture)\n> diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\n> index 8f74e21b0c6e..4384c2149589 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.h\n> +++ b/src/ipa/raspberrypi/controller/device_status.h\n> @@ -19,7 +19,7 @@\n>  struct DeviceStatus {\n>  \tDeviceStatus()\n>  \t\t: shutterSpeed(std::chrono::seconds(0)), frameLength(0),\n> -\t\t  analogueGain(0.0)\n> +\t\t  lineLength(std::chrono::seconds(0)), analogueGain(0.0)\n>  \t{\n>  \t}\n>  \n> @@ -29,6 +29,8 @@ struct DeviceStatus {\n>  \tlibcamera::utils::Duration shutterSpeed;\n>  \t/* frame length given in number of lines */\n>  \tuint32_t frameLength;\n> +\t/* line length for the current frame */\n> +\tlibcamera::utils::Duration lineLength;\n>  \tdouble analogueGain;\n>  \t/* 1.0/distance-in-metres, or 0 if unknown */\n>  \tstd::optional<double> lensPosition;\n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index b6289f151677..5d6b22ef6813 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -1108,7 +1108,9 @@ void IPARPi::fillDeviceStatus(const ControlList &sensorControls)\n>  \tint32_t exposureLines = sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();\n>  \tint32_t gainCode = sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>();\n>  \tint32_t vblank = sensorControls.get(V4L2_CID_VBLANK).get<int32_t>();\n> +\tint32_t hblank = sensorControls.get(V4L2_CID_HBLANK).get<int32_t>();\n>  \n> +\tdeviceStatus.lineLength = (mode_.width + hblank) * (1.0s / mode_.pixelRate);\n>  \tdeviceStatus.shutterSpeed = helper_->exposure(exposureLines, mode_.minLineLength);\n>  \tdeviceStatus.analogueGain = helper_->gain(gainCode);\n>  \tdeviceStatus.frameLength = mode_.height + vblank;","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 B5856C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  4 Oct 2022 17:07:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 667E160AB3;\n\tTue,  4 Oct 2022 19:07:18 +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 15D6D60AAC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  4 Oct 2022 19:07:17 +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 9648E2D9;\n\tTue,  4 Oct 2022 19:07:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664903238;\n\tbh=ppGsTnWNJS5SdmmsxIi/DlYNZztdf7GnHvlaF3oe0xI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=cJ7tqNLIGDnA4mD0+kZG4S2yiynFQnXQxDo1Z39spq5zoJJkLHi6CT60T+6zq57Zx\n\tDJ4HrQVuiKuHRLoNzfWyYA6uj9z3qFEcpqEvVZjsaRIJBhFgfUZvfoXL5I8Mp8Nmlt\n\tKjaBb2s0DFp+1+3rlPakdNtN8GkpdwBR6haIeM6Ez1NN9WbjO9VsjUkO2L0gvNbY3V\n\tVKYrAFrillZldPiKLh7EOMlPaBLo/NORbk/fsAdy+LyRyf6m2NVkzQTuE12hmUE0B9\n\tUIpgHFybFcGKTlq9apwtWWL0Sc6hEtRpOm77uVYuurqrk3pr/oehDJ1i2+sdrAmutA\n\trMlKrrQRUG1hg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664903236;\n\tbh=ppGsTnWNJS5SdmmsxIi/DlYNZztdf7GnHvlaF3oe0xI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m5dgjoOSIx8ormfZ42ybkXaggp9cvspJLT1Wu+U+LGZ0g3zIB6NxsSRlxW5aqyCFd\n\tD6Hz3S7d0fLvdNY6dcRq7yYiKkJKJyGX6OFr5Fs3hXZR2ChvqVEgQkRLM5ff6hEZmp\n\tuRZm2InNjY899mWJSRVQ7bSnAneNQqARBQF2j0SU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"m5dgjoOS\"; dkim-atps=neutral","Date":"Tue, 4 Oct 2022 20:07:13 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YzxoQa2ZbbjWFWXa@pendragon.ideasonboard.com>","References":"<20221003083934.31629-1-naush@raspberrypi.com>\n\t<20221003083934.31629-7-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20221003083934.31629-7-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v1 6/9] ipa: raspberrypi: Add line\n\tlength to DeviceStatus","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]