From patchwork Mon May 24 08:48:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 12373 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 BB50EC3201 for ; Mon, 24 May 2021 08:48:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BEBE26891F; Mon, 24 May 2021 10:48:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="RoCm0prC"; dkim-atps=neutral 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 37CA3602B1 for ; Mon, 24 May 2021 10:48:29 +0200 (CEST) Received: by mail-wm1-x32a.google.com with SMTP id z130so14489359wmg.2 for ; Mon, 24 May 2021 01:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q9CcGa08xi4D/T+h1L0aiQAqEC0ATqP/ae5DrwSLzGs=; b=RoCm0prCM3UQGF+MEPRwWmqkuAyN1RQuTG3b+Cbg77yiqFzXj7h4+I2hP0dLD7trRR iCanG7WGPyiDUt1o+glz0blIc3q5FHGqrpO0PLKvonFeujLlxs7TK8dCsh30idcEP3YA sJr91MbzDwAV6Lq9M8yQK5HJUAQvwlqu3ypzcLBQLvpQI3ZhGRyoJA+2xZF7gDnQRHoq VJLk+NNSD7ivHyNJyFI+78fIuUTSm7IH9XMfgLgb+42ByDPpdjw6gDvHWG0xQ7pIXSU/ 76Ly+w4fYG0l896brizL6xa43UmKMcD8rpr/VlTxeucG24HNmYBiqw638CBQn+C82c0B xfpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q9CcGa08xi4D/T+h1L0aiQAqEC0ATqP/ae5DrwSLzGs=; b=O19tmXoFP6ZbQS+4jJDhiGqIfBhtCeNuBDNa+HSgm7BB7hm7uNPEkfWnNZwZr87nXF sBEWOiiWUWkxTu8OGugmFdXbfxKS2oEs/4+cvKI3MnkewzoE9SgjLOqGmAyucnDUIvEW 3kCsP0wIYbDMn/00mBaFCV0wFFoz2k7PJwPLT2X31qIjNn8jCrr1HQOVS+NCx5zbHt53 Jzs+qp0Ei7ofqO70fOXLD5RCzsxmcEG1sJgTee0Kn6486xut4PTdpll0hkGUfZUfdx1y sabLwlwCvFfU85P0PEQApqprTYqHL4+0vdoGcUZr5ggVq5/1lulFd0l7Ix5RhP5oFNQA +4UA== X-Gm-Message-State: AOAM532StDaOcgQYGhOSBCzh4AcwjSZT1d5qUdNjN/zBWQ46uw8KAskh f5um//ztBWPsZe0SjSIP0WWwrUahBbaFuw== X-Google-Smtp-Source: ABdhPJy5rendyILJfY3j+RnS70r2hKF1TMutHhTl7zHnWLAFjR9Oqdahp0Sv081Olz6e9WM33wpKKA== X-Received: by 2002:a7b:cc83:: with SMTP id p3mr19051176wma.169.1621846108524; Mon, 24 May 2021 01:48:28 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:4bf6:b415:2edf:916a]) by smtp.gmail.com with ESMTPSA id x10sm11275767wrt.65.2021.05.24.01.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 01:48:27 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 24 May 2021 09:48:18 +0100 Message-Id: <20210524084822.3690690-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/4] Switch RaspberryPi IPA to use std::chrono::duration 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" Hi, Version 4 of this series changes the following: - Move the operator<< out of the utils namespace to avoid needing a using ... directive. - BaseDuration is now hidden out of the utils:: scope. - Fixup documentation based on Jacopo's comments. - Fixup flicker period ratio calculation. We now use an int to avoid fractional values. Regards, Naush Naushir Patuck (4): libcamera: utils: Add helper class for std::chrono::duration ipa: raspberrypi: Switch ipa and cam_helper to use utils::Duration ipa: raspberrypi: Switch AgcAlgorithm API to use utils::Duration ipa: raspberrypi: Switch the AGC/Lux code to use utils::Duration include/libcamera/internal/utils.h | 42 +++++++++ src/ipa/raspberrypi/cam_helper.cpp | 17 ++-- src/ipa/raspberrypi/cam_helper.hpp | 12 ++- .../raspberrypi/controller/agc_algorithm.hpp | 9 +- src/ipa/raspberrypi/controller/agc_status.h | 14 +-- src/ipa/raspberrypi/controller/camera_mode.h | 6 +- .../raspberrypi/controller/device_status.h | 6 +- src/ipa/raspberrypi/controller/rpi/agc.cpp | 86 +++++++++++-------- src/ipa/raspberrypi/controller/rpi/agc.hpp | 34 ++++---- src/ipa/raspberrypi/controller/rpi/lux.cpp | 17 ++-- src/ipa/raspberrypi/controller/rpi/lux.hpp | 4 +- src/ipa/raspberrypi/raspberrypi.cpp | 69 ++++++++------- src/libcamera/utils.cpp | 41 +++++++++ 13 files changed, 238 insertions(+), 119 deletions(-)