From patchwork Mon Oct 26 12:19:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: coolGi X-Patchwork-Id: 28612 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 EE05BC324C for ; Mon, 26 Oct 2026 12:20:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AB19068FD9; Mon, 26 Oct 2026 13:20:38 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=remy.alipoursafari@collabora.com header.b="WqhY+iYp"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 89CFF68FD6 for ; Mon, 26 Oct 2026 13:20:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1793017231; cv=none; d=zohomail.com; s=zohoarc; b=U4cWxIsIons1jy22nA9KnDQ40pdEHfjJdI1M+bqH35PDLOL0pizS0DDehxuRSV1xGwljMFo8rvIvVwdgMLw+h38nIb6q6vlAfgrxFFhSSi00aur4RPBVKFz8ilBvhWPxAwKEvd+GrowVJTBpx29HnUwqqvGqEpK2kXp+KFqTBWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793017231; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=lV2dyhYuUpc92oEZfAgfdZtXz4cn7tKENKxVnynLJys=; b=nf1BJPM+jI3tsvrWQ9L1gkmRHYUaLdu9SG2D5uKeIhBf7q8wlDPEOUByufh8dOHGW+rlNK6QKZXcXG+Dxhl5JaZ4HelrDCD8uNVfEd2wIYyYxGqQpJDWQeQCY/aRnnOj+ySwBJW2KNzJ+05YjMFsVzXkOjArX4XTjH2ivq3c3PY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=remy.alipoursafari@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1793017231; s=zohomail; d=collabora.com; i=remy.alipoursafari@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=lV2dyhYuUpc92oEZfAgfdZtXz4cn7tKENKxVnynLJys=; b=WqhY+iYpSuyLEFaznFgaAVhjwUSWSHHb6Q1/56oCQSgoEBIfIpUc9tXCse+fgLfF JuhR2guJ4aoanbuF79bkiEF3QpmRLkjxIcYc3HqlhmwsVoO0yQu/5yEmZE5Oz/IKZLU AtPtcJiw2395eHLoADVY8fDDK15FNiiGuja/2iIA= Received: by smtp.zohomail.com with SMTPS id 1793017229033937.5738321076615; Mon, 26 Oct 2026 05:20:29 -0700 (PDT) From: coolGi To: libcamera-devel@lists.libcamera.org Cc: coolGi Subject: [PATCH 1/4] gitignore: Ignore clang's generated cache folder Date: Tue, 27 Oct 2026 01:19:58 +1300 Message-ID: <20261026122014.61707-2-remy.alipoursafari@collabora.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026122014.61707-1-remy.alipoursafari@collabora.com> References: <20261026122014.61707-1-remy.alipoursafari@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External 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" Signed-off-by: coolGi --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 51d31440..00ce776d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ *.pyc __pycache__/ venv/ +.cache/ From patchwork Mon Oct 26 12:19:59 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: coolGi X-Patchwork-Id: 28613 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 E06DAC324C for ; Mon, 26 Oct 2026 12:20:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 942BC68FE0; Mon, 26 Oct 2026 13:20:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=remy.alipoursafari@collabora.com header.b="JVep72MV"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C249168E22 for ; Mon, 26 Oct 2026 13:20:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1793017233; cv=none; d=zohomail.com; s=zohoarc; b=ap09ncfIZWrBDMmJ4b/yWWxMtWNHV84q0jChO7RjvwFzsmBohWXeGbT0+wLwRl6xE6xFROmUKJ2AewhuAFFLKR+8aCmoSTIifQ2OJDKbb0sJUiAIOyBS7RDrJ8ocCjAtLknqlMNz4F/MpEWeXon/uQDKdNld38a+RU5XuYRub/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793017233; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=KPm+W12KGHGwJyi2bahkWvtfXRrvB00DW06vmAYnm2w=; b=Y+rfsF5DRKMkNgCIkP7bOYTNo89Ycg7qHhuBVSrHxSLMgStqSmrSE+FoTstXUANYaJLVo1rVlVQBJ0rXDvHbWbIwRbRjZuigWENUOMLTsXbx8qV8VxcbDV9bFffMjjGjyQqutf+sNVrnI9NYEuMVHqaWYo9CmhIlYJbtDWpW+uw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=remy.alipoursafari@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1793017233; s=zohomail; d=collabora.com; i=remy.alipoursafari@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=KPm+W12KGHGwJyi2bahkWvtfXRrvB00DW06vmAYnm2w=; b=JVep72MVmIEh15cub56BbxoUDUshba+d4zuL8sVBIAnoBI+Nu4lckkTI3pe/wg3e 6Wkb0HWMmxLdIhzAH88r0hTrDgcxrJ4s2svNbv+N5JrlDKR6N8HfpAoRufQSSODmaqP uYGAp+cuyV+IncpODuqIP0VzlZx1v4FyHP12cw78= Received: by smtp.zohomail.com with SMTPS id 1793017230628594.1725860424598; Mon, 26 Oct 2026 05:20:30 -0700 (PDT) From: coolGi To: libcamera-devel@lists.libcamera.org Cc: coolGi Subject: [PATCH 2/4] libcamera: pipeline: simple: Add rockchip-cif to supported devices list Date: Tue, 27 Oct 2026 01:19:59 +1300 Message-ID: <20261026122014.61707-3-remy.alipoursafari@collabora.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026122014.61707-1-remy.alipoursafari@collabora.com> References: <20261026122014.61707-1-remy.alipoursafari@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External 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" Signed-off-by: coolGi --- src/libcamera/pipeline/simple/simple.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 35c29cec..e8a0b9f4 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -265,6 +265,7 @@ static const SimplePipelineInfo supportedDevices[] = { { "mxc-isi", {}, false }, { "qcom-camss", {}, true }, { "sun6i-csi", {}, false }, + { "rockchip-cif", {}, true }, }; bool isRaw(const StreamConfiguration &cfg) From patchwork Mon Oct 26 12:20:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: coolGi X-Patchwork-Id: 28614 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 A38B9C324C for ; Mon, 26 Oct 2026 12:20:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B5E7C68FEF; Mon, 26 Oct 2026 13:20:41 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=remy.alipoursafari@collabora.com header.b="j+I/sX4s"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7558E68FD7 for ; Mon, 26 Oct 2026 13:20:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1793017233; cv=none; d=zohomail.com; s=zohoarc; b=ENNgc5StjObSVoikFXCVz4Fa10kOilkUv+tith21eWWSRd0A9jff+LaALGwv4mYMxSRZRkzr/5SrErpz2dcrE9gJYL984oBnDZXLy85jySE6EK0kCLuQjLQZAE11GYyX3HjbVkLeo+1Vk9rjqXUrr5iYEKH9AX+0G/h7QYpG8LM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793017233; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=MhXlViRoGLF2P2xWW4IKkoDsBSDfX5NwlHUVyobLA7E=; b=QkS+GeyJ1VQhNZB7kEQSzizY81wjoImm2FxltMwY6lWeUy4cneNWj8fCtsChIwRE6oZa1l/LIoeWFzYezbtefxSSvR6oMtTNEwsVRpu7pps0Rah+UOWtAHtsacrIatHXkgD5Z1xztlxd3RI4rYrWJtWTGvrjnWBevYAPWmTSrCE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=remy.alipoursafari@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1793017233; s=zohomail; d=collabora.com; i=remy.alipoursafari@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=MhXlViRoGLF2P2xWW4IKkoDsBSDfX5NwlHUVyobLA7E=; b=j+I/sX4s57dzRx2ivNNytZN0yxWsCHrhMOLWLBbTFeS3EYFWm2C43u0eSsdZcYUU eYpl7jEkVRpQgNWhTXOqr2Eq8hePESINfeIaUAiehoE1Yzdnjx/avSJfqvqokK2bRyM 88JYABbU8ZHUD1cR9fkftu1leCxy+AAsQA3ASHNY= Received: by smtp.zohomail.com with SMTPS id 1793017232197931.9002226331561; Mon, 26 Oct 2026 05:20:32 -0700 (PDT) From: coolGi To: libcamera-devel@lists.libcamera.org Cc: coolGi Subject: [PATCH 3/4] libcamera: software_isp: debayer_egl: Remove redundant return value of getShaderVariableLocations Date: Tue, 27 Oct 2026 01:20:00 +1300 Message-ID: <20261026122014.61707-4-remy.alipoursafari@collabora.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026122014.61707-1-remy.alipoursafari@collabora.com> References: <20261026122014.61707-1-remy.alipoursafari@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External 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" Signed-off-by: coolGi --- src/libcamera/software_isp/debayer_egl.cpp | 7 ++++--- src/libcamera/software_isp/debayer_egl.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 300822f9..55fd30cb 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -97,7 +97,7 @@ int DebayerEGL::getInputConfig(PixelFormat inputFormat, DebayerInputConfig &conf return -EINVAL; } -int DebayerEGL::getShaderVariableLocations(void) +void DebayerEGL::getShaderVariableLocations(void) { attributeVertex_ = glGetAttribLocation(programId_, "vertexIn"); attributeTexture_ = glGetAttribLocation(programId_, "textureIn"); @@ -127,7 +127,6 @@ int DebayerEGL::getShaderVariableLocations(void) << " stride_factor " << textureUniformStrideFactor_ << " tex_bayer_first_red " << textureUniformBayerFirstRed_ << " proj_matrix " << textureUniformProjMatrix_; - return 0; } int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat) @@ -268,7 +267,9 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm return -ENODEV; } - return getShaderVariableLocations(); + getShaderVariableLocations(); + + return 0; } int DebayerEGL::configure(const StreamConfiguration &inputCfg, diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h index 30e51a47..20c8a0b1 100644 --- a/src/libcamera/software_isp/debayer_egl.h +++ b/src/libcamera/software_isp/debayer_egl.h @@ -64,7 +64,7 @@ public: private: static int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config); int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat); - int getShaderVariableLocations(); + void getShaderVariableLocations(); void setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams ¶ms); int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams ¶ms, std::optional *mappedInputBuffer, std::optional *inputBufferDmaSyncer); From patchwork Mon Oct 26 12:20:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: coolGi X-Patchwork-Id: 28615 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 09E6DC3302 for ; Mon, 26 Oct 2026 12:20:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0049368FDD; Mon, 26 Oct 2026 13:20:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=remy.alipoursafari@collabora.com header.b="NyTOdt85"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 541A168FE9 for ; Mon, 26 Oct 2026 13:20:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; t=1793017235; cv=none; d=zohomail.com; s=zohoarc; b=EhBSrxc2ZrvX/EIy25jsvYJlmGOOybt1qbGpHgWE3Nu21gRH6YA/O6l49d5i9p1tH1J6NhoVAAB4Mc7C5XEuXAYb+BRJxmvsHa5H3U26pJA9DX4rcUia4T+18ByJYTac6byArzM88Dq8oC6XaeHEg+Q/oiNDKfCykSEeWRrSyIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793017235; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hxr194rZe4mrncT6OMtW/bT+5PNfKZX13u43mHb9yow=; b=d3TcqBhlPO3qVPuoyge6eCMA4QIgnHoXnGQ3YQGnF5ChgSpb3i70YkScRHykLsWyk0u1Ph+ED0R9k+mpF3B1DUcGilHVPp6sLIoq8WTyMCz0nSe6kCOKPQpzINZhGq4lJg98zdC186kAWc+SOjVGeM8IFvX00507PLrkBBODeJo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=remy.alipoursafari@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1793017235; s=zohomail; d=collabora.com; i=remy.alipoursafari@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=Hxr194rZe4mrncT6OMtW/bT+5PNfKZX13u43mHb9yow=; b=NyTOdt85oiB3wttvlyUfnnqU2KbocluwuNyRTuDEyRLKyA6tntmqtvJazH+nfgSq nUxlC75cfBxw/0ETKPeW6BrJkP+Gu7/Vi/xiGPp5/D3zhYQZjgrfL4ttIzf1d+CKC2B MAmU/1+7dJA7dHk+kgrh1WYcX+DqOjsxEAV6CVME= Received: by smtp.zohomail.com with SMTPS id 179301723372439.62115348146301; Mon, 26 Oct 2026 05:20:33 -0700 (PDT) From: coolGi To: libcamera-devel@lists.libcamera.org Cc: coolGi Subject: [PATCH 4/4] libcamera: software_isp: debayer_egl: Only assign static uniforms once Date: Tue, 27 Oct 2026 01:20:01 +1300 Message-ID: <20261026122014.61707-5-remy.alipoursafari@collabora.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261026122014.61707-1-remy.alipoursafari@collabora.com> References: <20261026122014.61707-1-remy.alipoursafari@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External 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" This results in an approximately 1.15x performance increase. Signed-off-by: coolGi --- src/libcamera/software_isp/debayer_egl.cpp | 21 +++++++++++++-------- src/libcamera/software_isp/debayer_egl.h | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 55fd30cb..10b59f00 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -269,6 +269,8 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm getShaderVariableLocations(); + setShaderUniformValues(); + return 0; } @@ -376,7 +378,7 @@ uint32_t DebayerEGL::preferredInputStride(const PixelFormat &inputFormat, const return info.stride(size.width, 0, 256); } -void DebayerEGL::setShaderVariableValues(eGLImage &eglImageIn, const DebayerParams ¶ms) +void DebayerEGL::setShaderUniformValues() { /* * Raw Bayer 8-bit, and packed raw Bayer 10-bit/12-bit formats @@ -427,13 +429,6 @@ void DebayerEGL::setShaderVariableValues(eGLImage &eglImageIn, const DebayerPara glVertexAttribPointer(attributeTexture_, 2, GL_FLOAT, GL_TRUE, 2 * sizeof(GLfloat), tcoordinates); - /* - * Set the sampler2D to the respective texture unit for each texutre - * To simultaneously sample multiple textures we need to use multiple - * texture units - */ - glUniform1i(textureUniformBayerDataIn_, eglImageIn.texture_unit_uniform_id_); - /* * These values are: * firstRed = tex_bayer_first_red - bayer_8.vert @@ -464,6 +459,16 @@ void DebayerEGL::setShaderVariableValues(eGLImage &eglImageIn, const DebayerPara << " textureUniformStep_.y " << Step[1] << " textureUniformStrideFactor_ " << Stride << " textureUniformProjMatrix_ " << textureUniformProjMatrix_; +} + +void DebayerEGL::setShaderVariableValues(eGLImage &eglImageIn, const DebayerParams ¶ms) +{ + /* + * Set the sampler2D to the respective texture unit for each texutre + * To simultaneously sample multiple textures we need to use multiple + * texture units + */ + glUniform1i(textureUniformBayerDataIn_, eglImageIn.texture_unit_uniform_id_); /* Pre-transpose matrix for GLES 2.0. */ Matrix ccm = params.combinedMatrix.transpose(); diff --git a/src/libcamera/software_isp/debayer_egl.h b/src/libcamera/software_isp/debayer_egl.h index 20c8a0b1..73a0690b 100644 --- a/src/libcamera/software_isp/debayer_egl.h +++ b/src/libcamera/software_isp/debayer_egl.h @@ -65,6 +65,7 @@ private: static int getInputConfig(PixelFormat inputFormat, DebayerInputConfig &config); int initBayerShaders(PixelFormat inputFormat, PixelFormat outputFormat); void getShaderVariableLocations(); + void setShaderUniformValues(); void setShaderVariableValues(eGLImage &eGLImageIn, const DebayerParams ¶ms); int debayerGPU(FrameBuffer *input, FrameBuffer *output, const DebayerParams ¶ms, std::optional *mappedInputBuffer, std::optional *inputBufferDmaSyncer);