From patchwork Mon Jul 31 13:48:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 18915 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 93BBCBDCBF for ; Mon, 31 Jul 2023 13:48:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 98877627EB; Mon, 31 Jul 2023 15:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1690811320; bh=Inb2OBpDiVpGjR03RD5GZPfpPM+1IWEQ5PVshUU6RHU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=yNOZhJfgVVbuhA04uCuMVzCTaYMEoeV1KQkTFDKF6XxTb68LjFsI5Khhlpt6gkmPe z68V2U32anI4fll13xzGvCO6xLhwGbUM3JPmPS+kNhsSuVPKKpHk+xsFfOK4HDfQlw bIe+n3rqnWz6nVSY8bp7t9TGQLcPvnwpWQA4J4TlXaZjfbK7v9kpCjvt7E1s4znyem inYVEJaNK0d0XNJ4YRQ6qsDsCWllKTZhxxP2jxRfbxDqMIIPhr2SIwPsBpiw/h/kym 1ZcpjIsCTymEiHrc0iruQqaJ5xx0mCs/nLxBO2yb3YwsRLb7E/QWV26zjXDNE2D5R0 LmmEkHMU0pKuQ== Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 799C86037D for ; Mon, 31 Jul 2023 15:48:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="aFz+pEjn"; dkim-atps=neutral Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fbc5d5742bso50479175e9.2 for ; Mon, 31 Jul 2023 06:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1690811318; x=1691416118; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=K/ZukvFeTIluXR2og7KqvAD7XTbd9g+m1bVuQv9w4iM=; b=aFz+pEjnIlEGu7EBSn+O8LEdLfPVME8SNkokp7vXA0jVJV3kSGr0ljfP7vw2m/02XB tKEBkatx/0JFSEgwR3FKGe5cw/BFDu8v0xpT8kDs+14p1nUrVf/G73JuNujzsmM7iuwU exZODwi5h/0oZLwAc0Q3na1RG1gnTkYfXSIUhnssPxUVyqNYcBI3Z/+g1/xoMQ4EayoW KhNxtB2Qol/I+J6uQwEy8B0XkvBNao3s+4VrdDhpKsT8Js9ZXMTUWGsUxyxMKNq/vm6m PFoT8HjrBaX09AvI2pkN6kEU/JkDbutiCsxe9WAsUmW1ZGIAmCSUzx65yHEen6YsO3T+ 0X3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690811318; x=1691416118; 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=K/ZukvFeTIluXR2og7KqvAD7XTbd9g+m1bVuQv9w4iM=; b=P4f9NedkVXQEWngPGgHi01HteveZCJSjPBSvQViTdFmEHzgxRtO+fu/A39clQoujaY VFlDa7+NKl/4wJzQaXB0N7vP/IGWZIHQahCNDIqLhFNswJPS9DhXCa1uP/rH/YSewLai kA2EsVvbzNVLDtBxGyEJIamR3LhiA3cszNER1Ed1vZc311jiw0lQN48xeWDY+WQGESid WbU79SNusB9sUIq5YBL2+zwonmT8cKZ8QwTGbDeIqFCTulHV1CI20L1PbaoeT4egDJCK oo26Rl75eBxKxJlkPy41TcCpedknqAUBk+Ry/yymdMsVorFNMosQOCij9vUy+LwOv97x h3PQ== X-Gm-Message-State: ABy/qLb9tyJahyPueaKhUi8m3Hfn+MKX3vquBu+ZGbXsoFh1QM4fNwZ8 UhDcV92/e4L9jXF1YbbxtJja66GsnniyzV07YdQ= X-Google-Smtp-Source: APBJJlG0MuoFXdHUscsMk7Y9Ldq9VGa5d2q51PtMAPQUxyA7MIBeqxWVOyoMhDk55P9BpWPVQKzZTQ== X-Received: by 2002:a05:600c:214d:b0:3fe:1446:6047 with SMTP id v13-20020a05600c214d00b003fe14466047mr5884wml.23.1690811317612; Mon, 31 Jul 2023 06:48:37 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:2bce:64d6:1a5c:49a2]) by smtp.gmail.com with ESMTPSA id t20-20020a7bc3d4000000b003fe146fae45sm7046097wmj.46.2023.07.31.06.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 06:48:37 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 31 Jul 2023 14:48:31 +0100 Message-Id: <20230731134833.79687-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 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 This is the final patch set in this slightly long HDR journey. THe HDR algorithm here doesn't combine images to create HDR images (there's no hardware for that), but it does allow the AGC to be driven in such a way as to produce, for example, long and short exposure images. The second commit updates all the Raspeberry Pi camera tuning files. A fairly simple change is made identically to all of them. 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 | 129 +++++++ src/ipa/rpi/controller/rpi/hdr.h | 42 +++ src/ipa/rpi/vc4/data/imx219.json | 388 +++++++++++++++----- src/ipa/rpi/vc4/data/imx219_noir.json | 388 +++++++++++++++----- src/ipa/rpi/vc4/data/imx477.json | 386 +++++++++++++++----- src/ipa/rpi/vc4/data/imx477_noir.json | 388 +++++++++++++++----- src/ipa/rpi/vc4/data/imx708.json | 350 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_noir.json | 350 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_wide.json | 350 +++++++++++++----- src/ipa/rpi/vc4/data/imx708_wide_noir.json | 350 +++++++++++++----- src/ipa/rpi/vc4/data/ov5647.json | 392 ++++++++++++++++----- 15 files changed, 2832 insertions(+), 779 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