From patchwork Mon Oct 4 09:48:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 14036 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 43574C3243 for ; Mon, 4 Oct 2021 09:48:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A5197691B7; Mon, 4 Oct 2021 11:48:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1633340911; bh=YAPcpHEs9axA1wGLg7JkxYQJQe+zRcbpHTDeRdjDf44=; h=Date:To:List-Id:List-Post:From:List-Subscribe:List-Unsubscribe: List-Archive:Reply-To:List-Help:Subject:From; b=YocjoFGzrTasPlil5OWssfIKu6FXz6oDhQVdq04S58OU9KSYf/D8Sq5fG2xMOIbgN JS+3gfSkvdhyhXXchpaLn2CdRzEsGzZfw9z4wbTELBIivreqZlT1dvceRxHu9YpcXR ywVqf8ldvAWj5LDJQ548ooHBvbUoDDCnEteDH2b3BoLs/WoZPVgsygOxLoNZhz87Rx cgKIIZ2bg+7x/IOrVZhdN8A9O3CK3Ycq+E58R6wOJ2asMeECDIOsL2GP6fKrntimaq IQ7YDfdNI1TyIaYuiomeHAWYS/Ixjp0MQ2QYp7IWklGitq1WXNF8VWSYx2MlRZBJfi DpGdzUN4Hsn4w== Date: Mon, 4 Oct 2021 17:48:20 +0800 To: libcamera-devel@lists.libcamera.org MIME-Version: 1.0 Message-ID: List-Id: List-Post: X-Patchwork-Original-From: Han-Lin Chen via libcamera-devel From: Nicolas Dufresne via libcamera-devel Precedence: list X-Mailman-Version: 2.1.29 X-BeenThere: libcamera-devel@lists.libcamera.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Han-Lin Chen List-Help: Subject: [libcamera-devel] [PATCH 0/3] Fix dark caputred image with close sourced IPU3 IPA Content-Disposition: inline Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: hanlinchen Hi everyone, We have a issue that the captured image is extremely dark with the close sourced IPU3 IPA on soraka. The problem is due to that the codes from Chrome OS not handling memories correctly. In result, the statistic as input to AIQ is cleared early and the calculated exposure is wrong. A similiar issue prevent it to apply lens shading correction too, which causes crash due to invalid contents of SA results. The patch series fixes the issue by: 1. Refactor the memory recycles and fix copying overflown. 2. Apply shading lens correction to further brighten the image. hanlinchen (3): ipu3: Remove the usage of SharedItemPool ipu3: Change Macro migrated from Chrome OS to its std version accordingly ipu3: Apply shading adapter as part of AIQ::run2a() aiq/aiq.cpp | 20 ++++- aiq/aiq.h | 4 +- aiq/aiq_input_parameters.cpp | 50 +++++------- aiq/aiq_results.cpp | 91 +++++++++------------- ipu3.cpp | 2 +- stats/ipa_ipu3_stats.cpp | 145 ++++++----------------------------- stats/ipa_ipu3_stats.h | 41 ++++++---- stats/meson.build | 1 - stats/shared_item_pool.cpp | 129 ------------------------------- stats/shared_item_pool.h | 114 --------------------------- 10 files changed, 127 insertions(+), 470 deletions(-) delete mode 100644 stats/shared_item_pool.cpp delete mode 100644 stats/shared_item_pool.h