From patchwork Thu Sep 28 09:41:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 19091 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 D431CC326B for ; Thu, 28 Sep 2023 09:41:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4D29561DE1; Thu, 28 Sep 2023 11:41:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695894090; bh=ADAxlc/a/9qc6lB+ocH8xK/AHpm0LeGhVTFc/xuDQ0c=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=S9gIiH7dXitCHGo5Lpg48lIX46ql2pfVvGkNnKXsXhGszXpv+xlWZqoMqdp457GCb oQ5hEtaI7vMDXb3UXBqg/HE8OhaxQmqAuD1dzvQL8K0gXtCHDgU+5czv2v9Hl4TdbE Kzy+TvqipC/VHCLIyA6At1Vlzjt0ikMd7oSGE3RMqVJgbowOE0uoWGoMLt2ajAltmM Ob4QkZrRUCk2xVXL7LbMItGmrSsub3NwUQf0xSomqEF6rcpvZXQddek5zs62IsmWe0 yf0hzqNT6Q7eg78HluTrdI6l0PIc93FwpLzmn/V7URABAFiGS2V4ROjnpnqEUGgLLl oz7nrLVm+KcUQ== Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E76DA61DE1 for ; Thu, 28 Sep 2023 11:41:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SGviwS+J"; dkim-atps=neutral Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3231dff4343so5823131f8f.0 for ; Thu, 28 Sep 2023 02:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1695894088; x=1696498888; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Dt+wapjxDUScAB7vMyDlS4OAlDoGDeUp3/NHY4ZOmoU=; b=SGviwS+JJWyzNY6sE1ZYwHO/2lR18b09HZ4wbjY2V0GbOg7c63amtXRmoiIrFqF/z8 xnpLg/qgO1dvTCVlYJjLDuZ8ljTybNkrdt/5EqH9GkMaHlOCHIQQRC47H7iVy/rZxytv KuB+0Mn/AaR3IXWHmyvEDNU1tDWps37704QitX03jgkrs4QeVi+kEMeN5tcb7/bdmijC oL4ky6pVDasMn6ss5kjW4+mOyORMiRz1apwuRlZzPeAajkvhRdCieXK0SnNVcE5/D7OL avW1mREfcGTZZMERhUKDWUY8zga0AqcWCT4Tcd0Kht+utebU9fIoU3/h2zjFdxspGDzV g6UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695894088; x=1696498888; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dt+wapjxDUScAB7vMyDlS4OAlDoGDeUp3/NHY4ZOmoU=; b=PKDxrDCJAK65VQYIEpazCKnlhZOuaeTOtT2nRZCJ77WafzEqLM7eoJFNH0woazshXV kPerYohVoYK4SksGtA6nZqQNf2waxIthUP8ZzfPMzBipuOoC+LuhPyvT0abqqFCIfKOv kkkFag6meYXGEaHMlTV6o6yq2IZ/4aIZXq3QbWqfZI+kWmq8nWDXWYAHSYy9qGGw4HJ3 +59DKnIpS37xrCRBSWsSj36tzLME3isc6RMAjLd/HdZjOuIFcMRrcLget38/3kYHctlR Zj+gUR0SeSqLkyhnM8P5+dnX/d/FuBpT8/3jffh/VFj/o1nibkfGuAFXtV9zbu9ecZgO sekQ== X-Gm-Message-State: AOJu0YxHbhHpcQEQxIYUgmTVckt/EF6yzg7+40LgGTibOFLE8gCSOcie pnQ+luOF9ZoqCHbmP2eI0lFjZlpHB1cHGZV7MEE= X-Google-Smtp-Source: AGHT+IHGiMrUFYwM2ID/h4DZ8nAbthodTdikyRdFMxsQHetfDQk0W7Ky40OiN/L9NfVdB1YshqAIVg== X-Received: by 2002:a5d:604c:0:b0:317:dadc:4a63 with SMTP id j12-20020a5d604c000000b00317dadc4a63mr781580wrt.8.1695894088033; Thu, 28 Sep 2023 02:41:28 -0700 (PDT) Received: from pi5-davidp.pitowers.org ([2a00:1098:3142:14:183e:6cc8:a436:a27c]) by smtp.gmail.com with ESMTPSA id n26-20020a7bcbda000000b004063977eccesm6864278wmi.42.2023.09.28.02.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 02:41:27 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 28 Sep 2023 10:41:24 +0100 Message-Id: <20230928094124.21801-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: rpi: Avoid skipping IPAs on the first frame after the drop frames 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: , X-Patchwork-Original-From: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" We avoid skipping the IPAs while frameCount_ is less then dropFrameCount_, indicating that these frames will not be sent to the application. This means that when these numbers are equal then this is the first frame the application will get, so again, we must avoid skipping the IPAs. Consequently the test here must avoid the case of equality. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham --- src/ipa/rpi/common/ipa_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 551adadf..5df1998c 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -409,7 +409,7 @@ void IpaBase::prepareIsp(const PrepareParams ¶ms) /* Allow a 10% margin on the comparison below. */ Duration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns; - if (lastRunTimestamp_ && frameCount_ >= dropFrameCount_ && + if (lastRunTimestamp_ && frameCount_ > dropFrameCount_ && delta < controllerMinFrameDuration * 0.9) { /* * Ensure we merge the previous frame's metadata with the current