From patchwork Fri May 27 19:17:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 16102 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 9AB2CBD160 for ; Fri, 27 May 2022 19:17:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C937F633A6; Fri, 27 May 2022 21:17:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653679065; bh=8E4pss540wNMmAiKu7PZg1NvKig4p8zA4l2siO1Kncw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Z0l0W0/xYgtvNZ8GYbRbQ9XyFyYmChl2nakWYBbKrDvKtWQ/s5/LquaKT+TeO/E9U 1lpslar7YMK7DjPhE6Wk6rbr77Wc1WesJT1PrfXNFX9w1KnJVgZ0Dt0QuAMn5N1sPS S8NX9fV/G1PPF5GE7ppW+OdOe9PsA56MzPM4R2DVwspu9Qr2Z0y6ARti1yLSBYGqbb a963/qorGFG4R9kKzIO8o7nPkSm7dj0bqjN3WNlVavmP1VECxzxJlEuyLHzBk29Aus Dn1xWqb4yT9+EEE247rOjXV+pU0RoYQFpuki59colGVC6Gb/x0SiiWJcEay21frt5g sjKSJzNYSKBaw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CBAC0633A2 for ; Fri, 27 May 2022 21:17:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Pcy1VoFz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [90.164.63.43]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F82A32A; Fri, 27 May 2022 21:17:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653679064; bh=8E4pss540wNMmAiKu7PZg1NvKig4p8zA4l2siO1Kncw=; h=From:To:Cc:Subject:Date:From; b=Pcy1VoFzrI8/FD6Ts2nKYis5xdmdfy/KC7aM1mhQ/EOJJe0m8alW/7zJpITjvFjjD YUNWZxB4DqzBOmvPe58oa0GdVlzKNgQHho+JJeo+0HqV/+ZuBBqwrBUReVmtcJIWRL Rk1HY1iojQASsR9f9p2OS9hxy0c2JUaQ7DISGDiI= To: libcamera-devel@lists.libcamera.org Date: Fri, 27 May 2022 21:17:37 +0200 Message-Id: <20220527191740.242300-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v2 0/3] Move frame contexts queue to a separate 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: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch series moves the frame contexts ring buffer to a separate class. Minimialistic implementation in 1/3 to keep things run same. Patch 2/3 extends the .get() function to handle cases as : - Return same IPAFrameContext if previously created - Assign a new IPAFrameContext if the frame contexts for frame didn't exists - Bound checking and overflow checks Patch 3/3 removes IPAFrameContext pointer requirement from Algorithm::process() and use a frame number instead. This is how the design I inferred from our previous discussions. The documentation is a bit spread out between 1/3 and 2/3. This still needs some fixing from my side (feel free to ignore for now). Smoke tested briefly by running on nautilus. Umang Jain (3): ipa: ipu3: Separate out frame context queue as a distinct class ipa: ipu3: ipa_context: Extend FCQueue::get() ipa: algorithm: process() should take in frame number instead of context src/ipa/ipu3/algorithms/af.cpp | 2 +- src/ipa/ipu3/algorithms/af.h | 2 +- src/ipa/ipu3/algorithms/agc.cpp | 13 +-- src/ipa/ipu3/algorithms/agc.h | 4 +- src/ipa/ipu3/algorithms/algorithm.h | 4 +- src/ipa/ipu3/algorithms/awb.cpp | 2 +- src/ipa/ipu3/algorithms/awb.h | 2 +- src/ipa/ipu3/algorithms/tone_mapping.cpp | 2 +- src/ipa/ipu3/algorithms/tone_mapping.h | 2 +- src/ipa/ipu3/ipa_context.cpp | 118 ++++++++++++++++++++++- src/ipa/ipu3/ipa_context.h | 16 ++- src/ipa/ipu3/ipu3.cpp | 12 ++- src/ipa/libipa/algorithm.cpp | 2 +- src/ipa/libipa/algorithm.h | 6 +- src/ipa/rkisp1/algorithms/agc.cpp | 3 +- src/ipa/rkisp1/algorithms/agc.h | 2 +- src/ipa/rkisp1/algorithms/algorithm.h | 5 +- src/ipa/rkisp1/algorithms/awb.cpp | 2 +- src/ipa/rkisp1/algorithms/awb.h | 2 +- src/ipa/rkisp1/rkisp1.cpp | 2 +- 20 files changed, 166 insertions(+), 37 deletions(-)