[{"id":33925,"web_url":"https://patchwork.libcamera.org/comment/33925/","msgid":"<20250407070232.GB3924@pendragon.ideasonboard.com>","date":"2025-04-07T07:02:32","subject":"Re: [PATCH] Add libipa camera sensor helper support for Sony IMX208\n\tsensor","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Petar,\n\nThank you for the patch.\n\nOn Sun, Apr 06, 2025 at 08:15:49PM +0100, Petar Lishov wrote:\n> Added imx208 camera sensor helper to libipa and tested on a\n> Google Pixelbook Go (Atlas) running barebones Fedora 41 with\n> stock kernel (6.11.4) which has an Intel IPU3 and Sony IMX208.\n> \n> Camera sensor parameters were taken from Sony IMX214 parameters\n> in the same file, so they are not backed by a sensor datasheet\n> and may be slightly inaccurate.\n\nThe patch is missing a Signed-off-by line. Please see\nhttps://libcamera.org/contributing.html#submitting-patches. This issue\nshould have been caught by the checkstyle.py script. You can run it\nmanually before submitting patches, but I recommend automating the\nprocess with a git hook. You can find more information at\nhttps://libcamera.org/coding-style.html#tools.\n\n> ---\n>  src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++\n\nPlease also add an entry to\nsrc/libcamera/sensor/camera_sensor_properties.cpp.\n\n>  1 file changed, 12 insertions(+)\n> \n> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp\n> index 7c66cd57..5580a530 100644\n> --- a/src/ipa/libipa/camera_sensor_helper.cpp\n> +++ b/src/ipa/libipa/camera_sensor_helper.cpp\n> @@ -497,6 +497,18 @@ public:\n>  };\n>  REGISTER_CAMERA_SENSOR_HELPER(\"gc08a3\", CameraSensorHelperGc08a3)\n>  \n> +class CameraSensorHelperImx208 : public CameraSensorHelper\n> +{\n> +public:\n> +\tCameraSensorHelperImx208()\n> +\t{\n> +\t\t// These values are pure guesses, datasheet yet to be found\n\nEven if we're limited by the lack of datasheet, the black level can at\nleast be estimated by capturing raw images with the sensor completely\noccluded, and checking the minimal pixel values.\n\n> +\t\tblackLevel_ = 4096;\n> +\t\tgain_ = AnalogueGainLinear{ 0, 512, -1, 512 };\n\nLooking at the driver, this doesn't seem right at all. The analog gain\ncontrol is mapped to a single register, with a range of [0, 224] and a\ndefault value of 0. Your linear gain model would mean that the default\ngain is 0.0, which would make images completely black. I'm pretty sure\nthat's not the case.\n\n> +\t}\n> +};\n> +REGISTER_CAMERA_SENSOR_HELPER(\"imx208\", CameraSensorHelperImx208)\n> +\n>  class CameraSensorHelperImx214 : public CameraSensorHelper\n>  {\n>  public:","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 3F4C2C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Apr 2025 07:03:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EBC5C689AA;\n\tMon,  7 Apr 2025 09:02:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F1106899C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Apr 2025 09:02:57 +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 BDA45236;\n\tMon,  7 Apr 2025 09:01:00 +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=\"CzNrGIxe\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1744009260;\n\tbh=zte6wQasWTRA4i/mPB4uOtJ9wZvKeMU6rMFJGTBJjKU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=CzNrGIxecHZXtlCRixcm5sV7FI/K2LZrcWI/P/6Nhe0QiPk2lRGRtUYAf7uSzJYWI\n\t/c7qh97fdqSY68P4duMShyEWtLHgqiZYBF+SYEBhUs+MOrpwIuhuKBvMeSI1KYaUxq\n\tAPz3Yhn/Cz8V8NeuhyAVuLwk+uu9U+eGLv5jJ7dE=","Date":"Mon, 7 Apr 2025 10:02:32 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Petar Lishov <peter.lishov@gmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] Add libipa camera sensor helper support for Sony IMX208\n\tsensor","Message-ID":"<20250407070232.GB3924@pendragon.ideasonboard.com>","References":"<20250406191549.13225-1-peter.lishov@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250406191549.13225-1-peter.lishov@gmail.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>"}}]