Patch Detail
Show a patch.
GET /api/1.1/patches/10121/?format=api
{ "id": 10121, "url": "https://patchwork.libcamera.org/api/1.1/patches/10121/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10121/", "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": "<20201020074229.119151-1-hiroh@chromium.org>", "date": "2020-10-20T07:42:26", "name": "[libcamera-devel,v2,1/4] android: Modify PostProcessor interface", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2d4dc6b54610b0545adf9a33c2197e04650f6bd7", "submitter": { "id": 63, "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api", "name": "Hirokazu Honda", "email": "hiroh@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10121/mbox/", "series": [ { "id": 1389, "url": "https://patchwork.libcamera.org/api/1.1/series/1389/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1389", "date": "2020-10-20T07:42:26", "name": "[libcamera-devel,v2,1/4] android: Modify PostProcessor interface", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1389/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10121/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10121/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 87DCFBDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Oct 2020 07:42:41 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A270613B4;\n\tTue, 20 Oct 2020 09:42:41 +0200 (CEST)", "from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com\n\t[IPv6:2607:f8b0:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 124DF61373\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Oct 2020 09:42:39 +0200 (CEST)", "by mail-pl1-x62a.google.com with SMTP id y1so578392plp.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Oct 2020 00:42:38 -0700 (PDT)", "from hiroh.tok.corp.google.com\n\t([2401:fa00:8f:2:de4a:3eff:fe7d:f78f])\n\tby smtp.gmail.com with ESMTPSA id\n\td26sm1193684pfo.82.2020.10.20.00.42.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 20 Oct 2020 00:42:36 -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=\"HjB6j1nV\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; h=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=KnajaLNsKfoDlc1CN0qMNCfYL0YiPngBQIC/4FGwMBs=;\n\tb=HjB6j1nVg9cvWdzr43RpwD78d17sPvg47pO+g0E8C6Q+fPhz96wIWf6UpsHeoCTLey\n\t0/OAMoJw2Fx67cJCh9buS6SoFd2h4/A42e4r4ONooPAjxzKyhBAp5S9k2cttEjs334w1\n\t1Ttcx2yzblJlLmJILVbzckkApZD+TvYP83RYA=", "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:mime-version\n\t:content-transfer-encoding;\n\tbh=KnajaLNsKfoDlc1CN0qMNCfYL0YiPngBQIC/4FGwMBs=;\n\tb=lspVoREQo1bBDmkGXEDYlS8lQLN1IAnFg2D6hrIKN4VtNBu5xkcM0Oc5lyZ8p7NhBi\n\t2DtDZHX5SOoUmv3QjByKZOPpHDcjAeUlCTu8iVKJCwHyaV3yXC7ByPQSQh6YYSC2dha3\n\tRNabhzD+hxejAkKgixhj6bZYaG9UjR3PB4EXU1TowbhJ6Wm1bsf4OXuM/Ax3t1Df0vDr\n\t2HA4Xboh8hwm9n9CMWadel6E18yfPtNPCGvHkAkfJVB4tcJqNVsMRG3r5sRh8mdn9RsV\n\tmWb0BtJWz/zTP+3cPoWUomN9sAwNEaJSH4mzQ5Oz+39mzKM2RDcO8QnEiwg6bda1dhot\n\t3xhg==", "X-Gm-Message-State": "AOAM533CcbmW1bsVXOzd708UKLV1Ra6d0zV4Rd5jZFDmXyYnVBy82Zz+\n\tsp41z36FnfL4HAc/e04TBAOmU76e/hcHaw==", "X-Google-Smtp-Source": "ABdhPJyb6Ek1wqsvsyRy1xH9GbX8FIk0/0m9mXd7k1ujy6e2xUQw3lFtTNdgDmAbMm3Yxnx5n+SnCQ==", "X-Received": "by 2002:a17:902:ff14:b029:d3:f1e5:c992 with SMTP id\n\tf20-20020a170902ff14b02900d3f1e5c992mr1778085plj.72.1603179757417; \n\tTue, 20 Oct 2020 00:42:37 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 20 Oct 2020 16:42:26 +0900", "Message-Id": "<20201020074229.119151-1-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.29.0.rc1.297.gfa9743e501-goog", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 1/4] android: Modify PostProcessor\n\tinterface", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "In PostProcessor::process(), the |source| argument doesn't have\nto be a pointer. This replace its type, const pointer, with const\nreference as the latter is preferred to the former.\nlibcamera::Span is cheap to construct/copy/move. We should deal\nwith the type as pass-by-value parameter. Therefore this also\ndrops the const reference in the |destination| argument.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_stream.cpp | 2 +-\n src/android/jpeg/post_processor_jpeg.cpp | 6 +++---\n src/android/jpeg/post_processor_jpeg.h | 4 ++--\n src/android/post_processor.h | 4 ++--\n 4 files changed, 8 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 1b8afa8..28a6e09 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -102,7 +102,7 @@ int CameraStream::process(const libcamera::FrameBuffer &source,\n \tif (!postProcessor_)\n \t\treturn 0;\n \n-\treturn postProcessor_->process(&source, dest->maps()[0], metadata);\n+\treturn postProcessor_->process(source, dest->maps()[0], metadata);\n }\n \n FrameBuffer *CameraStream::getBuffer()\ndiff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\nindex 753c28e..55b9088 100644\n--- a/src/android/jpeg/post_processor_jpeg.cpp\n+++ b/src/android/jpeg/post_processor_jpeg.cpp\n@@ -44,8 +44,8 @@ int PostProcessorJpeg::configure(const StreamConfiguration &inCfg,\n \treturn encoder_->configure(inCfg);\n }\n \n-int PostProcessorJpeg::process(const libcamera::FrameBuffer *source,\n-\t\t\t const libcamera::Span<uint8_t> &destination,\n+int PostProcessorJpeg::process(const libcamera::FrameBuffer &source,\n+\t\t\t libcamera::Span<uint8_t> destination,\n \t\t\t CameraMetadata *metadata)\n {\n \tif (!encoder_)\n@@ -67,7 +67,7 @@ int PostProcessorJpeg::process(const libcamera::FrameBuffer *source,\n \tif (exif.generate() != 0)\n \t\tLOG(JPEG, Error) << \"Failed to generate valid EXIF data\";\n \n-\tint jpeg_size = encoder_->encode(source, destination, exif.data());\n+\tint jpeg_size = encoder_->encode(&source, destination, exif.data());\n \tif (jpeg_size < 0) {\n \t\tLOG(JPEG, Error) << \"Failed to encode stream image\";\n \t\treturn jpeg_size;\ndiff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h\nindex 62c8650..ae636ff 100644\n--- a/src/android/jpeg/post_processor_jpeg.h\n+++ b/src/android/jpeg/post_processor_jpeg.h\n@@ -23,8 +23,8 @@ public:\n \n \tint configure(const libcamera::StreamConfiguration &incfg,\n \t\t const libcamera::StreamConfiguration &outcfg) override;\n-\tint process(const libcamera::FrameBuffer *source,\n-\t\t const libcamera::Span<uint8_t> &destination,\n+\tint process(const libcamera::FrameBuffer &source,\n+\t\t libcamera::Span<uint8_t> destination,\n \t\t CameraMetadata *metadata) override;\n \n private:\ndiff --git a/src/android/post_processor.h b/src/android/post_processor.h\nindex a891c43..5f87a5d 100644\n--- a/src/android/post_processor.h\n+++ b/src/android/post_processor.h\n@@ -20,8 +20,8 @@ public:\n \n \tvirtual int configure(const libcamera::StreamConfiguration &inCfg,\n \t\t\t const libcamera::StreamConfiguration &outCfg) = 0;\n-\tvirtual int process(const libcamera::FrameBuffer *source,\n-\t\t\t const libcamera::Span<uint8_t> &destination,\n+\tvirtual int process(const libcamera::FrameBuffer &source,\n+\t\t\t libcamera::Span<uint8_t> destination,\n \t\t\t CameraMetadata *metadata) = 0;\n };\n \n", "prefixes": [ "libcamera-devel", "v2", "1/4" ] }