From patchwork Wed Nov 30 10:52:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 17919 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 29B35BDE6B for ; Wed, 30 Nov 2022 10:53:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 73EE36333F; Wed, 30 Nov 2022 11:52:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1669805579; bh=P7gJjTuPpc/uZENO0gNZecQr40pxS2kPMNPwmThHuhs=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fnAnc/HgMn47Y+dwDSlfcrJTSI1gIZOHckPciVbM/eAmyT1NPPzELtSmHHcg7TvTR d9NpdZLnxIJl5ALhhhbeMxZ4942H81L2ywnOGi8/R73xFCSqJBgt141F6Nl54xisby nlK4mUppa1rIkcvp27zIdEtVKOd5l+SnudYL7DuPhbRypFPnkRLrNWpuH+flkuR9SE SORu59xYO9lB35st//3LXlNn5xFdHVEctu4bMQR0T+ynwR+b23eOyjm6HG+2p45yGu mXECBvdtUE1sQbI3amkTqaj2Viuxiz1GJxutE6+kssppHwXEoTYm9wh/ZPd+vro2sV D/6+28QprJfuw== Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 05B4560483 for ; Wed, 30 Nov 2022 11:52:58 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="cw2YedJr"; dkim-atps=neutral Received: by mail-wr1-x430.google.com with SMTP id bx10so14365577wrb.0 for ; Wed, 30 Nov 2022 02:52:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=g7Us5HiP74CZmoDuLqE6ezXblr7oQSvrvtvEwNdiyy8=; b=cw2YedJrG8PXX+DWxF4YoUV1Oh/YwA5df9fVLRIGawumfXkAJnqAybpMoFdo1XrGKB 8KxaVVYTiHZhuQlzlrESsmOXv4peu8QKTGfFnVzLKZwZkrsRc0PzjLFcmRbJkbHN1+EO zzmhN7T9UgUHSs90KqDszqmEkICKEea8xOBMK5G9+GIIOgurZQCoIdqDu9k+9B4+OaLO 6kYihW5QZoL5BTHf5DAIr+MbV/t2+QlF7KvDH9Jh5KTP+33HJB70YXT3a/staeoDwf5h h2+Deu8ub5irQoIxtCmMvDVZuXePts0xZcW1oa+1Yu/FGZHGQ7kURPh52efCTqJ02gIB qoGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=g7Us5HiP74CZmoDuLqE6ezXblr7oQSvrvtvEwNdiyy8=; b=TaUChhr497wdUuOey/IajMMM0J/8Mw6bgxx/VY41nYK4ho62PJSymy1zatTPYybFTU TZ0a+BJHV1t9aWi28VcehRbHUp9JA0oI7K6tmHSe4+g5u13H2oMQIbgm7QzI7ck/mXqc v/oNLN3s0Fw/N6aRzJKCp4udeVvYPxUts+veLX8CAeJaOoQgNv5ylFzeg7wFQqqeC25g Rr0zBYyju2BXlvP6ePdBpMpx+O0qzntTH4BYGiqmhIAG30LaQO2tsg8t3MLQsrP4DSJ3 1tcq/SPW23ZYhd8yVpk9oEbBRVqWqYL/DlJHeb9YYDitEPZ7HRefXmhmhNKKRmAl42sh JsFw== X-Gm-Message-State: ANoB5plt2NH40aqERj5djZEax8ei9bMEAjkv4Fq2o3Awve3qPydlp0xf Bu3PlodlewdWRUpg1w1VDgJ+XSGxPrKqkw== X-Google-Smtp-Source: AA0mqf5P7a4BdJaSdDhL6MF5X8U+geTz143Jp9ej8wh7cqNVKLFL5bC+eCmPGHFJ/CuJBTsLu1TDTw== X-Received: by 2002:adf:f981:0:b0:242:8c1:601 with SMTP id f1-20020adff981000000b0024208c10601mr15329144wrr.339.1669805577334; Wed, 30 Nov 2022 02:52:57 -0800 (PST) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id bi18-20020a05600c3d9200b003c65c9a36dfsm1412679wmb.48.2022.11.30.02.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:52:56 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Wed, 30 Nov 2022 10:52:53 +0000 Message-Id: <20221130105253.12497-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: raspberrypi: Fix bug in IPA frame drop logic 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Fix a bug in the IPA frame dropping (for rate control) logic, where the metadata for the current context was copied from itself (i.e. a no-op), instead of being copied from the previous context. This bug does not occur in normal conditions, only when running with a low exposure time and unconstrained framerate, which happens in a particular picamera2 test. Fixes: 546154b13433 ("pipeline: ipa: raspberrypi: Use IPA cookies") Signed-off-by: Naushir Patuck --- src/ipa/raspberrypi/raspberrypi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 0f914f841e54..c0e7540bcd2e 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -1062,7 +1062,7 @@ void IPARPi::prepareISP(const ISPConfig &data) * in helper_->Prepare(). */ RPiController::Metadata &lastMetadata = - rpiMetadata_[ipaContext ? ipaContext : rpiMetadata_.size()]; + rpiMetadata_[ipaContext ? ipaContext - 1 : rpiMetadata_.size()]; rpiMetadata.mergeCopy(lastMetadata); processPending_ = false; return;