{"id":13360,"url":"https://patchwork.libcamera.org/api/patches/13360/?format=json","web_url":"https://patchwork.libcamera.org/patch/13360/","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":"<20210816043138.957984-3-hiroh@chromium.org>","date":"2021-08-16T04:31:30","name":"[libcamera-devel,RFC,02/10] libcamera: ipa_data_serializer: Modify (de)serialization for offset","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"35f05f6880abfad10ea7503480253c61460d1d66","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13360/mbox/","series":[{"id":2359,"url":"https://patchwork.libcamera.org/api/series/2359/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2359","date":"2021-08-16T04:31:28","name":"Add offset to FrameBuffer::Plane","version":1,"mbox":"https://patchwork.libcamera.org/series/2359/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13360/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13360/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 BE8A6BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Aug 2021 04:31:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7D1BD688A3;\n\tMon, 16 Aug 2021 06:31:52 +0200 (CEST)","from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com\n\t[IPv6:2607:f8b0:4864:20::62e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id ED090688A5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Aug 2021 06:31:49 +0200 (CEST)","by mail-pl1-x62e.google.com with SMTP id l11so19403618plk.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Aug 2021 21:31:49 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:6f5f:1479:a6ab:4229])\n\tby smtp.gmail.com with ESMTPSA id\n\tu10sm2767417pgj.48.2021.08.15.21.31.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 15 Aug 2021 21:31:47 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"a7COMVNi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=MvGbJNKDMTcMJvLM1bMSKiW53fH3DOp/ai6lDpTjr3s=;\n\tb=a7COMVNiu3/omF99ctQ4E3/aJRIXBe7fSFSggW3kqDz+aqGE6ewYpo9zKzNTM+XTtd\n\tkAbmkXucA35qrix9S+OCb3ErVdKSTHMJ83tvD/6JVM7mqwyDboEgucrRospm6okBsLbN\n\tbnoc/g04TJ5Jv5na3eAc6XpORmwDajF5wcjmY=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=MvGbJNKDMTcMJvLM1bMSKiW53fH3DOp/ai6lDpTjr3s=;\n\tb=iWA92HlrksY92Wiogdrgxxl7YrmleSDRz5hcUy/mTGdW6PkRi/A0AlzH7+NNCK9XBc\n\tbfA67zTl4XD3n9Ukzdc0I3i/i7IJCqgOOVySxfmrUp6BZ6RiqDoDwpW1wZ35GMK5isvh\n\tbTih+Wfh/OGnn4Qljiw25RIRb75k8W0wShVzMp5XjfNb7XUaSfjUVqIWqDwv7RphpoJe\n\tQTVInlZBjpzpXala/cmncE9+MryXUfyZsv8QE5ULQqQOXaUsoXy6OfEbzyh4q7KqlQga\n\tqc3maUHeQL9BgSqftilVlmRoT19PJe/RcqXreadBQU0nakbHs7nYLP3t17/8HQqnjL4f\n\tZHfQ==","X-Gm-Message-State":"AOAM531nQfnIvhwXP1cJ07ykHPB6zEsVHsIg9EJimh5/ON1zfPqaCcha\n\tedTgOm/QWM8JwvIYXjmU3YVA7yLbtMZxbw==","X-Google-Smtp-Source":"ABdhPJxJLFbn7ckW5Ov2fbY0WDqCvXhIPBjXu09y4N+rS/A+RIbbIJp0PjGOuvBY+6JaUQq3VcyV+w==","X-Received":"by 2002:a17:90a:4211:: with SMTP id\n\to17mr15290439pjg.176.1629088308238; \n\tSun, 15 Aug 2021 21:31:48 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 16 Aug 2021 13:31:30 +0900","Message-Id":"<20210816043138.957984-3-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.rc1.237.g0d66db33f3-goog","In-Reply-To":"<20210816043138.957984-1-hiroh@chromium.org>","References":"<20210816043138.957984-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 02/10] libcamera: ipa_data_serializer:\n\tModify (de)serialization for offset","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 offset variable is added to FrameBuffer::Plane. This modifies\nthe serialization and deserialization code for the offset variable.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/libcamera/ipa_data_serializer.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/ipa_data_serializer.cpp b/src/libcamera/ipa_data_serializer.cpp\nindex fb941e6b..144c3248 100644\n--- a/src/libcamera/ipa_data_serializer.cpp\n+++ b/src/libcamera/ipa_data_serializer.cpp\n@@ -562,6 +562,7 @@ FileDescriptor IPADataSerializer<FileDescriptor>::deserialize(const std::vector<\n  * FrameBuffer::Plane is serialized as:\n  *\n  * 1 byte  - FileDescriptor\n+ * 4 bytes - uint32_t Offset\n  * 4 bytes - uint32_t Length\n  */\n template<>\n@@ -580,6 +581,7 @@ IPADataSerializer<FrameBuffer::Plane>::serialize(const FrameBuffer::Plane &data,\n \tfdsVec.insert(fdsVec.end(), fdFds.begin(), fdFds.end());\n \n \tappendPOD<uint32_t>(dataVec, data.length);\n+\tappendPOD<uint32_t>(dataVec, data.offset);\n \n \treturn { dataVec, fdsVec };\n }\n@@ -596,7 +598,8 @@ IPADataSerializer<FrameBuffer::Plane>::deserialize(std::vector<uint8_t>::const_i\n \n \tret.fd = IPADataSerializer<FileDescriptor>::deserialize(dataBegin, dataBegin + 1,\n \t\t\t\t\t\t\t\tfdsBegin, fdsBegin + 1);\n-\tret.length = readPOD<uint32_t>(dataBegin, 1, dataEnd);\n+\tret.offset = readPOD<uint32_t>(dataBegin, 1, dataBegin + 2);\n+\tret.length = readPOD<uint32_t>(dataBegin + 1, 1, dataEnd);\n \n \treturn ret;\n }\n","prefixes":["libcamera-devel","RFC","02/10"]}