From patchwork Tue Feb 16 10:31:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11306 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 7D345BD160 for ; Tue, 16 Feb 2021 10:32:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 033AC637D8; Tue, 16 Feb 2021 11:32:12 +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="HilIMy3Q"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E984A637C9 for ; Tue, 16 Feb 2021 11:32:10 +0100 (CET) Received: by mail-wm1-x335.google.com with SMTP id o24so13903009wmh.5 for ; Tue, 16 Feb 2021 02:32: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=UQ0zZxcyQUF2nOLX7OdyYnyGZBe/kvVGdP4dFGz0/Bo=; b=HilIMy3Q0Ws3ICGJtTXu89Die7Zx+061b8+UvyRrKpwTXPFwaHRMpRO8j9Z0n6u+0F 48Tro77Ti1asXZ/A1BMP8TpP0Zn2f2mznwQUfwHW2OhPw/WdYcOsWufzyD789slYYkhq xSEuW2pAWRcNIfUOipSORZYDzcrYoejS0vRALXU1UMCLxMtmjwJUh4ljIVYidkgqJXv3 LoUo0Vw+NLY41b9pz0zzEAUQ6ZfdKC912LDqATcz/eEy/BiIhl+dM9M+ez+AUL4BRUZr ZIFZI0Tq/Qj4n+Lt79oz2x5M2tCM6G+9CSGz/GkcmknBs9H4LlgxmrYSmvPZQnASES8m beeA== 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=UQ0zZxcyQUF2nOLX7OdyYnyGZBe/kvVGdP4dFGz0/Bo=; b=RUQqwFkBTUzyGEOIPU/4OuDz330WJ8yXXkLRzhgHYEpoCZV0U9YAtMsuqoKfJ5S3C1 DTf8JHJ1/cqoP6kNxgCr4iQWVdPoXLk4QulrZTvKXBn65WW7uYYZILR74Qkh334w1ImZ Aa3BIoE/RYbqgASHoBu1cJMTGrECyokvEntYFrxSS0KCa6srfo5JKktUyrNqCiFB3fKw fPIm+WY2AkDRd2iGY7j3FAEab3fTYg6wgRujdGFQE0BhGDZLZyq7b4PpamWVedO3c0vz kaLK4NMxLuaThzOcO3QKXiB9QDXXaWMMPdPkQNU7K33M1ityEzsQdR3ehl9Hz8+/MGeI XwRg== X-Gm-Message-State: AOAM530pnwjPfpN5a8pM1zkfNBkgEvVdLfHC7SxP68W6Zrl+TffBl2ts yx3Los2EMsQcnSopcsyi80Knz5n7QjZXtASU X-Google-Smtp-Source: ABdhPJx2F6JQZdP4IXRVsqRPY59y7i4YBkmEmm1mj3b4KlF2BMJNektY1o1jjEKnG6wOImClPAr9Zg== X-Received: by 2002:a05:600c:19cf:: with SMTP id u15mr2702096wmq.41.1613471530343; Tue, 16 Feb 2021 02:32:10 -0800 (PST) Received: from naush-laptop.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id a186sm3018054wme.17.2021.02.16.02.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 02:32:09 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Feb 2021 10:31:36 +0000 Message-Id: <20210216103140.1077307-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] Raspberry Pi: Embedded data usage 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" Hi, This series of patches addresses the wasteful usage of embedded data streams on sensors that do not supply embedded data. We switch to using control lists to pass exposure and gain values from DelayedCtrls into the IPA in these cases. The breakdown of patches is as follows: Patch 1/4 Stores the DelayedCtrls::get() provided control list with the bayer framebuffer in a queue, and pass this control list to the IPA on a RPi::IPA_EVENT_SIGNAL_ISP_PREPARE event. If there is no embedded data, the IPA will simply pull the exposure and gain values from this control list. Patch 2/4 Remove the MdParserRPi object, it is not used anymore with the above change. Patch 3/4 This change selectively turns on the Unicam embedded data node on sensors that support embedded data. Patch 4/4 With the IPA now able to use control lists to extract exposure and gain values, we add a flag in the pipeline handler to relax the strict bayer <-> embedded data buffer matching routine. If this flag is set, and no match is found, the ipa reverts to the control list values. This avoids a few possible frame drops on heavily loaded systems. Regards, Naush Naushir Patuck (4): pipeline: ipa: raspberrypi: Pass exposure/gain values to IPA though controls ipa: raspberrypi: Remove MdParserRPi pipeline: raspberrypi: Only enabled embedded stream when available pipeline: raspberrypi: Allow either strict or non-strict buffer matching src/ipa/raspberrypi/cam_helper.cpp | 9 +- src/ipa/raspberrypi/cam_helper_imx219.cpp | 4 +- src/ipa/raspberrypi/cam_helper_ov5647.cpp | 3 +- src/ipa/raspberrypi/md_parser_rpi.cpp | 37 ---- src/ipa/raspberrypi/md_parser_rpi.hpp | 32 --- src/ipa/raspberrypi/meson.build | 1 - src/ipa/raspberrypi/raspberrypi.cpp | 142 ++++++++----- .../pipeline/raspberrypi/raspberrypi.cpp | 194 +++++++++++------- 8 files changed, 211 insertions(+), 211 deletions(-) delete mode 100644 src/ipa/raspberrypi/md_parser_rpi.cpp delete mode 100644 src/ipa/raspberrypi/md_parser_rpi.hpp Tested-by: David Plowman Tested-by: David Plowman