Patch Detail
Show a patch.
GET /api/1.1/patches/9377/?format=api
{ "id": 9377, "url": "https://patchwork.libcamera.org/api/1.1/patches/9377/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9377/", "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": "<20200824204646.16866-3-email@uajain.com>", "date": "2020-08-24T20:46:54", "name": "[libcamera-devel,2/3] android: jpeg: Pass a Exif object while encoding", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "9c400bd8fa74364902c5174a81b8a06425d14269", "submitter": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/people/1/?format=api", "name": "Umang Jain", "email": "email@uajain.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9377/mbox/", "series": [ { "id": 1240, "url": "https://patchwork.libcamera.org/api/1.1/series/1240/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1240", "date": "2020-08-24T20:46:53", "name": "Initial EXIF metadata support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1240/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9377/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9377/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 BF529BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Aug 2020 20:46:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC44462849;\n\tMon, 24 Aug 2020 22:46:57 +0200 (CEST)", "from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54E8E62113\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Aug 2020 22:46:55 +0200 (CEST)", "by filterdrecv-p3iad2-canary-d97c86fd5-k8f6p with SMTP id\n\tfilterdrecv-p3iad2-canary-d97c86fd5-k8f6p-18-5F44273D-4F\n\t2020-08-24 20:46:54.080920535 +0000 UTC m=+18539.274374053", "from mail.uajain.com (unknown)\n\tby ismtpd0001p1hnd1.sendgrid.net (SG) with ESMTP id\n\t3W2yccn9TLiNS34kIun2Dg for <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Aug 2020 20:46:53.758 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"N5gJSM//\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:in-reply-to:references:mime-version:to:cc:\n\tcontent-transfer-encoding:content-type;\n\ts=s1; bh=8/qcuugyt4BWpSoJ4t9q0NrplB2eQ4owPbxugcT20d8=;\n\tb=N5gJSM//BuKaLrKJ+3n8WpuYRlD4cP7G7m3PjRC1+jXeizUfsbmM0Fzma5JqCwEtXhJT\n\tRczbrHpdSyySxRznNFXNYRjmO/1RRI9Q01tYGDJvwiTOIdtJVUC0hdq42020/nyLNpPjZO\n\tNU8wRnZVozzOEskDvL2S9+hczDB7hRz28=", "From": "Umang Jain <email@uajain.com>", "Date": "Mon, 24 Aug 2020 20:46:54 +0000 (UTC)", "Message-Id": "<20200824204646.16866-3-email@uajain.com>", "In-Reply-To": "<20200824204646.16866-1-email@uajain.com>", "References": "<20200824204646.16866-1-email@uajain.com>", "Mime-Version": "1.0", "X-SG-EID": "1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcROc560Os82e1tQwAlD2FoKZ1gYInNEr2A12ZKoe3r+iLhS1vvkgcNXhQkusThCRA0/CDIz+Nxjf7yVPmFVbgnN6ROcO+aepCj5mVNhi51K3eJTIkQCsNjKnZQ71h1rMjJdj/OZgLJouyTRyrXMEIi6cgBwj4rEgGgbMStbw75m5Q7ioun+LDUZN/48uVUuP8/xdm4bmW3M+PRg14XRQGR/DCC7K0VBY2g6q0E6W5ps4=", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[libcamera-devel] [PATCH 2/3] android: jpeg: Pass a Exif object\n\twhile encoding", "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": "Create a Exif object when the jpeg encoder is about to start\nencoding the stream in CameraDevice::requestComplete(). This is\ndone so that the CameraDevice's metadata (like Orientation) can\nbe populated inside the Exif object and passed on to the encoder\n(which will populate FrameBuffer associated metadata).\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/android/camera_device.cpp | 4 +++-\n src/android/jpeg/encoder.h | 5 ++++-\n src/android/jpeg/encoder_libjpeg.cpp | 3 ++-\n src/android/jpeg/encoder_libjpeg.h | 3 ++-\n 4 files changed, 11 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex de6f86f..bc5690e 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1434,7 +1434,9 @@ void CameraDevice::requestComplete(Request *request)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tint jpeg_size = encoder->encode(buffer, mapped.maps()[0]);\n+\t\tExif exif;\n+\n+\t\tint jpeg_size = encoder->encode(buffer, mapped.maps()[0], &exif);\n \t\tif (jpeg_size < 0) {\n \t\t\tLOG(HAL, Error) << \"Failed to encode stream image\";\n \t\t\tstatus = CAMERA3_BUFFER_STATUS_ERROR;\ndiff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h\nindex f9eb88e..806cf4f 100644\n--- a/src/android/jpeg/encoder.h\n+++ b/src/android/jpeg/encoder.h\n@@ -7,6 +7,8 @@\n #ifndef __ANDROID_JPEG_ENCODER_H__\n #define __ANDROID_JPEG_ENCODER_H__\n \n+#include \"exif.h\"\n+\n #include <libcamera/buffer.h>\n #include <libcamera/span.h>\n #include <libcamera/stream.h>\n@@ -18,7 +20,8 @@ public:\n \n \tvirtual int configure(const libcamera::StreamConfiguration &cfg) = 0;\n \tvirtual int encode(const libcamera::FrameBuffer *source,\n-\t\t\t const libcamera::Span<uint8_t> &destination) = 0;\n+\t\t\t const libcamera::Span<uint8_t> &destination,\n+\t\t\t Exif *exif) = 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 977538c..0cd93b6 100644\n--- a/src/android/jpeg/encoder_libjpeg.cpp\n+++ b/src/android/jpeg/encoder_libjpeg.cpp\n@@ -180,7 +180,8 @@ void EncoderLibJpeg::compressNV(const libcamera::MappedBuffer *frame)\n }\n \n int EncoderLibJpeg::encode(const FrameBuffer *source,\n-\t\t\t const libcamera::Span<uint8_t> &dest)\n+\t\t\t const libcamera::Span<uint8_t> &dest,\n+\t\t\t Exif *exif)\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 aed081a..7e0757a 100644\n--- a/src/android/jpeg/encoder_libjpeg.h\n+++ b/src/android/jpeg/encoder_libjpeg.h\n@@ -22,7 +22,8 @@ public:\n \n \tint configure(const libcamera::StreamConfiguration &cfg) override;\n \tint encode(const libcamera::FrameBuffer *source,\n-\t\t const libcamera::Span<uint8_t> &destination) override;\n+\t\t const libcamera::Span<uint8_t> &destination,\n+\t\t Exif *exif) override;\n \n private:\n \tvoid compressRGB(const libcamera::MappedBuffer *frame);\n", "prefixes": [ "libcamera-devel", "2/3" ] }