{"id":10211,"url":"https://patchwork.libcamera.org/api/patches/10211/?format=json","web_url":"https://patchwork.libcamera.org/patch/10211/","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":"<20201023053150.84411-2-email@uajain.com>","date":"2020-10-23T05:31:50","name":"[libcamera-devel,v2,2/2] android: jpeg: encoder: Use pass-by-value for Exif parameter","commit_ref":"c430d39d203488cf93ab4f12ff9eb8b3c6380212","pull_url":null,"state":"accepted","archived":false,"hash":"4e8ff68970c386fc1d8413f8dd9ffebf840381d3","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/?format=json","name":"Umang Jain","email":"email@uajain.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10211/mbox/","series":[{"id":1407,"url":"https://patchwork.libcamera.org/api/series/1407/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1407","date":"2020-10-23T05:31:49","name":"[libcamera-devel,v2,1/2] android: jpeg: Drop \"libcamera::\" namespace from functions' arguments","version":2,"mbox":"https://patchwork.libcamera.org/series/1407/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10211/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10211/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 D71E3BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Oct 2020 05:32:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1F30615D7;\n\tFri, 23 Oct 2020 07:32:00 +0200 (CEST)","from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CE24E6034E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Oct 2020 07:31:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"Z2rppbHv\"; dkim-atps=neutral","From":"Umang Jain <email@uajain.com>","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1603431119; bh=ycyHxIzJlXwml5LUGNNrlNAqjOZxN21PQgWMSvhDU7A=;\n\th=From:To:Cc:Subject:In-Reply-To:References;\n\tb=Z2rppbHvJKF2VGjL1z7EHkzuFxkZQYUiM/W9urYaJ89wpEL3qcmJPHaN2SW/phIyi\n\tsnqdZ9IFe+ivXZ8pd1LtWTet3OhAo5Y3Gej3gsVgIcL6KIJ60gawMdeVEr31Ml+qOE\n\ta17rVbKZkdEgOdQEZZnnw98rbg+AWoRPROC8SypAwiX2Ceouds/4hQH/WA4VIfqiKB\n\tYxY7d/42moY2IOgPCtRcWldYkkIH4lqnqdHcUoWmVIkAbPrXWXQGbCzMbzi77Fu3l1\n\tjmj7ZkPfISfxRwfI9kLQ14DZEQeQBJdDevnRCTAfaGHNytfh4Skrs9WBUNYYYjIWUp\n\tzdONY6ItWBanQ==","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 23 Oct 2020 11:01:50 +0530","Message-Id":"<20201023053150.84411-2-email@uajain.com>","In-Reply-To":"<20201023053150.84411-1-email@uajain.com>","References":"<20201023053150.84411-1-email@uajain.com>","Mime-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 2/2] android: jpeg: encoder: Use\n\tpass-by-value for Exif parameter","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":"Following the reasoning of pass-by-value for libcamera::Span\nparameters from 90c193f2a700(\"android: Modify Encoder interface\") i.e.\nthey are easy to copy/move/construct, align the Exif parameter passing\nto the encoder interface in this consistent way.\n\nSigned-off-by: Umang Jain <email@uajain.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/jpeg/encoder.h           | 2 +-\n src/android/jpeg/encoder_libjpeg.cpp | 2 +-\n src/android/jpeg/encoder_libjpeg.h   | 2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)","diff":"diff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h\nindex 270ea60..94b3340 100644\n--- a/src/android/jpeg/encoder.h\n+++ b/src/android/jpeg/encoder.h\n@@ -19,7 +19,7 @@ public:\n \tvirtual int configure(const libcamera::StreamConfiguration &cfg) = 0;\n \tvirtual int encode(const libcamera::FrameBuffer &source,\n \t\t\t   libcamera::Span<uint8_t> destination,\n-\t\t\t   const libcamera::Span<const uint8_t> &exifData) = 0;\n+\t\t\t   libcamera::Span<const uint8_t> exifData) = 0;\n };\n \n #endif /* __ANDROID_JPEG_ENCODER_H__ */\ndiff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp\nindex 4bea10c..cfa5332 100644\n--- a/src/android/jpeg/encoder_libjpeg.cpp\n+++ b/src/android/jpeg/encoder_libjpeg.cpp\n@@ -180,7 +180,7 @@ void EncoderLibJpeg::compressNV(const MappedBuffer *frame)\n }\n \n int EncoderLibJpeg::encode(const FrameBuffer &source, Span<uint8_t> dest,\n-\t\t\t   const Span<const uint8_t> &exifData)\n+\t\t\t   Span<const uint8_t> exifData)\n {\n \tMappedFrameBuffer frame(&source, PROT_READ);\n \tif (!frame.isValid()) {\ndiff --git a/src/android/jpeg/encoder_libjpeg.h b/src/android/jpeg/encoder_libjpeg.h\nindex 391a53c..40505dd 100644\n--- a/src/android/jpeg/encoder_libjpeg.h\n+++ b/src/android/jpeg/encoder_libjpeg.h\n@@ -23,7 +23,7 @@ public:\n \tint configure(const libcamera::StreamConfiguration &cfg) override;\n \tint encode(const libcamera::FrameBuffer &source,\n \t\t   libcamera::Span<uint8_t> destination,\n-\t\t   const libcamera::Span<const uint8_t> &exifData) override;\n+\t\t   libcamera::Span<const uint8_t> exifData) override;\n \n private:\n \tvoid compressRGB(const libcamera::MappedBuffer *frame);\n","prefixes":["libcamera-devel","v2","2/2"]}