From patchwork Tue Feb 16 08:55:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11305 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 536A0BD1EF for ; Tue, 16 Feb 2021 08:55:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1EB4B637CC; Tue, 16 Feb 2021 09:55:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="DTvgBfDL"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DA4D1637CC for ; Tue, 16 Feb 2021 09:55:10 +0100 (CET) Received: by mail-wr1-x429.google.com with SMTP id u14so12021218wri.3 for ; Tue, 16 Feb 2021 00:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Pt2R33gRvenutUD3S63PltqDlLI4OyrhOOkj/HBAQm8=; b=DTvgBfDLDVKCmcdMkANPIXSiQL8eF/+0JKPYOupPB4m7I3hmu8nvxLzFyQQe/Xj7Iz BvorV9CeoN8c4k1Hl1MnA61v38Ilk3oe1LTz6rrPo3ulxeqpbR8xJFo5ZFWbbc6l7TtX 4975M6E9NtoSX5muyggO8jjbPIuF4RMaK917pJnoOaJvJ2VPRteDSsmDP8GCzlNH1epE aoS2iI/LcYx1vN+64lRaqCwXBIt/JPdQhS0LONlFnOUYSFvbdN27b9Socl2qjiYJUk7n ByGI4I9zVpUH+EDIjEcFHd6usUnpMqoYdzE9D09AR8yC9kv+qLBrbiWtpbC6KgVhmrQ0 sjMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Pt2R33gRvenutUD3S63PltqDlLI4OyrhOOkj/HBAQm8=; b=H8ZUwsYv/Jq7Ww63hUWdmJFLEnm+c7FhdcX2Zem46bYqXw8yAC5XQ+xmHyj1CWLAjN Bbr2dQXlvSPRAY7NX61SU8DnO1VZwrzY9kQkedScHGKM+5fKFMMSRiZR0bqyqhre0Aqe 7areeHqcqlbj9p9OCEkWlNMpDTuDu12LDr9lXn3GlyuIjwX7yx091jKoAGFUR20CY15W nGFD92jRLmP7naEhC7OFQIGl4+EnJOG9qmGvLEaFmqJCk3EzwXphXhcxg4KZWedQHEGb bsBvEwBG060CjKAUFLE+EFOQxzZGhvIvueqNTe+VgZtkdHkA2bqUHoddCWhjAhPByuC6 Yguw== X-Gm-Message-State: AOAM532V+l/5O9FV3Os1Zds3t5Rxc2/UoPm3giFfn8msF3d2OBHa6csW nWlJ9pxSPzFVY/Iz7bHvTMYZkYgda2V/lsSV X-Google-Smtp-Source: ABdhPJxhCoxTSmEOSyDb95zo7dVOb97OqeX7N2Qx65kS8VhYTZ6GH5n6qgIghm9In2LS/6k+af+F8g== X-Received: by 2002:a5d:6c66:: with SMTP id r6mr22299961wrz.86.1613465710390; Tue, 16 Feb 2021 00:55:10 -0800 (PST) Received: from naush-laptop.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id 17sm3439063wmf.32.2021.02.16.00.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 00:55:10 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Feb 2021 08:55:05 +0000 Message-Id: <20210216085505.1018624-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: raspberrypi: Fix exposure and gain delays for imx477 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The exposure and gain delays for imx477 are both 2 frames. This error was not noticeable because the controller was using the embedded metadata to get the exposure and gain values for the frame. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Tested-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/cam_helper_imx477.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp index 9a53c5dba9f8..e26c91f7d86d 100644 --- a/src/ipa/raspberrypi/cam_helper_imx477.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp @@ -37,6 +37,7 @@ public: CamHelperImx477(); uint32_t GainCode(double gain) const override; double Gain(uint32_t gain_code) const override; + void GetDelays(int &exposure_delay, int &gain_delay) const override; bool SensorEmbeddedDataPresent() const override; private: @@ -62,6 +63,12 @@ double CamHelperImx477::Gain(uint32_t gain_code) const return 1024.0 / (1024 - gain_code); } +void CamHelperImx477::GetDelays(int &exposure_delay, int &gain_delay) const +{ + exposure_delay = 2; + gain_delay = 2; +} + bool CamHelperImx477::SensorEmbeddedDataPresent() const { return true;