From patchwork Mon Sep 18 10:50:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 19056 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 20E93BE080 for ; Mon, 18 Sep 2023 10:50:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 76F5D61DEB; Mon, 18 Sep 2023 12:50:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695034232; bh=PFpCMBhK2EP/v+SiPilE3lRmRYm/YfjyKEB5OOwBcMo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=riEbEGFbdhtwhJw/VxTkAAmRS6MxVQNo+wNux8UpF7Ppjb+XOsxPXvmxK4c2BhDCO hy4/0xc5NT5CbEtp3L21amZkjllIu/Eeg3+N8J2TzK6wvsJfQAlBkkniVmxqCjH7Jg mFA7nl2MzIeQwq6MyKUh4L0IT1uc2DZEdl7lITPRJPYovqcHj61nK7pSBvQNcYiEDE VyFK7P+XVljqpHz29cTC3CAczz8GzedTb8NabNiEPYBGAi76uoLSO1hcfKyY+nx6y5 UjVUdD/FFQZi3JuounxJyY82sdgUxytd+mgCiMocEr8PaIpOxnxa7Tf4EEoogw9PzK OiNJNgZI33ITA== Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E2FA61DE9 for ; Mon, 18 Sep 2023 12:50:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="YTAw3PgR"; dkim-atps=neutral Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-31c5a2e8501so4096112f8f.0 for ; Mon, 18 Sep 2023 03:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1695034230; x=1695639030; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hKpmTxst+Pr3sSjvDOAUQ+RDAqgWLJhD/41fnB+RbXU=; b=YTAw3PgRk4uigy3rygqK9J9V0qhRbbuW6ihqqkxPdqgJ4KmY2neEcqxeqRf7Rua2uS 8R8YW3w9c2OILIpjtT4UVVfDhtvCfqoEvA7hr09KIJ3xk42GPYCYYtBZpXSLNeNDNDzh f7397lR954LBJDvpxinrRRdWVnDR1C0ySWq3zedy2PZxB1kKOebIrHZnUGiThe6qYWLl cX5SCCSh9XQU7kLjAvJUr6gF2Jm2appEV5I2HoNdHBpsQ9akfpOQGESK+haHG0n0tk2E Rv5Mb9Bb+f9izFIFxYpay8z5cUimJSBiO1aDBF8g8H4hhntB1Wn6ZePwyczjoJnYsZon hE1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695034230; x=1695639030; 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=hKpmTxst+Pr3sSjvDOAUQ+RDAqgWLJhD/41fnB+RbXU=; b=XbS6LxVVW/9JiPaPS88NTzfNrgAAld+hWosYBUwzQip2EI2EZKI32opTqo0yV+YX5j o5lIFjDNDriR6A0umnNXICUnB+QnfTKGldZC69GAinYhBEsLDD9wZODykrTYSsk/Li/q +8sEUbx+fSdNrFmw2d4PafJv20epRu6L8ChV3zOZjsZ7exgwqVGq3hjhXo3fyOFTWhoj CTI22Z0mwHjd3ITsOBEMhCL2m9WO0UTMyQBfgJtt2qL8a9lB0Zhm9mc5VAmmyXkyYqBm xzz0sYnqRD52iP9gKJA/C1/lrkVr7rxEi2ZbYDabCHocK7WoFMv8QUhutYm9DqoQeT/W 2xSg== X-Gm-Message-State: AOJu0YzfrGL6WTYaxM9WBPJGAyQ1dz6qBNCBTy27h5TQHvjFPa1cXJEA Wah+suWXD2Cq+qQv1B+Z+FLjWA6DtY8RFzBrwOY= X-Google-Smtp-Source: AGHT+IEhZuhihgdJAh5xz9TBpAnL86+bD6cKWzlRJw6IjTu+C5zcJjXtgoyQDMraGSQDJPl2/83cRg== X-Received: by 2002:a5d:480d:0:b0:317:c9ad:e96c with SMTP id l13-20020a5d480d000000b00317c9ade96cmr8257833wrq.15.1695034230475; Mon, 18 Sep 2023 03:50:30 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id o12-20020adfeacc000000b003176c6e87b1sm3415249wrn.81.2023.09.18.03.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 03:50:29 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 18 Sep 2023 11:50:25 +0100 Message-Id: <20230918105027.4170-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 everyone Here's version 3 of this set, with some tidy-ups suggested by Jacopo, so thanks for those! In my earlier replies I had suggested changing the way we refer to AGC channels, using names rather than numbers. However, much of that work would go into the previous "AGC multi-channel" patch set, which I see has now been merged! So I propose dealing with all that later, and merging this patch set before we make any of those changes. Hope that's OK? 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 | 25 ++ src/ipa/rpi/controller/hdr_status.h | 19 + src/ipa/rpi/controller/meson.build | 1 + src/ipa/rpi/controller/rpi/hdr.cpp | 132 +++++++ src/ipa/rpi/controller/rpi/hdr.h | 44 +++ 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, 2794 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