From patchwork Wed Aug 23 14:49:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18956 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 C1E46BE080 for ; Wed, 23 Aug 2023 14:49:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 96DB7627E2; Wed, 23 Aug 2023 16:49:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1692802171; bh=+sWxROt88oI7hc0V1gsiCt0AgkzVKXc5YyBdJyWNgvU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xrSj7K5A7sRjKpNJNUZrMCak26a95poXYEa7qOCYzKlhju/ihnXDncajDBQTHk01L XjUV4kIwpsNiVkU4ksNY1RBLO3AerSSxc4C/KtyUCCsqKrinmGtE9/nfP1IVjd6XK/ FzUgjJdWpI5eaS6jqIXLB1th03OasXvVK+vS/dtLWrSnJbocibm6upCeMZwtlrdFIR YbM7d2q5PsagrUomAY5O8jGiWhhl4GmKN58bc8J+yqu+8yrxJACdww73WPEkRf6ZGG whVnCgbjeOPDCVp9f3q3C/3e0JZ+QZyq+xaREAsW11LXxsEFGYBCDlB1mPUYdAkSlH 0wqJ87NPLjhQg== Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7346960379 for ; Wed, 23 Aug 2023 16:49:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="sAMEH4C5"; dkim-atps=neutral Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bcbfb3705dso48627251fa.1 for ; Wed, 23 Aug 2023 07:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1692802168; x=1693406968; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l11BUTeOXIry8FvhHH/qLhaYXAIfSlMzSF7pXfoxX7M=; b=sAMEH4C5Y9wXs7vws285ZUkVX2Cta2R8ovLvPkByJjwuwB1hoN8R2S9Xh+a7UtleTY 4ewZTxSvommXzYiRW0gkrUa85awu0ckp2chBlRTPGPHT8hjrFE4F+iLIG8DSiUHxO63w Vn4x1qAIP2RiDkrs4qN+QjAFr2MFjhu2djbnjSQmiurjvn2XZYNXur+7kE7ozqvUaDtB BXjOwLb9sKXp+2r8FxTFahqzDe9AP9YaVGdqiHePmMoyhBbJsEnLhc/4GEPTOwxF0tmS xBahq4Ctx3LsCEss9U1OmWSVRKd4Mw3w501vj5Dd2UVfCN0ygS+/JBT11WHki0V7H2hN wBGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692802168; x=1693406968; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l11BUTeOXIry8FvhHH/qLhaYXAIfSlMzSF7pXfoxX7M=; b=NJB1oGgsVUalqR29Upw1JBqEUm8k0+Yxh079fz/qKeQRTLiArrGaziyKgLvFZ+oW2C GySY/sQ2R1k+fn7YnUFvlDYISN3OSIHmZ952I1VHd/32FrBFFKMbLnNstnbp/ePivRDh 59NEeIBPrsdJabOMKjYVnXoAiHGE+YnivdKih+MtwsY6cDbGFRMN7XGfEHilqW4vhrmD 2wEQ1lZ3Tlvdjt3CphpWUd1nbnyVLkeFTODWjMSVYZK+3/f8z3kyDwonH6VUXTUAN0JT bP/KMoW+0NrTy3RzJ1WQV8RQSu7bhKeQsLgpWklkny8GOEd7sxX8j0g4pMYoPvPv0jVk DOoA== X-Gm-Message-State: AOJu0YygXR/vcV4xza5nlCK7NNHME2y6hfInRiKibtW6CVc3NX8NJ4Pb aH0x+yjclxdkIjGpN3/m21qDH4H0EEDC6e5+2jg= X-Google-Smtp-Source: AGHT+IGdeYtvM1txAyuaMyKDCvEnDOpcTwjoKNBQ5tOKnILU5gv8TGbI03XLZy3aZ2L0jowXLm8gyQ== X-Received: by 2002:a2e:88cf:0:b0:2bc:e330:660b with SMTP id a15-20020a2e88cf000000b002bce330660bmr59663ljk.9.1692802168139; Wed, 23 Aug 2023 07:49:28 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b003feef9a6cb2sm10983535wmi.28.2023.08.23.07.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 07:49:27 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Aug 2023 15:49:23 +0100 Message-Id: <20230823144925.2542-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/2] HDR for Raspberry Pi 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi Just some small changes in line with what Naush suggested. The main difference is that the "HDR off" mode is created when the algorithm is loaded, so tuning files no longer have to. I've left it so that a tuning file can amend the "off" mode if it wants. Not really sure if this is good, bad or just doesn't much matter. Opinions always welcome! Thanks David David Plowman (2): ipa: rpi: Add an HDR algorithm to drive multi-channel AGC ipa: rpi: vc4: data: Update tuning files for HDR src/ipa/rpi/common/ipa_base.cpp | 49 +++ src/ipa/rpi/controller/hdr_algorithm.h | 23 ++ src/ipa/rpi/controller/hdr_status.h | 25 ++ src/ipa/rpi/controller/meson.build | 1 + src/ipa/rpi/controller/rpi/hdr.cpp | 127 +++++++ src/ipa/rpi/controller/rpi/hdr.h | 42 +++ src/ipa/rpi/vc4/data/imx219.json | 384 +++++++++++++++----- src/ipa/rpi/vc4/data/imx219_noir.json | 384 +++++++++++++++----- src/ipa/rpi/vc4/data/imx477.json | 376 +++++++++++++++----- src/ipa/rpi/vc4/data/imx477_noir.json | 384 +++++++++++++++----- src/ipa/rpi/vc4/data/imx708.json | 346 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_noir.json | 346 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_wide.json | 346 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_wide_noir.json | 346 +++++++++++++----- src/ipa/rpi/vc4/data/ov5647.json | 388 ++++++++++++++++----- 15 files changed, 2791 insertions(+), 776 deletions(-) create mode 100644 src/ipa/rpi/controller/hdr_algorithm.h create mode 100644 src/ipa/rpi/controller/hdr_status.h create mode 100644 src/ipa/rpi/controller/rpi/hdr.cpp create mode 100644 src/ipa/rpi/controller/rpi/hdr.h