{"id":23026,"url":"https://patchwork.libcamera.org/api/patches/23026/?format=json","web_url":"https://patchwork.libcamera.org/patch/23026/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250326075129.1705736-3-paul.elder@ideasonboard.com>","date":"2025-03-26T07:51:26","name":"[2/3] libcamera: v4l2_videodevice: Report offset in dequeueBuffer","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"5274fbefdb200a71bf72ed06931aec5477ec39a3","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23026/mbox/","series":[{"id":5080,"url":"https://patchwork.libcamera.org/api/series/5080/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5080","date":"2025-03-26T07:51:24","name":"libcamera: framebuffer: Add offset","version":1,"mbox":"https://patchwork.libcamera.org/series/5080/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23026/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23026/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 27DF0C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Mar 2025 07:52:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8BEA56895B;\n\tWed, 26 Mar 2025 08:52:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7658D617F1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Mar 2025 08:51:59 +0100 (CET)","from neptunite.flets-east.jp (unknown\n\t[IPv6:2404:7a81:160:2100:7402:917d:ea0c:6d4c])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BE6FA99F;\n\tWed, 26 Mar 2025 08:50:10 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OXGy+XPU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1742975411;\n\tbh=HTwNF5ZECDgbsbM/c+vkcyeMGKFGEVmUwzMm18jwLSs=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=OXGy+XPUqL+HAM01yWTx0HdAk9MF+/Px0XgDg0qdx9H/LxWXJS0ifPg16nQPwYKQn\n\tjtC3EYKiNHIE/CX4YPhXt5p4lXO/QWvgkYd5Buq2PT7CNQoQDrgOuyEKaBBarU4muC\n\tpE5ICVBrVgojj28HxPh6bPdhe3vBGkz3+j1i7lV4=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Paul Elder <paul.elder@ideasonboard.com>","Subject":"[PATCH 2/3] libcamera: v4l2_videodevice: Report offset in\n\tdequeueBuffer","Date":"Wed, 26 Mar 2025 16:51:26 +0900","Message-ID":"<20250326075129.1705736-3-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.47.2","In-Reply-To":"<20250326075129.1705736-1-paul.elder@ideasonboard.com>","References":"<20250326075129.1705736-1-paul.elder@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":"Fill in the offset field of the frame metadata so that it the\napplication can read it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex f5b3fa09d9a0..5d163f7fd853 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1957,10 +1957,13 @@ FrameBuffer *V4L2VideoDevice::dequeueBuffer()\n \t\t * The number of planes in the frame buffer and in the\n \t\t * V4L2 buffer is guaranteed to be equal at this point.\n \t\t */\n-\t\tfor (unsigned int i = 0; i < numV4l2Planes; ++i)\n+\t\tfor (unsigned int i = 0; i < numV4l2Planes; ++i) {\n \t\t\tmetadata.planes()[i].bytesused = planes[i].bytesused;\n+\t\t\tmetadata.planes()[i].offset = planes[i].data_offset;\n+\t\t}\n \t} else {\n \t\tmetadata.planes()[0].bytesused = buf.bytesused;\n+\t\tmetadata.planes()[0].offset = buf.m.offset;\n \t}\n \n \treturn buffer;\n","prefixes":["2/3"]}