From patchwork Wed Feb 11 17:00:37 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: 26134 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 EB449C3292 for ; Wed, 11 Feb 2026 17:00:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CCB1C621C0; Wed, 11 Feb 2026 18:00:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="nFGmRgvU"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FjAEuIUk"; dkim-atps=neutral Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A301C621B7 for ; Wed, 11 Feb 2026 18:00:46 +0100 (CET) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61B9JNLF3322724 for ; Wed, 11 Feb 2026 17:00:45 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=YUON/1GQCFL uc3ROMfRInAeiz6HJnBkOVMnn806CNAI=; b=nFGmRgvUviQre7b1wgLYzM9Hddw Tz9BS/3TsBxzC+DAGUF9eKQHgxjhLb5pXT0ju4tsp72sLQAw67NQrX4WheVcJyLH NWOJR6huG7ocEypIygiqcyedqcCCvgZgRwQewzHhRPm+ZodYF9Ho107s1JeOzY9r ihyXb1eBQEV+n8PACOmEd9S/uI4jpzuAdPiF4WEkrGZpVRRCTSYdWSLe+EGoyAEs kzb5eOpKOtT0cYxv+nUkY6B3mJ0HY4+pAYPxTYPHEDpibtEyUfHGhD96Q77jM/1c 8CCD2mX/dgfRxmyQDUKvdqlR9MiImdz4+3WQWBX5Kv8/K98iNUqXjtGeYvQ== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c8epsjuh5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 11 Feb 2026 17:00:45 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8c52f07fbd0so2287424685a.2 for ; Wed, 11 Feb 2026 09:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770829244; x=1771434044; 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=YUON/1GQCFLuc3ROMfRInAeiz6HJnBkOVMnn806CNAI=; b=FjAEuIUkTuTCqdh2ZeNFBJCjdhNt7pUwLhR4ryCPeOnuB6svYBAunr3sz89GDPGA8/ C9KWKaQjrIaUNx2kljoZD/BquLLFAllwwEatuF/oiP4lwrJLAQsnA9VK7CjbIjhj336f AAzKKKS11nQYw+0p6WAlRaA3WyvZc3KJSOxvk8icXeAmhyRqRhstDTkVaIjJZLOz3KYx TaYmRfOc6uJoGp80pTNFqbTcX3BgRNmPQEPmf2ULh3aHSOVOkAUwC9j+w+RAsaGeqKl5 kRdBMETSLMzWIQimKTDIbtwUOuZH8xjNQ+61nkj5K6egMDM9NujtmDcmFHnN884/4s8U lQfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770829244; x=1771434044; 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=YUON/1GQCFLuc3ROMfRInAeiz6HJnBkOVMnn806CNAI=; b=YITGpGLmBOkWLeyauQD0IIwydWYKlx6JucPuK39L1qKH+eLUOWmnZdBlCA8xV7kiM4 gRvyr22pbhzIFjVoA6xY4q2HllyM+ItE5KDGwyNumWCHSC9cKvF9IaMwcF53fV19bYrL tgKc/Ltt1Y7oVcagfgPE6UxoHGlAk0QTxFJ7UkoKuUGUVUjjxurOx78ALUWHw3mAKIEq xq7Ezw3mq00bJtuu4QF47Dm1btAjfZwohI5junNlyfGvHdY2PcPW55/j5PS+TIDCyHto 1zMLGJDbe5NDIGMQEeExdLdQa6ssM0YfMFtTHrHPxDzwRDM0vGJilpnFbtwzL0gHaVnj va2w== X-Gm-Message-State: AOJu0Yw0aaqKiiaUuyGmJUPjAgZGsrMWPEkGrY6T6WcAQ54zTh5+Ejt+ 1lz+jjzbO9AoCo/f0fdpk2msp4z5NN5Z3Why1C7J5243ZrrImOAh9Dl/mRForW+DSlX/3cO48zk ABQM+r4aoYC7fVRidLI6Bw4ZiabHEaIFVAm4TYuiKF5WrtFNKieqnbqZ+exINkx3OmUB98fMRnJ fFWlcgzOY4 X-Gm-Gg: AZuq6aItNiSGY9a9GGPrsCVHlLDXNTrFHLwmEUdDdNbvvYFvLoT3CRe2/fD1X3fPIYh aBB9N34l5cnnSTi0yqKIzBkPD4AMoBv8N4OtK4DX65yRuQQCksmUKCpzStQX+QJZ2jAIeb/d1M+ Tw4kwcC5jAI0HaoiLiAwYot3k7K/QYM+0eY+XfHgu90hidyrmKX/QCBad8J17RV/6pGzXDTPzgV WZBmGJ/wfu5T5IsNYS9Hknao3TDX6jQmp+ZhuikfMYyFsgB0q+opgeX/FOVN/YYFgGVLKFIiMDF NjwOI36I4ejBFiy89+0e6UF9wfiYGagI+zzfmf+4NR5onFUolN9DdXcP6Adhuv4vc0J/ktLD1rg 0xgSJ/nqmU82rVTIlWLpiDoDI1ZG+NQPThQf8oVliVx548bRAxjy8GiTHwpxB+xez1sWL3xLckH SJeNUd1TZ8exlRiB6j2WACQlP+gWD5w9OPfePB X-Received: by 2002:a05:620a:294b:b0:8ca:2bab:a0fb with SMTP id af79cd13be357-8cb27f76910mr484448385a.11.1770829242551; Wed, 11 Feb 2026 09:00:42 -0800 (PST) X-Received: by 2002:a05:620a:294b:b0:8ca:2bab:a0fb with SMTP id af79cd13be357-8cb27f76910mr484414085a.11.1770829240404; Wed, 11 Feb 2026 09:00:40 -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-65a3cebf697sm867606a12.10.2026.02.11.09.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 09:00:39 -0800 (PST) From: Hans de Goede To: libcamera-devel@lists.libcamera.org, Milan Zamazal Cc: Hans de Goede Subject: [PATCH 2/2] software_isp: benchmark: Print what is being benchmarked Date: Wed, 11 Feb 2026 18:00:37 +0100 Message-ID: <20260211170037.131630-2-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260211170037.131630-1-johannes.goede@oss.qualcomm.com> References: <20260211170037.131630-1-johannes.goede@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjExMDEzMSBTYWx0ZWRfX9NqmD8w+lvQ6 AQ2kdLiC29Y6xX+ECyIIPNmMb9GVhiPlNdZvVzdt+bW8GZnI5uqoaIr/O7bC2JV8JzBoveZKSHH lo3yInxQrUQrXBT0MnCyveAUCK13676l3klInakeEfRSW7C+Z2T0Fz/3Z1MhP5cTM9FriFQ95Cc 2yYASDfLDTih5hTn5OHYpWdQJbRGbrdu27uSh4kI6ecA0y8wnG6eXGBMuEbPDsmkGjZHNbivWCJ 9sNKWtbP38DrZ7QaNvjKEvN5MHPGe1DgeTgeqvzHLz++c93WX0EDxkBp5eTOuXYC7kr53NyOXLl 624fusxUe+IF+dIt6goYA38GiQi6pwuIGqF/ftnAchz+a7JZrscV3hOn7Tl3b2dI//5aawTQAdN IDBFqA4ayuxIa+xtzIF9I+eDcYs/0cJ7azELRtmdoSFrH5fyhyaHqrlWXzKqwc9BDaPLlOmc9ZM 0En/lskM4v6YqocaqRg== X-Proofpoint-ORIG-GUID: 0Ihcx8L-3zM_lb26_iMMAmC44pj9XnbG X-Proofpoint-GUID: 0Ihcx8L-3zM_lb26_iMMAmC44pj9XnbG X-Authority-Analysis: v=2.4 cv=I/Vohdgg c=1 sm=1 tr=0 ts=698cb5bd cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==: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=IoWCM6iH3mJn3m4BftBB:22 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-11_02,2026-02-11_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602110131 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 --- include/libcamera/internal/software_isp/benchmark.h | 3 ++- 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, 8 insertions(+), 5 deletions(-) diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h index 46bdb86d..9c181927 100644 --- a/include/libcamera/internal/software_isp/benchmark.h +++ b/include/libcamera/internal/software_isp/benchmark.h @@ -20,13 +20,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..e0fffaba 100644 --- a/src/libcamera/software_isp/benchmark.cpp +++ b/src/libcamera/software_isp/benchmark.cpp @@ -26,8 +26,9 @@ 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" }) .value_or(skipBeforeMeasure_); @@ -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)