From patchwork Fri May 6 09:53:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15807 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 BDF6BC3256 for ; Fri, 6 May 2022 09:53:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 319A461655; Fri, 6 May 2022 11:53:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1651830798; bh=HoZoJdiynUfrbv+QVcNO5eK5/L5r8M+t4cjVuz72RFA=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=t8GOZU4a4AT3q5W1/h45hlL5RP3fXPBjOSUMiaZK9s9KvhD9nD4Hvd7nyQe+aLcuV bO61P8CnXRDpmjxTXOw8PHJ/Nb5H5b94e3MyRSKczHUQZNV3VNPPK0JjhoBFjSn4YO irqBvRizXxm+UJJtJ3kdfwiaLreGfvLSmhPDQPLX5JumA/tb65X62l1pLCo9nILBwz TZONI3dk0wdJCOaDESg//Q/6AbCSRO2KnQcvYohrCHy0iSGSb2uefEGo9H0LVJ4ZIB Qi1DxVBI18Cux2tFqxpQ2K0Z6nWeupQ7JDKZkOXaHWTSlv198k4h2rePN6ZbvfeAU+ bGpuZ2nCBBtGQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 735CA60421 for ; Fri, 6 May 2022 11:53:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RGTyutog"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.251.226.91]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ED0F7487; Fri, 6 May 2022 11:53:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1651830796; bh=HoZoJdiynUfrbv+QVcNO5eK5/L5r8M+t4cjVuz72RFA=; h=From:To:Cc:Subject:Date:From; b=RGTyutog+0V2XB4mOIdp4/noTCumsxo+Eh1x5CoTNyLEzFh6cTl4VOOHh2vsYhkkc lwfGI5vDo1WfxGffZZdTFYSAbd1slsXCmT/n7FHnnY2vg4eWHKo7rWZf7dynSd9XUA 4jRJJjuZxCzlED2TzBGEqO5AAWqGdJItG3WRRD5c= To: libcamera-devel@lists.libcamera.org Date: Fri, 6 May 2022 15:23:04 +0530 Message-Id: <20220506095307.78370-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] ipa: ipu3: IPAFrameContext queue 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 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: Add a frameCompleted() helper ipa: ipu3: Rework IPAFrameContext ipa: ipu3: Introduce a IPAFrameContext queue src/ipa/ipu3/algorithms/af.cpp | 42 +++++----- src/ipa/ipu3/algorithms/agc.cpp | 23 +++--- src/ipa/ipu3/algorithms/agc.h | 2 +- src/ipa/ipu3/algorithms/awb.cpp | 16 ++-- src/ipa/ipu3/algorithms/tone_mapping.cpp | 10 +-- src/ipa/ipu3/ipa_context.cpp | 100 ++++++++++++++--------- src/ipa/ipu3/ipa_context.h | 22 +++-- src/ipa/ipu3/ipu3.cpp | 50 +++++++++--- 8 files changed, 165 insertions(+), 100 deletions(-)