Patch Detail
Show a patch.
GET /api/1.1/patches/23229/?format=api
{ "id": 23229, "url": "https://patchwork.libcamera.org/api/1.1/patches/23229/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23229/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20250422215920.4297-17-bryan.odonoghue@linaro.org>", "date": "2025-04-22T21:59:09", "name": "[16/27] libcamera: software_isp: Move param select code to Debayer base class", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": false, "hash": "011ea136b6afa71cdb5fb85398ca53f140a974b4", "submitter": { "id": 175, "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api", "name": "Bryan O'Donoghue", "email": "bryan.odonoghue@linaro.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23229/mbox/", "series": [ { "id": 5142, "url": "https://patchwork.libcamera.org/api/1.1/series/5142/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5142", "date": "2025-04-22T21:58:53", "name": "RFC: Add in a eGL based GPUISP in libcamera", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5142/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23229/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23229/checks/", "tags": {}, "headers": { "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\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 87DCBC32A2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Apr 2025 21:59:53 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F04968B48;\n\tTue, 22 Apr 2025 23:59:53 +0200 (CEST)", "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0EBFE68B28\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 23:59:39 +0200 (CEST)", "by mail-wm1-x334.google.com with SMTP id\n\t5b1f17b1804b1-43cfba466b2so57634725e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Apr 2025 14:59:39 -0700 (PDT)", "from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-44092d2eccesm2726615e9.20.2025.04.22.14.59.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Apr 2025 14:59:37 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"XmfD5RAS\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1745359178; x=1745963978;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=Id0ekAEOjr9NRA9szz5nSdTr2ruvPZ3UziB6jBOQNuM=;\n\tb=XmfD5RAStjG7G89N5LxFlH1nymWi4ulVkAK6q0YAcDDDjrCqQkSOOJ/jeCvBleekPI\n\tdc/8zVSHpyKBCKgUANsz0qEWO/cgZZNohMCgbW3mCGG41DoBZf9VSIjDraln01kpuNDq\n\tByVm3fERmz8Z71NUhEgvvviOWCB6DiIIA/Bw5V/Uv6qGC0xrvczRYRkKtebxciTe6gFx\n\tKPDdJ2ngVi8LN6KGNpAYGKpV2GNA4zGGDwmE6e5sduyjdDbS7fH4CbewHOZBwWS4pJ7o\n\trfiuu3aCYzIbSS3Me16BfEyDJ3lv4PoV2EWkNmhpDMa2JSs2FHnTvShJ0uDEP4TBBVa9\n\tlHeA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1745359178; x=1745963978;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=Id0ekAEOjr9NRA9szz5nSdTr2ruvPZ3UziB6jBOQNuM=;\n\tb=qMLCTcy3YNG6YK+Yw3f+NyXUyknI2FxuFIdOZ5WvOG+gL4bDxTNR8E4k0dFpB4lw3I\n\t0I6WQc5kvI+tbgypAYQpMKC4wp1Jz8O3nEdyLhfFeZCdrqVvD320CRUJoUdkmyM+7Hqw\n\tBlxWQaDS3Pgzp67ndTjjh+dnerY7M8sz4TZlMgDXGshqV1HFVF8SwsTU/5ZYO+XGrPA5\n\tYK/Jga0p/7hOLWhlaEV7U8zG5aESx3z9rS9aRx1lpzmIiweseUidvTeDgETuniZbDPN8\n\tQLocnSnlBrJy5/6RMU5USYC+1wsGzaeb66gTA+Enl0Y/NGIJbF1HQ++YhbwbXs6FNd4K\n\tcavw==", "X-Gm-Message-State": "AOJu0YzUetdXYwoAFxmCiM2d3fs6L9WecX168Gpq8SX6rUCrF980WWhu\n\tsxDZSY1b2bqQ9N5yiTy7G5t2/c/rdQnhXNPb+P3hgLRk13kuLL+0c0cgsPX0USLuMrP6h0KMr+B\n\tb0gg=", "X-Gm-Gg": "ASbGncsdCSEmC23qPNeIJAOi9NySLXc5suipEPKYuCMtTWqZ6ao75U1wyO8IsxcWW1I\n\tdUyTnQtaIBVCCfrxWc1UD/+TUSBs/UYW0Fl1h2/6/oNPg0/NAWdnuqttEyOIC19YG5T91wv5/40\n\tRl5F7kunJ9IDC9DahaelaTJHlheRcpbXmMTurcsDKunC7MhElQNJ7VxLjAEm0hncCGrL7eherWw\n\tniIFoxIkDJmREzGLJZZfqkj0JOF69udqVRUHFbCKbqGJhYe354lNoBvGH0UWIUvK6asDc4SiJeA\n\t8dVNzv9az8MgM6n5+IWZ8D3EPqoRlO/AdBBipb4funyjcXfexN5jpv/1ok1TEWLumUX2kpH0WGB\n\tPHg/tW7ExuhYhGVtWL91P", "X-Google-Smtp-Source": "AGHT+IFo70Eh9anSE9Q+86f3h02J5TIcuxAlK2QmEg5VsBRlKoxqrmnY5sB+lQeCOdOuHvz6b0qQdw==", "X-Received": "by 2002:a05:600c:358b:b0:439:9424:1b70 with SMTP id\n\t5b1f17b1804b1-4406ac17329mr168864905e9.30.1745359178430; \n\tTue, 22 Apr 2025 14:59:38 -0700 (PDT)", "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org,\n\tbod.linux@nxsw.ie", "Subject": "[PATCH 16/27] libcamera: software_isp: Move param select code to\n\tDebayer base class", "Date": "Tue, 22 Apr 2025 22:59:09 +0100", "Message-ID": "<20250422215920.4297-17-bryan.odonoghue@linaro.org>", "X-Mailer": "git-send-email 2.49.0", "In-Reply-To": "<20250422215920.4297-1-bryan.odonoghue@linaro.org>", "References": "<20250422215920.4297-1-bryan.odonoghue@linaro.org>", "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>,\n\t<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>,\n\t<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>" }, "content": "Move the parameter selection code into the Debayer base class in-order to\nfacilitate reuse of the lookup tables in the eGL shaders.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/debayer.cpp | 27 ++++++++++++++++++++++\n src/libcamera/software_isp/debayer.h | 5 ++++\n src/libcamera/software_isp/debayer_cpu.cpp | 19 +--------------\n 3 files changed, 33 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp\nindex e9e18c48..3d883b28 100644\n--- a/src/libcamera/software_isp/debayer.cpp\n+++ b/src/libcamera/software_isp/debayer.cpp\n@@ -176,4 +176,31 @@ Debayer::~Debayer()\n * \\brief Signals when the output buffer is ready\n */\n \n+/**\n+ * \\fn void Debayer::setParams(DebayerParams ¶ms)\n+ * \\brief Select the bayer params to use for the next frame debayer\n+ * \\param[in] params The parameters to be used in debayering\n+ */\n+void Debayer::setParams(DebayerParams ¶ms)\n+{\n+\tgreen_ = params.green;\n+\tgreenCcm_ = params.greenCcm;\n+\tif (swapRedBlueGains_) {\n+\t\tred_ = params.blue;\n+\t\tblue_ = params.red;\n+\t\tredCcm_ = params.blueCcm;\n+\t\tblueCcm_ = params.redCcm;\n+\t\tfor (unsigned int i = 0; i < 256; i++) {\n+\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n+\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n+\t\t}\n+\t} else {\n+\t\tred_ = params.red;\n+\t\tblue_ = params.blue;\n+\t\tredCcm_ = params.redCcm;\n+\t\tblueCcm_ = params.blueCcm;\n+\t}\n+\tgammaLut_ = params.gammaLut;\n+}\n+\n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer.h b/src/libcamera/software_isp/debayer.h\nindex dd26b9d8..9cebcbe8 100644\n--- a/src/libcamera/software_isp/debayer.h\n+++ b/src/libcamera/software_isp/debayer.h\n@@ -82,6 +82,11 @@ public:\n private:\n \n \tvirtual Size patternSize(PixelFormat inputFormat) = 0;\n+\n+protected:\n+\n+\tvoid setParams(DebayerParams ¶ms);\n+\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 8d30bf4a..baec4799 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -754,24 +754,7 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n \tfor (const FrameBuffer::Plane &plane : output->planes())\n \t\tdmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write);\n \n-\tgreen_ = params.green;\n-\tgreenCcm_ = params.greenCcm;\n-\tif (swapRedBlueGains_) {\n-\t\tred_ = params.blue;\n-\t\tblue_ = params.red;\n-\t\tredCcm_ = params.blueCcm;\n-\t\tblueCcm_ = params.redCcm;\n-\t\tfor (unsigned int i = 0; i < 256; i++) {\n-\t\t\tstd::swap(redCcm_[i].r, redCcm_[i].b);\n-\t\t\tstd::swap(blueCcm_[i].r, blueCcm_[i].b);\n-\t\t}\n-\t} else {\n-\t\tred_ = params.red;\n-\t\tblue_ = params.blue;\n-\t\tredCcm_ = params.redCcm;\n-\t\tblueCcm_ = params.blueCcm;\n-\t}\n-\tgammaLut_ = params.gammaLut;\n+\tsetParams(params);\n \n \t/* Copy metadata from the input buffer */\n \tFrameMetadata &metadata = output->_d()->metadata();\n", "prefixes": [ "16/27" ] }