| Message ID | 20251210005354.44726-1-bryan.odonoghue@linaro.org |
|---|---|
| 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 26C2EC3257 for <parsemail@patchwork.libcamera.org>; Wed, 10 Dec 2025 00:54:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7C2936141A; Wed, 10 Dec 2025 01:54:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Gk1RAjVa"; dkim-atps=neutral Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7324660C8A for <libcamera-devel@lists.libcamera.org>; Wed, 10 Dec 2025 01:54:14 +0100 (CET) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-7b80fed1505so6522035b3a.3 for <libcamera-devel@lists.libcamera.org>; Tue, 09 Dec 2025 16:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765328053; x=1765932853; 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=2zXCEeVuPPbgLp0ANRmkuLw1JR5adUVYS2M8kRlXIdo=; b=Gk1RAjVa66+IMiPW2+j501kabW24Bnk0mvL2JMIMTSpwhh5aaer9U2xG8UxE8KH0yJ IxY781fS/y93MmJDK3sof5Rebnhy+qAqsLcMg8hKR8ykAbdFn8fQPWpmQajcKEU+8h4/ /aJkK+cZaT2/h6j9qymAk9POTm4ndAfmeLFC526VZ+vSggqrCT1sFCecnZ68+uG882Yr AYFLuw/WhBbcWzX4g0f82h/8Gy30dngdKqqbUA7hNcnm/NETDIfH97Ytf/Uc0y/dbEFg WjWOyc7io7at6b/+hQU7U652sApLr0PamXUYwZLMo3AqzeoB9xrwOiyw4IOg+Bromo+T HD0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765328053; x=1765932853; 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=2zXCEeVuPPbgLp0ANRmkuLw1JR5adUVYS2M8kRlXIdo=; b=SnFWq/0EIhPbxjc7MIIowde+shragd1iv5VYzerUtsL+bP88nlso6mYD7hiL6DLwej 5paYPBXAG8ug1FP7nWyzpNCb/RlDCckgrygMepLSbXtmX/CSgWiXPV0ukYdvn1lsYUDH eldCU0VBNd8c7GCyc5HG2L3XwB2+zx+EBSI33EvxH6nt5rcZq8QZ+OCJhcAlcX03s6m3 NsadeHAhRIRZoYrWZd1VVh07pLQNiru60OwPcIW+b5uk543ada9WeyuQ+AK41OOnp6td moIbEO9OVgrWoxjAlBuzAskAvlKkyYQIN28OCiwMgGyVC0chpDUVP/YnmP4lcewG+6Q9 j9oA== X-Gm-Message-State: AOJu0YyfULjzMW1GMP53WgcvxQg1FONQLHp72j2+Cmle9QH5q3szlYKs 5Gfh0oJ5PozIb2Ehbh/UEOxYaK9xlQpBn2csh8hvM+OJ2dqnS857hEOuCiwykM/WwuxiRLtCAI2 CiacC X-Gm-Gg: ASbGncuvZ/j0oZphKsyJrd/jbArj5TTSE+SedIk5eoJ3RLhV2ZuGmhp2b+kmmUCZDYW iRb0O3INRMAjVcAHwTfjGTfJLU9FmgFRqK0LrYUlWGnOSq59CuRuEvxIzoyTvzVOS4mFhbreoIX W2Myuh5z8rtP9CxIUkZDxDbs9k8Sa6/wZBn9YGoQXZsSjvUZT/09q0SQCfIp6IaOEBKeIETyFO5 6eshWg2JQfewms65wqTCKRGJ6TcgtN3AoeJNglA3gqlvjsH0Xq7dvQPL2yR73im91UlNW//Xsus PNPQsep9QJ1bdLASMD6lSJX3fbORXFfdzx2gtNzJ7q1FdLs0dLif4E4bl/C07CyvwnACNj3Akqr AcsZqlKeylSCgz0QIQ2NuYar6VNqewFClO14dYwRhRxD3JWYDDeKsw6gx3qk0lJxHzbnP1Ag0cl RWos9OBus54GGwQmuuhNAx42zEGmsLZIWNZfXIOl6ompMGeiJh25cLrh3UixghDMw/+r0xAam8X 0Y= X-Google-Smtp-Source: AGHT+IGGhyCh4vO+6wGIyUMD4VQo3moxhOxlm33zEpf1V/vexhmlKnR7YXBxtE4e44mwmbLNoqNENw== X-Received: by 2002:a05:6a20:3d11:b0:2cd:a43f:78fb with SMTP id adf61e73a8af0-366e2b90189mr524543637.48.1765328052498; Tue, 09 Dec 2025 16:54:12 -0800 (PST) Received: from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp. [150.147.107.6]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-bf6875cc8eesm16057762a12.16.2025.12.09.16.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Dec 2025 16:54:12 -0800 (PST) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org> Subject: [PATCH v7 00/26] Add GLES 2.0 GPUISP to libcamera Date: Wed, 10 Dec 2025 00:53:28 +0000 Message-ID: <20251210005354.44726-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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
|
v7: - Takes Laurent's question on doing egl init in start() instead of configure() and implements it. Tested with repeated start()/stop() from qcam. - A few supporting patches to get data we require in configure() into start() has been added as a result. - Bayer object now has a start() and a stop() - introduced in the precursor series. - Dropped overloaded algorith init() function as Milan seemed to prefer a flag in context_ over an overloaded init(). - Small tidy up on the use of TEXTURE1 instead of TEXTURE4 now that the RGB lookup tables have been dropped too. - Updates the todo list - The one thing not done is passing the complex contrast into the fragment shader per frame, instead of having it calculated per-pixel. I'd rather get the current series out/merged than add this extra bit right now. v6: - Rebases on 0.6.0 - Removes conditional compilation for lookup-table v CCM. The conditional compile to switch the ordering of blue is kept. - Laurent - Removes Bayer lookup table code from shaders and debayer_egl logic Disussed with Laurent and agree it can be dropped now - Adds a patch to pass no-op values to the debayer shaders when running those shaders in qcam. Confirmed this works by switching the true/false flag in simple.cpp and recompiling. Once the raw-streams stuff gets merged changing simple.cpp shouldn't be required. This lets us continue to support the original behaviour of the debayer shaders in Qcam while also reusing those shaders with our extensions in softisp. - Re-orders the patches a bit to group changes a bit more logically especially on more recently added patches. CI is still happy with building as progressive changes. - Drops the patch to make isStandardBayerOrder static as this logic has been squashed into the precursor series. Barnabas v5: - Takes in a fix from Hans for the unpacked center bytes. I opted to have separate stride values passed to the shaders to maintain consistency with qcam - Implements the unique_ptr change Barnabas suggested - Changes to glFinish instead of eglWaitSyncKHR - Milan/Robert - Fixes interface to pass gpuIspEnabled as a parameter - Barnabas - Makes it an error if you request GPUISP but object instantiation fails - Barnabas - Fixes indentation splat in unpacked shader - I love whitespace :( - Laurent - Leaves the upload tables in place - I thought we noted to do this in weekly meeting I'm open/happy to drop this code though its not really necessary now. - Leaves conditional compilation in shaders. The reason being with conditional compilation we can still run the original unmodifed shaders - which gives a nice base to mess with the demosiac phase in isolation. v4: - Drops AWB since the CCM contains it already - Includes Gamma - Includes Contrast - testable via camshark - Includes Saturation - testable via camshark - Includes a scaler from Robert - Includes synch changes from Robert - Includes all feedback incorporated from Pavel - Generates a default 65k CCM if none is supplied - Various Doxygen torments fixed along the way - And is the "top half" of the precursor series as the GPUISP series becomes 44 patches long this is an unreasonable number to merge in one go. - Full testable branch Link: https://gitlab.freedesktop.org/camera/libcamera-softisp/-/tree/v0.5.2-gpuisp-v4e?ref_type=heads - The first part of the series is in the precurso here Link: https://gitlab.freedesktop.org/camera/libcamera-softisp/-/commits/v0.5.2-gpuisp-v4e-split That precursor is just a tag about half way through the integrated series. Bryan O'Donoghue (23): libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access libcamera: software_isp: egl: Add a eGL base helper class qcam: viewfinder_gl: Set no-op Bayer shader values libcamera: shaders: Use highp not mediump for float precision libcamera: shaders: Extend debayer shaders to apply CCM gains libcamera: shaders: Extend bayer shaders to support swapping R and B on output libcamera: shaders: Add support for black level compensation libcamera: shaders: Add support for Gamma libcamera: shaders: Add support for contrast libcamera: software_isp: Add member variables to track selected input/output pixelFormat libcamera: software_isp: Add a Size_ member variable to pass to eGL later libcamera: software_isp: debayer_egl: Add an eGL Debayer class libcamera: software_isp: debayer_cpu: Make getInputConfig and getOutputConfig static libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option libcamera: software_isp: debayer_egl: Make gpuisp default softisp mode ipa: software_isp: Add a selfInitialising flag to IPAContext libcamera: software_isp: ccm: Implement a static init() routine ipa: libipa: module: Add createSelfEnumeratingAlgorithm ipa: simple: Add a flag to indicate gpuIspEnabled ipa: software_isp: Call createSelfEnumeratingAlgorithm() to statically instantiate CCM algo libcamera: software_isp: lut: Skip calculation lookup tables if gpuIspEnabled is true libcamera: software_isp: lut: Change default Gamma to 1.0/2.2 libcamera: software_isp: Add a gpuisp todo list Hans de Goede (1): libcamera: shaders: Fix input sampling when width != stride Milan Zamazal (2): libcamera: shaders: Rename bayer_8 to bayer_unpacked libcamera: software_isp: GPU support for unpacked 10/12-bit formats include/libcamera/internal/egl.h | 186 +++++ include/libcamera/internal/gbm.h | 39 ++ include/libcamera/internal/meson.build | 1 + include/libcamera/ipa/soft.mojom | 3 +- src/apps/qcam/assets/shader/shaders.qrc | 4 +- src/apps/qcam/viewfinder_gl.cpp | 41 +- src/apps/qcam/viewfinder_gl.h | 12 + src/ipa/libipa/module.h | 45 ++ src/ipa/simple/algorithms/ccm.cpp | 25 +- src/ipa/simple/algorithms/lut.cpp | 72 +- src/ipa/simple/ipa_context.h | 2 + src/ipa/simple/soft_simple.cpp | 9 + src/libcamera/egl.cpp | 619 +++++++++++++++++ src/libcamera/gbm.cpp | 130 ++++ src/libcamera/meson.build | 34 + src/libcamera/shaders/RGB.frag | 2 +- src/libcamera/shaders/YUV_2_planes.frag | 2 +- src/libcamera/shaders/YUV_3_planes.frag | 2 +- src/libcamera/shaders/YUV_packed.frag | 2 +- src/libcamera/shaders/bayer_1x_packed.frag | 77 ++- .../{bayer_8.frag => bayer_unpacked.frag} | 93 ++- .../{bayer_8.vert => bayer_unpacked.vert} | 6 +- src/libcamera/shaders/meson.build | 4 +- src/libcamera/software_isp/debayer.cpp | 15 + src/libcamera/software_isp/debayer.h | 3 + src/libcamera/software_isp/debayer_cpu.h | 4 +- src/libcamera/software_isp/debayer_egl.cpp | 641 ++++++++++++++++++ src/libcamera/software_isp/debayer_egl.h | 142 ++++ src/libcamera/software_isp/gpuisp-todo.txt | 40 ++ src/libcamera/software_isp/meson.build | 8 + src/libcamera/software_isp/software_isp.cpp | 37 +- 31 files changed, 2234 insertions(+), 66 deletions(-) create mode 100644 include/libcamera/internal/egl.h create mode 100644 include/libcamera/internal/gbm.h create mode 100644 src/libcamera/egl.cpp create mode 100644 src/libcamera/gbm.cpp rename src/libcamera/shaders/{bayer_8.frag => bayer_unpacked.frag} (51%) rename src/libcamera/shaders/{bayer_8.vert => bayer_unpacked.vert} (90%) create mode 100644 src/libcamera/software_isp/debayer_egl.cpp create mode 100644 src/libcamera/software_isp/debayer_egl.h create mode 100644 src/libcamera/software_isp/gpuisp-todo.txt