Patch Detail
Show a patch.
GET /api/1.1/patches/10151/?format=api
{ "id": 10151, "url": "https://patchwork.libcamera.org/api/1.1/patches/10151/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10151/", "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": "<20201021013955.301790-1-hiroh@chromium.org>", "date": "2020-10-21T01:39:52", "name": "[libcamera-devel,v3,1/4] android: Modify PostProcessor interface", "commit_ref": "b8dd5ce944eca4d17df585bb059595729905f7ec", "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/10151/mbox/", "series": [ { "id": 1395, "url": "https://patchwork.libcamera.org/api/1.1/series/1395/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1395", "date": "2020-10-21T01:39:52", "name": "[libcamera-devel,v3,1/4] android: Modify PostProcessor interface", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1395/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10151/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10151/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 C2B89BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Oct 2020 01:40:05 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A48F60350;\n\tWed, 21 Oct 2020 03:40:05 +0200 (CEST)", "from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com\n\t[IPv6:2607:f8b0:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3061D60350\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Oct 2020 03:40:04 +0200 (CEST)", "by mail-pg1-x52b.google.com with SMTP id x13so462507pgp.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Oct 2020 18:40:04 -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\tw2sm368066pgi.56.2020.10.20.18.40.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 20 Oct 2020 18:40:01 -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=\"VNgDkRxE\"; 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=hMwZvuv76r0YbJRKt3pnmTGsLoXKw4TVQfjOvprmc8Q=;\n\tb=VNgDkRxEsO9wFePTU18nNyLWlyHa4RkVEfS/WVMx1mUC80ylu5blA0gECM+jzKh2S4\n\tFPz5kyvDbQi27puE41HCfRnh112AWoQh3xacoXAofT9VVwslurjTn4UTSZ4UjpL8/Dmo\n\tz/Ud3+JfxCiRIsEzaK0yAtqU7oRCXYNfNOHnk=", "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=hMwZvuv76r0YbJRKt3pnmTGsLoXKw4TVQfjOvprmc8Q=;\n\tb=Lgl8vb62AgpyEgpNwqqY2nKoiH5K9QjK2jUgz5l+NPgs7RWRG2pXi/SktdWPepw1Zg\n\tIq8WltHtfb/7cRzAQJk6B7DTJ/IxvQHyuXEWwd7+Y/T70El+XK2L8bRpSHKLFVw8d86s\n\tv761WhChl3Ylp33AXjRbl848H32zMX7heRloNCemv1FOInQ+YH9lNmYkISb87Qc/l/DF\n\ttLO7LON1i3UIMdIys4qiZkk1p7vs4zzHt7Ua45l0srV4WLmNPNzMPOE0EtOBXlX+i+qG\n\tgtXz7uh+2vkdesJ1Xut5R3mw5OpFBnZhbqLCVvYEBCNAW/LBNTL8R1YxJKfm9FU/s6sO\n\t7wng==", "X-Gm-Message-State": "AOAM533Gk+k5lXKZihb0BC+tCi2ZsjI+sQ5bFnTCPoy4n/qBC5PpnFZq\n\taNyRbfrnShX4i4cAxz7eKuwh7nbH+h271g==", "X-Google-Smtp-Source": "ABdhPJy2DW4UH2f5pmlopKnMWpOmPAeB201KyxvsKpHbPyj4kFFukzGz3IYWvOUdvYPZt9Tus1xf9w==", "X-Received": "by 2002:a63:cb51:: with SMTP id m17mr948642pgi.337.1603244402155;\n\tTue, 20 Oct 2020 18:40:02 -0700 (PDT)", "From": "Hirokazu Honda <hiroh@chromium.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 21 Oct 2020 10:39:52 +0900", "Message-Id": "<20201021013955.301790-1-hiroh@chromium.org>", "X-Mailer": "git-send-email 2.29.0.rc1.297.gfa9743e501-goog", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 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 replaces its type, const pointer, with\nconst reference 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>\nReviewed-by: Umang Jain <email@uajain.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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 eae451e..3e5d6be 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 9d452b7..90bf10d 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", "v3", "1/4" ] }