From patchwork Mon Jan 25 18:48:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 10990 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 1EEA6BD808 for ; Mon, 25 Jan 2021 18:49:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B044F682E6; Mon, 25 Jan 2021 19:49:07 +0100 (CET) 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="dHKi1DuI"; dkim-atps=neutral Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1008F682D1 for ; Mon, 25 Jan 2021 19:49:05 +0100 (CET) Received: by mail-ed1-x531.google.com with SMTP id s11so16759020edd.5 for ; Mon, 25 Jan 2021 10:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zi4fSpeVN5lxiGy5u0yXSb9pUfzZ83CfLgRG/iSQNTU=; b=dHKi1DuIBRDHVRouKDMOmY5XVBMTEscdAabJBB2BnQla0u6zX4Y4elDe1h38Dirl4a wxDBY2CqG8O7jZDlsrVSAq0oX2RZivL56fulqyOsVPSviezKRtEtS5LSzUlk+3e7EYT1 yqD2wnde3Bh2mbkt2dehlPYMraz8rmZTkffl+vhS3yUWh/7lbU9SVxGPOLR7bFLQd+bL gX+TrOE1oKUAfHe6Efj9VqVVOm0rfo94bkHmIla+0zXGb8/sqdBeHQKb/+HHWMVQyy8T 3Z8+d02TzER6DzLv75Scr95H14bmGRLlzqgFxBtYoI8bnfOBeFQ6bfQAWBpH57VowPPM MqHw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zi4fSpeVN5lxiGy5u0yXSb9pUfzZ83CfLgRG/iSQNTU=; b=dFgRiBRQTQXr9oPE4b0aSFdIx4gf2clUY3w+IPIdE1wZSkMekT6L5M6XeP9M9kiUhh g7JdBNWLuVfv+enKyg/iShgbWDq6h2CnE9DVDazWoOmMQqPw+mYcjqbupYFuNUjqLEu4 E9Pa4c4+W8D+RNiMlLx0EEipfwDlui+aGnDCePNi2gJVugLQZTFJMoJZcDbuK7eb3oFH ih05es8ubnO3FCw7gPUXLLKXHzNsFUH0uronWD0X403xxsfFqwlsqp14nUaKU5O8DwkC qgAS1aPVcrZDKMfhtGfR7RLo+xsmSZXznf08AKveziPkyUTDQf/y31PpaXm4omCfbOYx njfA== X-Gm-Message-State: AOAM531d16ANWFfodiAf+UltuWSIJkApFY6YUNkmBs1/UEA+xoKXAgGJ n8b+n+p5neHzDq/4p4XXxkeGjL4F/B7ug3+A X-Google-Smtp-Source: ABdhPJy9d02edsGAYsEv1JGszK34o8w7rK0qykDdRv85E4+hOLoteJjeEGH2nUR2iPRS9RQeVdn3fA== X-Received: by 2002:a50:b742:: with SMTP id g60mr1602165ede.113.1611600544425; Mon, 25 Jan 2021 10:49:04 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id y59sm11601836ede.59.2021.01.25.10.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 10:49:03 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 25 Jan 2021 18:48:54 +0000 Message-Id: <20210125184858.16339-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210125184858.16339-1-david.plowman@raspberrypi.com> References: <20210125184858.16339-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/5] ipa: raspberrypi: controller: Replace Raspberry Pi debug with libcamera debug 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" Some unhelpful debug statements have been removed. Signed-off-by: David Plowman Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/controller.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/ipa/raspberrypi/controller/controller.cpp b/src/ipa/raspberrypi/controller/controller.cpp index 22461cc4..96b58359 100644 --- a/src/ipa/raspberrypi/controller/controller.cpp +++ b/src/ipa/raspberrypi/controller/controller.cpp @@ -5,6 +5,8 @@ * controller.cpp - ISP controller */ +#include "libcamera/internal/log.h" + #include "algorithm.hpp" #include "controller.hpp" @@ -12,6 +14,9 @@ #include using namespace RPiController; +using namespace libcamera; + +LOG_DEFINE_CATEGORY(RPiController) Controller::Controller() : switch_mode_called_(false) {} @@ -27,7 +32,6 @@ Controller::~Controller() {} void Controller::Read(char const *filename) { - RPI_LOG("Controller starting"); boost::property_tree::ptree root; boost::property_tree::read_json(filename, root); for (auto const &key_and_value : root) { @@ -36,10 +40,9 @@ void Controller::Read(char const *filename) algo->Read(key_and_value.second); algorithms_.push_back(AlgorithmPtr(algo)); } else - RPI_LOG("WARNING: No algorithm found for \"" - << key_and_value.first << "\""); + LOG(RPiController, Warning) + << "No algorithm found for \"" << key_and_value.first << "\""; } - RPI_LOG("Controller finished"); } Algorithm *Controller::CreateAlgorithm(char const *name) @@ -50,39 +53,31 @@ Algorithm *Controller::CreateAlgorithm(char const *name) void Controller::Initialise() { - RPI_LOG("Controller starting"); for (auto &algo : algorithms_) algo->Initialise(); - RPI_LOG("Controller finished"); } void Controller::SwitchMode(CameraMode const &camera_mode, Metadata *metadata) { - RPI_LOG("Controller starting"); for (auto &algo : algorithms_) algo->SwitchMode(camera_mode, metadata); switch_mode_called_ = true; - RPI_LOG("Controller finished"); } void Controller::Prepare(Metadata *image_metadata) { - RPI_LOG("Controller::Prepare starting"); assert(switch_mode_called_); for (auto &algo : algorithms_) if (!algo->IsPaused()) algo->Prepare(image_metadata); - RPI_LOG("Controller::Prepare finished"); } void Controller::Process(StatisticsPtr stats, Metadata *image_metadata) { - RPI_LOG("Controller::Process starting"); assert(switch_mode_called_); for (auto &algo : algorithms_) if (!algo->IsPaused()) algo->Process(stats, image_metadata); - RPI_LOG("Controller::Process finished"); } Metadata &Controller::GetGlobalMetadata()