Patch Detail
Show a patch.
GET /api/1.1/patches/24514/?format=api
{ "id": 24514, "url": "https://patchwork.libcamera.org/api/1.1/patches/24514/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24514/", "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": "<20250930122726.1837524-16-stefan.klug@ideasonboard.com>", "date": "2025-09-30T12:26:36", "name": "[v1,15/33] libcamera: rkisp1: Move useDewarper_ flag into RkISP1CameraData", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "17eac80d72eb489aafb90945ba0eca6a4246d820", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24514/mbox/", "series": [ { "id": 5468, "url": "https://patchwork.libcamera.org/api/1.1/series/5468/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5468", "date": "2025-09-30T12:26:21", "name": "Full dewarper support on imx8mp", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5468/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24514/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24514/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 788D6C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Sep 2025 13:04:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 657F16B606;\n\tTue, 30 Sep 2025 15:04:07 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 027BE69367\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Sep 2025 15:04:05 +0200 (CEST)", "from ideasonboard.com (unknown [94.31.94.171])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 96F42169;\n\tTue, 30 Sep 2025 15:02:36 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Spb5jC3b\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1759237356;\n\tbh=Ka5l8jCVBgIEWsigXaUrubAdjbRqFAwcWR1C4LgeCZc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Spb5jC3bvXmk0iBl63PzyhDpQFXFA1uYjFCMF5cb5jXKR7VtNWQ330SlZbCx3zY+v\n\tHQKjIw2+Q+cLec+LjrSi3PcXhKp7Q3AJqm6qLQn/KZUisFbU1Dr3fiES7yaqQs7mGw\n\tMsZXnRF7+QzRZezP6eioxWpusKIBejlHED7BSlTQ=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 15/33] libcamera: rkisp1: Move useDewarper_ flag into\n\tRkISP1CameraData", "Date": "Tue, 30 Sep 2025 14:26:36 +0200", "Message-ID": "<20250930122726.1837524-16-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20250930122726.1837524-1-stefan.klug@ideasonboard.com>", "References": "<20250930122726.1837524-1-stefan.klug@ideasonboard.com>", "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": "The decision if the dewarper shall be used is not per pipeline but per\ncamera and per configuration (raw streams can't use it). Move the\ncorresponding flag into the camera data class. Rename the flag to\n\"usesDewarper\" which is easier understand when we later add the ability\nto enable/disable the dewarper on a per camera basis which will be\nexpressed using a \"canUseDewarper\" flag.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 28 ++++++++++++------------\n 1 file changed, 14 insertions(+), 14 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex d5790864d026..6550469842e1 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -123,6 +123,8 @@ public:\n \t */\n \tMediaPipeline pipe_;\n \n+\tbool usesDewarper_;\n+\n private:\n \tvoid paramsComputed(unsigned int frame, unsigned int bytesused);\n \tvoid setSensorControls(unsigned int frame,\n@@ -234,7 +236,6 @@ private:\n \n \tstd::unique_ptr<V4L2M2MConverter> dewarper_;\n \tRectangle scalerMaxCrop_;\n-\tbool useDewarper_;\n \n \tstd::optional<Rectangle> activeCrop_;\n \n@@ -285,7 +286,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n \t\tstatBuffer = pipe_->availableStatBuffers_.front();\n \t\tpipe_->availableStatBuffers_.pop();\n \n-\t\tif (pipe_->useDewarper_) {\n+\t\tif (data->usesDewarper_) {\n \t\t\tmainPathBuffer = pipe_->availableMainPathBuffers_.front();\n \t\t\tpipe_->availableMainPathBuffers_.pop();\n \t\t}\n@@ -715,8 +716,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n */\n \n PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n-\t: PipelineHandler(manager, kRkISP1MaxQueuedRequests),\n-\t hasSelfPath_(true), useDewarper_(false)\n+\t: PipelineHandler(manager, kRkISP1MaxQueuedRequests), hasSelfPath_(true)\n {\n }\n \n@@ -879,7 +879,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \tconst PixelFormat &streamFormat = config->at(0).pixelFormat;\n \tconst PixelFormatInfo &info = PixelFormatInfo::info(streamFormat);\n \tisRaw_ = info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n-\tuseDewarper_ = dewarper_ && !isRaw_;\n+\tdata->usesDewarper_ = dewarper_ && !isRaw_;\n \n \t/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */\n \tif (!isRaw_)\n@@ -893,7 +893,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t\t/* imx8mp has only a single path. */\n \t\tconst auto &cfg = config->at(0);\n \t\tSize ispCrop = format.size.boundedToAspectRatio(cfg.size);\n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\tispCrop = dewarper_->adjustInputSize(cfg.pixelFormat,\n \t\t\t\t\t\t\t ispCrop);\n \t\telse\n@@ -934,7 +934,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \t\t\tstreamConfig[0] = IPAStream(cfg.pixelFormat,\n \t\t\t\t\t\t cfg.size);\n \t\t\t/* Configure dewarp */\n-\t\t\tif (dewarper_ && !isRaw_) {\n+\t\t\tif (data->usesDewarper_) {\n \t\t\t\toutputCfgs.push_back(const_cast<StreamConfiguration &>(cfg));\n \t\t\t\tret = dewarper_->configure(cfg, outputCfgs);\n \t\t\t\tif (ret)\n@@ -999,7 +999,7 @@ int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, S\n \t\t * It has mainpath and no self path. Hence, export buffers from\n \t\t * dewarper just for the main path stream, for now.\n \t\t */\n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\treturn dewarper_->exportBuffers(&data->mainPathStream_, count, buffers);\n \t\telse\n \t\t\treturn mainPath_.exportBuffers(count, buffers);\n@@ -1033,7 +1033,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n \t}\n \n \t/* If the dewarper is being used, allocate internal buffers for ISP. */\n-\tif (useDewarper_) {\n+\tif (data->usesDewarper_) {\n \t\tret = mainPath_.exportBuffers(kRkISP1MinBufferCount, &mainPathBuffers_);\n \t\tif (ret < 0)\n \t\t\treturn ret;\n@@ -1158,7 +1158,7 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL\n \t\t}\n \t\tactions += [&]() { stat_->streamOff(); };\n \n-\t\tif (useDewarper_) {\n+\t\tif (data->usesDewarper_) {\n \t\t\tret = dewarper_->start();\n \t\t\tif (ret) {\n \t\t\t\tLOG(RkISP1, Error) << \"Failed to start dewarper\";\n@@ -1215,7 +1215,7 @@ void PipelineHandlerRkISP1::stopDevice(Camera *camera)\n \t\t\tLOG(RkISP1, Warning)\n \t\t\t\t<< \"Failed to stop parameters for \" << camera->id();\n \n-\t\tif (useDewarper_)\n+\t\tif (data->usesDewarper_)\n \t\t\tdewarper_->stop();\n \t}\n \n@@ -1311,7 +1311,7 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)\n {\n \tControlInfoMap::Map controls;\n \n-\tif (dewarper_) {\n+\tif (data->usesDewarper_) {\n \t\tstd::pair<Rectangle, Rectangle> cropLimits;\n \t\tif (dewarper_->isConfigured(&data->mainPathStream_))\n \t\t\tcropLimits = dewarper_->inputCropBounds(&data->mainPathStream_);\n@@ -1479,7 +1479,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \t\t\t\tthis, &PipelineHandlerRkISP1::dewarpBufferReady);\n \n \t\t\tLOG(RkISP1, Info)\n-\t\t\t\t<< \"Using DW100 dewarper \" << dewarper_->deviceNode();\n+\t\t\t\t<< \"Found DW100 dewarper \" << dewarper_->deviceNode();\n \t\t} else {\n \t\t\tLOG(RkISP1, Warning)\n \t\t\t\t<< \"Found DW100 dewarper \" << dewarper_->deviceNode()\n@@ -1584,7 +1584,7 @@ void PipelineHandlerRkISP1::imageBufferReady(FrameBuffer *buffer)\n \t\t\tinfo->metadataProcessed = true;\n \t}\n \n-\tif (!useDewarper_) {\n+\tif (!data->usesDewarper_) {\n \t\tcompleteBuffer(request, buffer);\n \t\ttryCompleteRequest(info);\n \n", "prefixes": [ "v1", "15/33" ] }