From patchwork Sun Feb 15 09:44:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 26159 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 48992BDE6B for ; Sun, 15 Feb 2026 09:44:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EA172621E6; Sun, 15 Feb 2026 10:44:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="f93nTnTn"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cwAIVRcW"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8BDE3621DC for ; Sun, 15 Feb 2026 10:44:28 +0100 (CET) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61F2rFTI3237632 for ; Sun, 15 Feb 2026 09:44:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=8rB32s2pJWU 9N5Kc7jgkZ7/fW8xBa3EYGq+Nwba8F9A=; b=f93nTnTn6lvYnjWadUHN9VFuMng UWzQusS9s/rgPmyqYqH5ZFDM2lUvwMrQq+jaIHyw2Voqu5vdFA5pzqCZKK8VBu7u b8VG6tYKSBsENA9jgfm7BX1jAH4Vkmw7W7EMSj05oo41i5t5X2Zedm77hGDfC9HP oDb+iHAf5U+7ct9lyzSh562BWydcnHcbt2FMw6as7D8S6WvVj9Rb0lRtNroWdv2w zlhbrjDbTPf+0/5IcYMbn77fEoiFWdT4K5jLOadRLYAlt+MepQ3Blgs0/y/rt2ev kNCVhSZqonUqvxov8K+96eIvZKzM8nZIoHQDo4boEXjCSJVNYXLP84SAMOw== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cajb8syeg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 15 Feb 2026 09:44:26 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8c70d16d5a9so948816185a.3 for ; Sun, 15 Feb 2026 01:44:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1771148665; x=1771753465; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8rB32s2pJWU9N5Kc7jgkZ7/fW8xBa3EYGq+Nwba8F9A=; b=cwAIVRcWypwG9+qIus57NJ1NmMHXMI4dpIuB6KwwH2MAWc+6lWKXtS71E5iiC2SXZh tOHjNqrgzGI7SEAr3dTCU+kRU+zATYnFbuEmX8UQjFEVG5QeRLPJL6oHxKk1vRrwJv1O OWrVKTtIfdxQpVvuBzTsGhO3jYoRWUn8cZ3sFNwXUYgO18fy+cBkCP2MkPWZ6ClXl9ZC VQGlfHgPl07qhhsni9KZ33lga6ZcaB+lPGv0dlShiydWy8tQQjWzDh3PrKAfzumNKaEA lmoS0tSoDT5oaIUzAlmbYBqf/DkwcJMFPyRyYaosSpKI63EfUimuWWszbwjReEUnlf1C S11A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771148665; x=1771753465; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=8rB32s2pJWU9N5Kc7jgkZ7/fW8xBa3EYGq+Nwba8F9A=; b=RmhxVoujoBl+WxVdtHKL9yM8HARNbRmYxLB7DYVzB+Cu+Ik2eu11iMEQQsqGtzE87K 9tfXTqUPpDOKUjgh5CJ7EU67BXuWZSutNeod0Vfz3siYmm4bnyTnwMgQxaDRzWWU+nLR PBGa1DwkftvLfHaPhdD6yE3fawAxls8HgyJn2NmWkze+FgJ9m7WQjh58E/JkWno9Koo4 mjJv95yBv8PALR+oztpKSJqtvtgsdAPSv2mOe2+CZFu/f419+hQu0KCzFBVqsMFSFTb3 acOv/MP+Oj8d+6aD7Qkaae674KKS6FVeRcRfB4Mjz8pVxtbXs/9pQIKdQfDkSzbeGrfG NEgw== X-Gm-Message-State: AOJu0YxlRvLFMjm39jywkykMs18TpPjVa/uz8qDQ9DIuTt/lIfZaie6/ +MCQd66ClS28BzF+tsqV0p1GIn86zH+qGF3PguNot4xtTet0R90KB4G6J0fnbQ33V/StKE57ebb f/rJJoGNIGPfCqp/fFVP9IRYgch4F/a7kwLU+ZLvBJyL4Cz028LYOpD3LN/Ah0EMqbshMYm8Fml KTHBCC7dc5 X-Gm-Gg: AZuq6aJapuHPqZ88aC/8rYSH3stg4n9VIy1Wm21TIbNGRwVwgdF2Vl4JVHAymEPJeAw X8LSsUgPwGmE1d7xMi0S5pTvJPToz09zqgsM09K1OJS4BxwJvHmS6awIKvhXMX2Hc3vu/jjqprG g5iTrSAJxi/x7E4iM7bf8pfJzoo2QmixvtPbFwhKT6P0zcP1ivtDe2Yzy/P/dPorNvXoeyPWohS FY/h37BxicgfiP9OOfoLGtr8b0XMi9otoQmVJK9efuTSAq6b5paSzB71vFpfkFjApEftAjNHOoP 1JWz45BhV6iVAMzEE2a2S0gi5pv5C3Axor6dYmpPsnmgKbKa+YYll9njk7yE4/NIIpYkjrVOx0z fvG0PiIdHM381Jv/EwVJEmD0qjnx88SPIGVCRhBhVRUIJ8KzMtDG7uB7B7hzwxq6reM3BM4g7hx RyKvuWbV5njI3II0grMxblzigLtKSfyYsHc7S1 X-Received: by 2002:a05:620a:4101:b0:8b2:eea5:331b with SMTP id af79cd13be357-8cb4bf96e07mr540564085a.19.1771148665006; Sun, 15 Feb 2026 01:44:25 -0800 (PST) X-Received: by 2002:a05:620a:4101:b0:8b2:eea5:331b with SMTP id af79cd13be357-8cb4bf96e07mr540563185a.19.1771148664551; Sun, 15 Feb 2026 01:44:24 -0800 (PST) Received: from shalem (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-65bad3e390bsm1413658a12.17.2026.02.15.01.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Feb 2026 01:44:23 -0800 (PST) From: Hans de Goede To: libcamera-devel@lists.libcamera.org, Milan Zamazal Cc: Hans de Goede Subject: [PATCH v2 2/2] software_isp: benchmark: Print what is being benchmarked Date: Sun, 15 Feb 2026 10:44:18 +0100 Message-ID: <20260215094418.18642-2-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260215094418.18642-1-johannes.goede@oss.qualcomm.com> References: <20260215094418.18642-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjE1MDA3NiBTYWx0ZWRfX3rrpRx71B9Uj F8oQRfLunN0B479cXPhdFDO3VLmN+LINKh/mgKTJEJAy6sjb3sFgM1I2u+ScTap8Mad148FjonK F7RQpePIT88chnALVcjobEfuWHCoVyqvkwtagMyd4Im5/T5wDXiykuW8gK9O/JJ/Eml7pr3N9or FldXHoifuDuk3F4xT5+tTS0gc0JwTWdCeCuc6VWVzIw75YYJyILCnoEK6TY3BN0r/nxKf53vshP ZTdu4x6osAgREf7cmetSSwUD7RC24H6aaBoI0UlWafUeZWspTGAHJZCDjZBWADIytljw01dlhGH TxMfyCFhPSRspi6M6ID4/TT7dUgTtlt2JqEEheq32h5sXhlKtGa/786lJ0YYufLl9o6LCXsq0A3 8qluZa13tLVb5d4vF9l5Z6MVqLgtKiBgMKTpF2vQsVQVpomPlo8vFMZVA2Hm23qPRnoWnmeXkKa jPf8uxWll3miofdWchg== X-Proofpoint-ORIG-GUID: q9UoZxhNVjKztX7DYZFe4xUtMjRc3lLk X-Authority-Analysis: v=2.4 cv=Pe/yRyhd c=1 sm=1 tr=0 ts=6991957a cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8 a=l68oApq_WO2ZGngkTEkA:9 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: q9UoZxhNVjKztX7DYZFe4xUtMjRc3lLk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1121, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-02-15_03,2026-02-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602150076 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" With the GPU accelerated softISP 2 separate benchmark results are printed, 1 for the generation of the output images on the GPU and a separate one for generating the statistics on the CPU. Add a new name argument to the Benchmark class descriptor and print this out when printing the benchmark result. Signed-off-by: Hans de Goede --- Changes in v2: - Add include to benchmark.h - Use ": name_(name)" in the Benchmark constructor to init name --- include/libcamera/internal/software_isp/benchmark.h | 4 +++- src/libcamera/software_isp/benchmark.cpp | 5 +++-- src/libcamera/software_isp/debayer.cpp | 3 ++- src/libcamera/software_isp/swstats_cpu.cpp | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h index 46bdb86d..5526abc5 100644 --- a/include/libcamera/internal/software_isp/benchmark.h +++ b/include/libcamera/internal/software_isp/benchmark.h @@ -11,6 +11,7 @@ #pragma once #include +#include #include #include #include "libcamera/internal/global_configuration.h" @@ -20,13 +21,14 @@ namespace libcamera { class Benchmark { public: - Benchmark(const GlobalConfiguration &configuration); + Benchmark(const GlobalConfiguration &configuration, const std::string &name); ~Benchmark(); void startFrame(void); void finishFrame(void); private: + std::string name_; timespec frameStartTime_; bool measure_; /* Skip 30 frames for things to stabilize then measure 30 frames */ diff --git a/src/libcamera/software_isp/benchmark.cpp b/src/libcamera/software_isp/benchmark.cpp index 4ffb6773..36c49770 100644 --- a/src/libcamera/software_isp/benchmark.cpp +++ b/src/libcamera/software_isp/benchmark.cpp @@ -26,7 +26,8 @@ LOG_DEFINE_CATEGORY(Benchmark) /** * \brief Constructs a Benchmark object */ -Benchmark::Benchmark(const GlobalConfiguration &configuration) +Benchmark::Benchmark(const GlobalConfiguration &configuration, const std::string &name) + : name_(name) { skipBeforeMeasure_ = configuration.option( { "software_isp", "measure", "skip" }) @@ -81,7 +82,7 @@ void Benchmark::finishFrame(void) frameProcessTime_ += timeDiff(frameEndTime, frameStartTime_); if (encounteredFrames_ == skipBeforeMeasure_ + framesToMeasure_) { LOG(Benchmark, Info) - << "Processed " << framesToMeasure_ + << name_ << " processed " << framesToMeasure_ << " frames in " << frameProcessTime_ / 1000 << "us, " << frameProcessTime_ / (1000 * framesToMeasure_) << " us/frame"; diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp index dccdd86b..a6bceb58 100644 --- a/src/libcamera/software_isp/debayer.cpp +++ b/src/libcamera/software_isp/debayer.cpp @@ -58,7 +58,8 @@ namespace libcamera { LOG_DEFINE_CATEGORY(Debayer) -Debayer::Debayer(const GlobalConfiguration &configuration) : bench_(configuration) +Debayer::Debayer(const GlobalConfiguration &configuration) + : bench_(configuration, "Debayer") { } diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp index 5c3011a7..1cedcfbc 100644 --- a/src/libcamera/software_isp/swstats_cpu.cpp +++ b/src/libcamera/software_isp/swstats_cpu.cpp @@ -155,7 +155,7 @@ namespace libcamera { LOG_DEFINE_CATEGORY(SwStatsCpu) SwStatsCpu::SwStatsCpu(const GlobalConfiguration &configuration) - : sharedStats_("softIsp_stats"), bench_(configuration) + : sharedStats_("softIsp_stats"), bench_(configuration, "CPU stats") { if (!sharedStats_) LOG(SwStatsCpu, Error)