From patchwork Wed May 18 13:10:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15946 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 AC43BC3256 for ; Wed, 18 May 2022 13:10:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A6A5E6565A; Wed, 18 May 2022 15:10:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1652879440; bh=CQYFUjptGZX/C9zWHomovi8jbsjD4Fs4MW+F34wJSrE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=UxVhgOS2bUv3vZQie6xTW3ndrivKwK4HGdM3iiAILXILQ7q5jdLKm2oYg45NcVVC8 o3e9AVjci44L6RaZGMcXTYqZIIQrMtt0Se7r107qPdr8ReTcsiMiJ3BGtCrIsJSNJN lf6MmQj+X71Vx2Gwl5nPbwL2jqPm/qD9JRaKmax5ZfaqQTZIOUFFmDYNOX6hzuNBN5 ECTAsDrREAjODrI8lS0D/7jOM9ywX57qeocNBy4AL86NRGzsXdo/BquZHt6dwF6POj WBjd691HFB8Ygbv0bXcmYA3cDtH6M1H0ra4TDfluDDkb2iaYkgW+sVEhf88g724Uru ctcG6Pe6i16rg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6655165656 for ; Wed, 18 May 2022 15:10:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SO9lEKA3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [45.131.31.124]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C3C93E50; Wed, 18 May 2022 15:10:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1652879438; bh=CQYFUjptGZX/C9zWHomovi8jbsjD4Fs4MW+F34wJSrE=; h=From:To:Cc:Subject:Date:From; b=SO9lEKA3FcFv9w6Wa+OBtFnxO7BbQYFO5eA3nNOn5fl9pv8Ph8DctZrfbMjeCw/gN hyXxIu70pdRa4uB5EETSxl0CV1suagbw5/Wr1Xweb7AsgkZUyR/JAAZQA351d3s+BO /TD1jDKMohLvpw2+R54+YHWP3l9YLd4MQBocN+aM= To: libcamera-devel@lists.libcamera.org Date: Wed, 18 May 2022 15:10:27 +0200 Message-Id: <20220518131030.421225-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/3] 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" Changes in v4: - Largely documentation fixes - Introduce a warning log if the frame number doesn't patches frame context extracted from the ring buffer - Also CTS-passed. Changes in v3: - IMP: Moving away from queue to a Ring Buffer - Patch 1/3 is largely unchanged - Patch 2/3 is a advance preparatory patch for 3/3. Since we'll have a ring-buffer i.e. multiple IPAFrameContexts - Algorithm::process() will need to know which IPAFrameContext to use for processing. - In 3/3, we now use a Ring buffer instead of a queue for frame-contexts. Also extend the IPAFrameContext structure to contain a ControlList (copying incoming request controls). Changes in v2: - Majorly change the interpretation of Frame context Currently, everything is stored in a single struct i.e. IPAFrameContext. It reflects the current state of the algorithms and also stores values required to prepare frame metadata. Split these two things in separate containters IPAActiveState and IPAFrameContext. - The above design helps to rid of prevFrameContext and nextFrameContext concepts as they can get error=prone easily. - Have a queue of IPAFrameContexts which is holding members per-frame related /only/. All algorithm current (or active) state values go in IPAActiveState which is independently updated by the algorithms. Umang Jain (3): ipa: ipu3: Rework IPAFrameContext ipa: libipa: Add frame context pointer in process() ipa: ipu3: Put IPAFrameContext(s) in a ring buffer src/ipa/ipu3/algorithms/af.cpp | 46 +++++----- src/ipa/ipu3/algorithms/af.h | 3 +- src/ipa/ipu3/algorithms/agc.cpp | 36 ++++---- src/ipa/ipu3/algorithms/agc.h | 9 +- src/ipa/ipu3/algorithms/algorithm.h | 4 +- src/ipa/ipu3/algorithms/awb.cpp | 19 ++-- src/ipa/ipu3/algorithms/awb.h | 3 +- src/ipa/ipu3/algorithms/tone_mapping.cpp | 13 +-- src/ipa/ipu3/algorithms/tone_mapping.h | 3 +- src/ipa/ipu3/ipa_context.cpp | 110 ++++++++++++++--------- src/ipa/ipu3/ipa_context.h | 28 ++++-- src/ipa/ipu3/ipu3.cpp | 35 +++++--- src/ipa/libipa/algorithm.cpp | 1 + src/ipa/libipa/algorithm.h | 4 +- src/ipa/rkisp1/algorithms/agc.cpp | 4 +- src/ipa/rkisp1/algorithms/agc.h | 3 +- src/ipa/rkisp1/algorithms/algorithm.h | 4 +- src/ipa/rkisp1/algorithms/awb.cpp | 4 +- src/ipa/rkisp1/algorithms/awb.h | 3 +- src/ipa/rkisp1/rkisp1.cpp | 2 +- 20 files changed, 205 insertions(+), 129 deletions(-)