Patch Detail
Show a patch.
GET /api/patches/12287/?format=api
{ "id": 12287, "url": "https://patchwork.libcamera.org/api/patches/12287/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12287/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210514064303.798045-4-paul.elder@ideasonboard.com>", "date": "2021-05-14T06:43:03", "name": "[libcamera-devel,v5,3/3] android: jpeg: post_processor: Use the new metadata functions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f8741b738cf779b9c0e33d39b2d33c757fe57640", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12287/mbox/", "series": [ { "id": 2028, "url": "https://patchwork.libcamera.org/api/series/2028/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2028", "date": "2021-05-14T06:43:00", "name": "Auto-resize CameraMetadata", "version": 5, "mbox": "https://patchwork.libcamera.org/series/2028/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12287/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12287/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 19400C31F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 14 May 2021 06:43:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D209D68929;\n\tFri, 14 May 2021 08:43:30 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77EC768923\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 May 2021 08:43:29 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A1DE29F0;\n\tFri, 14 May 2021 08:43:27 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"lul7Cuw3\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1620974609;\n\tbh=Eyziw5oMErkJuocq4vAEo09DeHrAGEbTZfzrhvydDg8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=lul7Cuw3NZiETot/ysKcspOIwSgnpIP1LWl03jyGKyFSISZOPRyvaxz2PswcW9dcK\n\tQndOJQX/L8WhPY0lT5U2slTkHZ2FLqAQmz3rUNxsA3euW1zGbfyh3qllunNfKfMtdl\n\tNshx8PJUm85dSX5hZ3K2R37r36Hv1ad1xDT67CWA=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 14 May 2021 15:43:03 +0900", "Message-Id": "<20210514064303.798045-4-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20210514064303.798045-1-paul.elder@ideasonboard.com>", "References": "<20210514064303.798045-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 3/3] android: jpeg: post_processor: Use\n\tthe new metadata functions", "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=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Now that CameraMetadata supports more convenient functions, use those\ninstead.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n---\nNo change in v5\n\nNo change in v4\n\nNew in v3\n---\n src/android/jpeg/post_processor_jpeg.cpp | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\nindex 3bf16996..2ecf5578 100644\n--- a/src/android/jpeg/post_processor_jpeg.cpp\n+++ b/src/android/jpeg/post_processor_jpeg.cpp\n@@ -15,6 +15,7 @@\n #include \"exif.h\"\n \n #include <libcamera/formats.h>\n+#include <libcamera/span.h>\n \n #include \"libcamera/internal/log.h\"\n \n@@ -103,7 +104,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \tret = requestMetadata.getEntry(ANDROID_JPEG_ORIENTATION, &entry);\n \n \tconst uint32_t jpegOrientation = ret ? *entry.data.i32 : 0;\n-\tresultMetadata->addEntry(ANDROID_JPEG_ORIENTATION, &jpegOrientation, 1);\n+\tresultMetadata->addEntry(ANDROID_JPEG_ORIENTATION, jpegOrientation);\n \texif.setOrientation(jpegOrientation);\n \n \texif.setSize(streamSize_);\n@@ -129,7 +130,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \tif (ret) {\n \t\texif.setGPSDateTimestamp(*entry.data.i64);\n \t\tresultMetadata->addEntry(ANDROID_JPEG_GPS_TIMESTAMP,\n-\t\t\t\t\t entry.data.i64, 1);\n+\t\t\t\t\t *entry.data.i64);\n \t}\n \n \tret = requestMetadata.getEntry(ANDROID_JPEG_THUMBNAIL_SIZE, &entry);\n@@ -140,7 +141,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \n \t\tret = requestMetadata.getEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, &entry);\n \t\tuint8_t quality = ret ? *entry.data.u8 : 95;\n-\t\tresultMetadata->addEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, &quality, 1);\n+\t\tresultMetadata->addEntry(ANDROID_JPEG_THUMBNAIL_QUALITY, quality);\n \n \t\tif (thumbnailSize != Size(0, 0)) {\n \t\t\tstd::vector<unsigned char> thumbnail;\n@@ -172,7 +173,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \n \tret = requestMetadata.getEntry(ANDROID_JPEG_QUALITY, &entry);\n \tconst uint8_t quality = ret ? *entry.data.u8 : 95;\n-\tresultMetadata->addEntry(ANDROID_JPEG_QUALITY, &quality, 1);\n+\tresultMetadata->addEntry(ANDROID_JPEG_QUALITY, quality);\n \n \tint jpeg_size = encoder_->encode(source, destination->plane(0),\n \t\t\t\t\t exif.data(), quality);\n@@ -190,7 +191,7 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \tblob->jpeg_size = jpeg_size;\n \n \t/* Update the JPEG result Metadata. */\n-\tresultMetadata->addEntry(ANDROID_JPEG_SIZE, &jpeg_size, 1);\n+\tresultMetadata->addEntry(ANDROID_JPEG_SIZE, jpeg_size);\n \n \treturn 0;\n }\n", "prefixes": [ "libcamera-devel", "v5", "3/3" ] }