| Message ID | 20260310120106.79922-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 50402BE086 for <parsemail@patchwork.libcamera.org>; Tue, 10 Mar 2026 12:01:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4C77E6262F; Tue, 10 Mar 2026 13:01:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="kjLn34lc"; dkim=pass (2048-bit key; unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kZXQdc/4"; 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 43DC3622F1 for <libcamera-devel@lists.libcamera.org>; Tue, 10 Mar 2026 13:01:14 +0100 (CET) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62A8s5ZD2363151 for <libcamera-devel@lists.libcamera.org>; Tue, 10 Mar 2026 12:01:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=fkbj5vjXd7DXkbS3c+I+zp +/OJXrCvScOd0mWxjJ/fI=; b=kjLn34lc8WSl0X2N+ESDxr//7EQ8GTkOHYmOMs /5lSGUvJDT9SVP5Bn92Zy+uRXspJFujdraKCH/+mD7ZnNRFbo+8vnFcyorKS0RF2 zUsKViIMDVzgQ0L7j8UPikujeLPrpeRhVxKUUQxebuDi3fAVuGPYyTOH8LPnckrc ff0wdw8DeoUOTV2WoaTykmb6z6c9cNaQCns8ssi7R9AK2sl9j4unK6bSjdEo7aGh alPj5F+A43oWCMr2pyDIT7HdAx024GJVVPpf4NoXrZbNvbbxFgYgu2RzcJJZtHiJ Awph8vLNmOxM5oY9IHgzKRkg5104t9lMAoCGaXi7JiCefoDA== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ct032c3cm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for <libcamera-devel@lists.libcamera.org>; Tue, 10 Mar 2026 12:01:12 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-5090bc4823cso119119701cf.3 for <libcamera-devel@lists.libcamera.org>; Tue, 10 Mar 2026 05:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773144071; x=1773748871; 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=fkbj5vjXd7DXkbS3c+I+zp+/OJXrCvScOd0mWxjJ/fI=; b=kZXQdc/4GkT2gOldaHZa+Lu41SvCCctiAMpoMR04RF6eWs/dU5Pw2ZK6jK1dtb/dKc MKzuG5ajPWxG6YB0Vw3zD6oEWQdWRXkx9YuZYszZ0bep9PrXuVMRRP4nJGRBN8tN0bFG OTXjf/iwWGd2w4eD1ftO/xzIpg9PTXsSJDCjd0riP9ZECU08LOxOJtwvoZFZSrBpXwhf VuCPRbFqOdLQEzn2Kj6QHycDezLjTB0DRiWyBrfKw2l6KirwceHbP1eXBqTmWSeiqGl4 QEMlK0O5jIy9A+EByQDsIswy/DRUDDeVMs4cRsraLblv4jhwzZKXQ3KTJjqGdnmjn3sF w9Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773144071; x=1773748871; 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=fkbj5vjXd7DXkbS3c+I+zp+/OJXrCvScOd0mWxjJ/fI=; b=sdAWVsLwX44M9IEEaCGsxOAacR9I0rbnixBTyAWMdtjSkXOJ0xXaNwGCkqdobwFU+e 88zIgwZXFnzmy66UcpzNl5pLpwZRlCGWoPUJAbC2xvBaJfjualJA/LQ7bFUr024rtgvW HDdJHZ1xvas8Xx06vwygjM6um1dBnSu0OCHD3MB6oYdMyB8PHTj144CuA8P2y3LSPTa5 OX1uOsZXh39z4rJuJaX/OaINzR+AbpNlMFs9JMm1h7Rvk8qrZ2yML7yVK6xrJSS0AA9f xDgWLl3uXurbFkdjB7qGi/+FwSX9EC4LMLyL4KXCCCxLmLVHLR5rOPkdxK2pfqDdPSr5 suXA== X-Gm-Message-State: AOJu0YyMMFCGAUmshtfXqp5b9th9Q9kofGU8HVJNDfa1jW27R4CREN/q sx0Sxzjs5evvF8/3KXEYDevxrCLSo7f49Y4ee6/rxoHsGTkKjD0XeoYRrojafQdAE8bVTaYuhAb KyVY4uX3Uf08ljZ5AD0CJTkODLiVtWGjxRDIfWrQhh/N1nRpoESbJhwcKfiHnVAoixoY/YdzPc1 xVJLF/0zFI X-Gm-Gg: ATEYQzx5xKGirgdeYrqdY90AfStUVC0RFVQIp9YPzIKeNQhME93rADXGqLm3eHgMaqZ z4QtQhSIMAnLZUVrKu7O4BuiKMwPKYSZxRhQPyxeDAdOJlDy8XiQrPEBBiIcncfUR1lYWj3J0TU BZE0f84UOih+HRP5BFgMwXkXG+FCvgyhCTtuUFSDL+XuNd94q1UL8AfWidSvIWxTCAIFebpXUd8 4rH9qlgdRMkAMSvMuoDolojdIjrOaiCtWiRKDZJhNFATkDP1rkuoBJIYcb7TE9gm8aNdRE+abyO s4f+VI+KswvidEhx75nbJvtTl0NpUhrejTvZnRvEENcuOHudBcSE0df9t682aYfyBtzvAeQ7Wc9 w9ycAE2pjhS+BLPOafBNjPuAswwa8I5gcNkf8Ptu6kXlHESxDVyGckcPOg0fvL9Xyrj3uLOYvqL 5RcqerMIyBKcPcRPcht1DCH31tPsljC/UfZw== X-Received: by 2002:ac8:5d88:0:b0:509:2b02:c1b5 with SMTP id d75a77b69052e-5092b02eb3dmr18769371cf.44.1773144070665; Tue, 10 Mar 2026 05:01:10 -0700 (PDT) X-Received: by 2002:ac8:5d88:0:b0:509:2b02:c1b5 with SMTP id d75a77b69052e-5092b02eb3dmr18768271cf.44.1773144069873; Tue, 10 Mar 2026 05:01:09 -0700 (PDT) Received: from t14s (2001-1c00-0c32-7800-beb3-9058-f5fe-3f2e.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:beb3:9058:f5fe:3f2e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48541aa7aacsm87843405e9.13.2026.03.10.05.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2026 05:01:08 -0700 (PDT) From: Hans de Goede <johannes.goede@oss.qualcomm.com> To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal <mzamazal@redhat.com>, Hans de Goede <johannes.goede@oss.qualcomm.com> Subject: [PATCH v7 0/5] software_isp: debayer_cpu: Add multi-threading support Date: Tue, 10 Mar 2026 13:01:01 +0100 Message-ID: <20260310120106.79922-1-johannes.goede@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEwMDEwNCBTYWx0ZWRfX+VdU12RwIMN7 iFPtW8ZjWPqwP3EizsjBpJiKirWAlWGI8Fdi3wtKQALM6/9650yOOH3m/1TtpuLcHDl2OS2JKPT VLx5Ya5sKi/jV1zzcBztJ9U+q04QJgFs13LPJobR+ORrBP+XkchI2pAyFAYCxDsTrtHfakvaDRs naWQ/VWH80CIKlp0jJheZWWeDAMbcr6xqEr0hF71FcDr5K1ga7HN4duZ85a9D1ttV6kiOxAHnFK 6ztQPgHU+HEHV0h7T6103XPtjoAqrYbHZHrFLCDFqWyazgYHt1Metw7TWZ9E9f6TlGIHHFWLin1 +vCY+rGynInH8zYkT1XQhpFw6k1hzmhnit4cNVU6EC94UmD2z5phf158SNQmxYUXt2nXMLNyZu5 HLI1IyZql9szbCmtwABIvcHtZcPYFNRb2Zvvxgckjtrtn3/pNB46eoDb0YAHDXrGqEZxXBq1F5l DlsXm+VjkAPaKIYrOPA== X-Proofpoint-ORIG-GUID: I-QXAo9ScBP-kwgF0sm-hFVNTy4q0QgV X-Proofpoint-GUID: I-QXAo9ScBP-kwgF0sm-hFVNTy4q0QgV X-Authority-Analysis: v=2.4 cv=WtEm8Nfv c=1 sm=1 tr=0 ts=69b00808 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=dOUrt2DNwn2HmY4Sk-8A:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293, Aquarius:18.0.1143, Hydra:6.1.51, FMLib:17.12.100.49 definitions=2026-03-10_02,2026-03-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 spamscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603100104 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 v7: - Small update to DebayerCpuThread::configure() doc - Add missing space between type and name for threads_ declaration - Add Debug message logging thread count - Gather various tags Changes in v6: - Use "LIBCAMERA_SOFTISP_MODE, software_isp.mode" as item title for patch 5/5 - Send out patch 5/5 as a standalone v6 as the rest of the series looked ready for merging (bad idea in hindsight) 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 | 17 ++ .../internal/software_isp/swstats_cpu.h | 25 +- src/libcamera/software_isp/debayer_cpu.cpp | 288 ++++++++++++++---- 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, 320 insertions(+), 109 deletions(-)