| Message ID | 20260304075052.11599-1-johannes.goede@oss.qualcomm.com |
|---|---|
| Headers | show
Return-Path: <libcamera-devel-bounces@lists.libcamera.org> 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 12B67BE086 for <parsemail@patchwork.libcamera.org>; Wed, 4 Mar 2026 07:51:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 41A8F6239A; Wed, 4 Mar 2026 08:50:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="iX3/2XR+"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Nuecm7zu"; 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 7095D62080 for <libcamera-devel@lists.libcamera.org>; Wed, 4 Mar 2026 08:50:57 +0100 (CET) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6245SdNr957613 for <libcamera-devel@lists.libcamera.org>; Wed, 4 Mar 2026 07:50:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=r6yfsDZD7okJiDZWb/qTRzX4We5MW4Nw87f 9JlQudus=; b=iX3/2XR+554L/JNbIfFuu/AG5wHVBPmagDKwY31vs27i5iEjrUu pep6o9uVF4WnjIGhIQ4HsSqdrNvsFi5cuybLXiaTHi4HUS+2iyUTheO2u98VU/kQ YEaUzox1vp22gZqY6LIdLy4AaPkb4+Vd2almK5RsS7T+H8xna6o32Hn21BmvwINU cx66z+Yp/iRwZJ55Biauc2PJjOePcSCt5KjoaVoshCH5LvrGePYbLiV+OIGhQNng e+iuZSTv5WA+hPJLpQ+U0MyFUbv3e4JVieAw5ugIIdvTPZ4iua9XlXU991w4Tsgc wWCC7cl2q2WNm6ivjNui1an4U9+CflkjPhA== 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 4cp6qg9xcv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for <libcamera-devel@lists.libcamera.org>; Wed, 04 Mar 2026 07:50:55 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cb3ff05c73so3969448685a.0 for <libcamera-devel@lists.libcamera.org>; Tue, 03 Mar 2026 23:50:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772610655; x=1773215455; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=r6yfsDZD7okJiDZWb/qTRzX4We5MW4Nw87f9JlQudus=; b=Nuecm7zucNZgSO5cfq2egoE6Wrt4b2Mw5D42s2OhKQWWkzV00GXyt5lKvj3uHp2ucG 3TBE4FjFrx/pYc5cym0DEkBQ/XzxEwVTDGB+GD9pqSpbiVYEP9GvDs+MenJp8Ewsq+w4 fsGjTSOKE7U5VnJZ+sBZVpiFUfP34Y3yiu90mNbHz54uAoJ9jCLW0wZW4kCUz+DkfN+4 gLWUU/PuNmZ0Wgo8MbZBo8VBu6lyWqQ+GO2zKo17ayrslf8AQMegVyHVvKoJ5pctN4i/ fACtvYgQJ1WU0tPvW6wJP4NlSXofCS2+FJt/WcVJ/yBg4J09vi0AdCTtuSk/DErT0/4e TJxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772610655; x=1773215455; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=r6yfsDZD7okJiDZWb/qTRzX4We5MW4Nw87f9JlQudus=; b=eS9QHN9tsq7KTMztCNbfMcNKfq39174G0Kw1oxaL7a09mWfI7zD82SmiCk3qUaqZcK uymJMHCZrY4xcFwZ1DGpB4bv5sYK8ao+ALOXvQvSgwe2ax61hRhsCNZ2fUoAxcOHPP3M Mv2kW1AZitbvOaR/EA9xUVXT/JonwOG1J5Ik3Y4LurtVxFDT9is/HIZQxh+SFHprD/sH ZVj9WPnPO98M7wg7C/xwEd26MnsPLFpV+EF6GeZ0JnHibVeWTWd4UvpL2c8+JD6L92wP kHjQteBq+zPV3LHQP7ZkAjeleENMx9B821QXkb7Ped9Ade0+UeNmvMmXPTBPvSosxWUh XkiQ== X-Gm-Message-State: AOJu0Yy9z6qs1VQR+moFxjq3ch8T2Z4X38onUZXtmwbqv0yulF86LaEP eF2O2HZxRBs/4SvRlyTQqnVx5AqV3rLNN22nZKtGZ+hrjCusukWG24VdubABEy1YBtq1uC7rhhf ZBQhJU+wTJVuCQR5t7uH3UOGWKMWqiWXzuDoCRdVsiPpIBZH2jXjQdtgE6rgfeqlJkR7iSnLYya Bbv6opFSkD X-Gm-Gg: ATEYQzzeOtHqqGViLv/gPIEwmiUkn4v7h+di5AE5ak9ySAcnEp53QDTGO3w6bGa888r Eo1oW/aW8rHtTUwGOWHTd7caHUwG3XpI6dO8fSBlrSQ3d3QnZELgAwtmOJQcMInJnCtHTfD+TAX N+vGniyt9th3wiIWJ5DJBc3dywMAlXQbrirGoAGCSNpjS6YMZYL3uhHuXbrkuPO+cwF9oEGP+CM KaswcpDa3sqlJ5hPtyAFipwWPnC1mqoU6elQgtjFdXDdLGUTCI0rXDc3tI2scmAUpBAAxSPDXVk vwABnYRczT2lHAJnlxMsjaEQmbmc1GfUXVvm0G2c6wP/eZW9CEqXgM2yUZ8WQUY5dQhgyzEHVj/ oQrbjtBI+0BDrhu4z66N6O2l6l7TcB0WErFXBO8eMhmavjFHdTJ16igwYPvZoxB+smtbmLCMWN6 cv0uzv6ihHFCdezcwqhKzKbCuRb5oK5JmI9Rh6 X-Received: by 2002:a05:620a:4546:b0:8c7:140a:7dbf with SMTP id af79cd13be357-8cd5afc3269mr123736585a.77.1772610654936; Tue, 03 Mar 2026 23:50:54 -0800 (PST) X-Received: by 2002:a05:620a:4546:b0:8c7:140a:7dbf with SMTP id af79cd13be357-8cd5afc3269mr123735585a.77.1772610654479; Tue, 03 Mar 2026 23:50:54 -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 a640c23a62f3a-b935ac73a5dsm693263366b.25.2026.03.03.23.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 23:50:53 -0800 (PST) From: Hans de Goede <johannes.goede@oss.qualcomm.com> To: libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com> Cc: Hans de Goede <johannes.goede@oss.qualcomm.com> Subject: [PATCH v5 0/5] software_isp: debayer_cpu: Add multi-threading support Date: Wed, 4 Mar 2026 08:50:47 +0100 Message-ID: <20260304075052.11599-1-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA0MDA2MiBTYWx0ZWRfXzN5etPNgAUkO cco9CHI49qiY5ZLk7T/H+aj66OVdzM2iFROtlQJvAhy48CtSSj+bsyf3dUXigpXBp+pAXJ/vlQM kQaLq+N34Ah6yPV6Fq5ksJjXoPNNUYquwM6fM/1JaeqJ0/kHoW6ez2nh5Zisb/eoUJ44MK9OTFo WdCw55un6ywXsQGsQYM459NI6qjFUpQbm2Wqd6ZZkUtJ8ZboSNAckr47v122HGuZy2nNGpe34eI FAOFK9V2cFwas5+BS5z+H8qBzb9uLjIuXG5bUp1t2C/RlbDTHKLpUgbT1JbG49Ev6VXW8bDpx8J UQs6jAdJ6sPD+z6XuKfvGvhKgzWWDQmLglab4dCqp4grJuHdbmepaNOw5HsrxD9lkWct0nGLazC qsvcibw0Yn71SO1alK2kKzCZSJFPNc+bYykAp/epVk2kpUCqwRrs7lvHl0+DHD/YMmTmDHbg04j MW9M9yTz8I7glJVGd9Q== X-Authority-Analysis: v=2.4 cv=UJ3Q3Sfy c=1 sm=1 tr=0 ts=69a7e45f cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=_ldmQgw09SqRUz8hUs0A:9 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: IW6-oPTAc9n3USsLbyddmmw7alyLwFGr X-Proofpoint-GUID: IW6-oPTAc9n3USsLbyddmmw7alyLwFGr 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-03-04_02,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603040062 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <libcamera-devel.lists.libcamera.org> List-Unsubscribe: <https://lists.libcamera.org/options/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe> List-Archive: <https://lists.libcamera.org/pipermail/libcamera-devel/> List-Post: <mailto:libcamera-devel@lists.libcamera.org> List-Help: <mailto:libcamera-devel-request@lists.libcamera.org?subject=help> List-Subscribe: <https://lists.libcamera.org/listinfo/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe> Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" <libcamera-devel-bounces@lists.libcamera.org> |
| Series |
|
| Related |
show
|
Hi All, The QCM2290 SoC used on the Arduino Uno-Q seems to have a weak GPU, so weak that it is barely faster then a single CPU core (CPU without CCM). This has made me code-up the long envisioned multi-threading support for the CPU softISP. Changes in v5: - Extend software_isp.threads docs in runtime_configuration.rst - New patch: "Documentation/runtime_configuration: Add missing software_isp.mode doc" Changes in v4: - Use const in for (const auto &s : stats_) {} in SwStatsCpu::finishFrame() - Move kMaxLineBuffers constant to DebayerCpuThread class - Document software_isp.threads option in runtime_configuration.rst - Add an use constants for min/max/default number of threads Changes in v3: - Use std::unique_ptr for the DebayerCpuThread pointers - Document new DebayerCpuThread class - Make DebayerCpuThread inherit from both Thread and Object - Use for (auto &thread : threads_) - Use for (auto &s : stats_) {} - Move input format logging from DebayerCpu::configure() to SoftwareIsp::configure() Changes in v2: - Quite a bit of refactoring based on v1 feedback, dropped patch 3/5 and 4/5 from v2 since these now no longer make sense - Move the allocation of the vector of SwIspStats objects to inside the SwStatsCpu class, controlled by a configure() arguments instead of making the caller allocate the objects - Replace the DebayerCpuThreadData struct from v1 with a DebayerCpuThread class, derived from Object to allow calling invokeMethod for thread re-use in followup patches - As part of this also move a bunch of methods which primarily deal with per thread data: setupInputMemcpy(), shiftLinePointers(), memcpyNextLine(), process*() to the new DebayerCpuThread class - Re-use threads instead of starting new threads every frame - Add a new patch adding some extra DebayerCpu input format logging Benchmark results for the Uno-Q + IMX219 running at 3280x2464 -> 3272x2464 without CCM: 1 thread : 147ms / frame, ~6.5 fps 2 threads: 80ms / frame, ~12.5 fps 3 threads: 65ms / frame, ~15 fps GPU: 130ms / frame, ~7,5 fps GPU 0-copy: 110ms / frame, ~9.5 fps (requires pipeline + camss hacks) GPU lite: 85ms / frame, ~12 fps (CCM, contrast and gamma disabled) Regards, Hans Hans de Goede (5): software_isp: swstats_cpu: Prepare for multi-threading support software_isp: debayer_cpu: Add DebayerCpuThread class software_isp: debayer_cpu: Add multi-threading support software_isp: Log input config from configure() Documentation/runtime_configuration: Add missing software_isp.mode doc Documentation/runtime_configuration.rst | 20 ++ .../internal/software_isp/swstats_cpu.h | 25 +- src/libcamera/software_isp/debayer_cpu.cpp | 286 ++++++++++++++---- src/libcamera/software_isp/debayer_cpu.h | 33 +- src/libcamera/software_isp/software_isp.cpp | 12 +- src/libcamera/software_isp/swstats_cpu.cpp | 54 ++-- 6 files changed, 321 insertions(+), 109 deletions(-)