From patchwork Mon Jun 28 20:22:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 12735 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 41476C321F for ; Mon, 28 Jun 2021 20:23:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CDD7C684DA; Mon, 28 Jun 2021 22:23:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MQ2maImf"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A8E6E6028C for ; Mon, 28 Jun 2021 22:22:59 +0200 (CEST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:c3ad:78d0:405e:fc33]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 52326E1A; Mon, 28 Jun 2021 22:22:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1624911779; bh=3G+2UnFf2HBoun1Pv9W8JE9jA5qXNdWzsbnEjY0033A=; h=From:To:Cc:Subject:Date:From; b=MQ2maImfmHk76mOxQCArjgI0kVKjpko7f+mY4emrPZxDwxn9Jyipr5VcI5GyEVe6w QYvwYPMUWJjmPthuj5C5//OSKIWK7W3QwqDloyMUKgdI+p4j7M8es0aDMZGGq4gsAS FF/V3Iz+NF1+dvP7N0j+fQyExv3CkiOlgzHI1pp4= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Mon, 28 Jun 2021 22:22:48 +0200 Message-Id: <20210628202255.138874-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/7] ipa: Introduce a new open AGC 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" In order to have better AGC results, use the one implemented in RPi, and adapt it to be able to use it for more platforms. For now, split the main structures into a ISP header. The algorithm is still fully in ipu3_awb and ipu3_agc but those should be splitted in libipa for common algorithm (grey world estimation) and specific parts in the platform methods (the statistics transform between the one from the platform and the common one). The last patch in the series is not small, because it introduces multiple functions to split the process call into multiple small parts. It may be splitted more, but may lose a bit of logic... Jean-Michel Hautbois (7): ipa: libipa: Fixups in CameraSensorHelpers ipa: libipa: Create a common ISP header to store the structure types ipa: ipu3: Use a common IPU3 header for the constants ipa: ipu3: use process method for all algorithms ipa: ipu3: Improve AWB behaviour ipa: ipu3: Call exposure and gain controls from AGC ipa: ipu3: Implement a new AGC algorithm src/ipa/ipu3/ipu3.cpp | 28 +-- src/ipa/ipu3/ipu3_agc.cpp | 304 +++++++++++++++--------- src/ipa/ipu3/ipu3_agc.h | 37 ++- src/ipa/ipu3/ipu3_awb.cpp | 28 ++- src/ipa/ipu3/ipu3_awb.h | 45 +--- src/ipa/ipu3/ipu3_common.h | 49 ++++ src/ipa/libipa/camera_sensor_helper.cpp | 79 +++--- src/ipa/libipa/camera_sensor_helper.h | 32 +-- src/ipa/libipa/isp.h | 110 +++++++++ 9 files changed, 482 insertions(+), 230 deletions(-) create mode 100644 src/ipa/ipu3/ipu3_common.h create mode 100644 src/ipa/libipa/isp.h