Patch Detail
Show a patch.
GET /api/1.1/patches/9204/?format=api
{ "id": 9204, "url": "https://patchwork.libcamera.org/api/1.1/patches/9204/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9204/", "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": "<20200804214711.177645-12-kieran.bingham@ideasonboard.com>", "date": "2020-08-04T21:47:09", "name": "[libcamera-devel,v3,11/13] android: camera_device: Generate ResultMetadata earlier", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0189d883f97e7d92db24a08523f9d5fd1abf067f", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9204/mbox/", "series": [ { "id": 1191, "url": "https://patchwork.libcamera.org/api/1.1/series/1191/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1191", "date": "2020-08-04T21:46:58", "name": "android: JPEG support", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1191/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9204/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9204/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 0A783BD87B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 4 Aug 2020 21:47:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C650C60555;\n\tTue, 4 Aug 2020 23:47:25 +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 CC1E760597\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 4 Aug 2020 23:47:20 +0200 (CEST)", "from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BFA6D84;\n\tTue, 4 Aug 2020 23:47:20 +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=\"tONj3B8j\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1596577640;\n\tbh=HSQtq0YpaIaTxOy0WeHU1lEPHqEBZox3cu1j1CXOoiM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=tONj3B8j5QOTWrW2NHghgRPiqvQTxo5an89oiROA3u2uOU0SWoI8zcIdVZ65zEN2z\n\tpHL45dOyykEG59SH5ZvAkStpwlVVluhSeZY2S6ud2sxq+tf56Q6gb0QCzzPkqkD/fc\n\tvb7ovepj/ausU5pKF3UIJzAtlUxOC4ZXxU9RSMi0=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Tue, 4 Aug 2020 22:47:09 +0100", "Message-Id": "<20200804214711.177645-12-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200804214711.177645-1-kieran.bingham@ideasonboard.com>", "References": "<20200804214711.177645-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 11/13] android: camera_device: Generate\n\tResultMetadata earlier", "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": "Generate the ResultMetadata before performing JPEG compression so that\nJPEG specific metadata can be added to the metadata when it has been\nprocessed.\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/android/camera_device.cpp | 23 ++++++++++++-----------\n 1 file changed, 12 insertions(+), 11 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 4178db952846..c529246e115c 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1198,6 +1198,8 @@ void CameraDevice::requestComplete(Request *request)\n \tconst std::map<Stream *, FrameBuffer *> &buffers = request->buffers();\n \tcamera3_buffer_status status = CAMERA3_BUFFER_STATUS_OK;\n \tstd::unique_ptr<CameraMetadata> resultMetadata;\n+\tCamera3RequestDescriptor *descriptor =\n+\t\treinterpret_cast<Camera3RequestDescriptor *>(request->cookie());\n \n \tif (request->status() != Request::RequestComplete) {\n \t\tLOG(HAL, Error) << \"Request not successfully completed: \"\n@@ -1205,9 +1207,17 @@ void CameraDevice::requestComplete(Request *request)\n \t\tstatus = CAMERA3_BUFFER_STATUS_ERROR;\n \t}\n \n+\t/*\n+\t * \\todo The timestamp used for the metadata is currently always taken\n+\t * from the first buffer (which may be the first stream) in the Request.\n+\t * It might be appropriate to return a 'correct' (as determined by\n+\t * pipeline handlers) timestamp in the Request itself.\n+\t */\n+\tFrameBuffer *buffer = buffers.begin()->second;\n+\tresultMetadata = getResultMetadata(descriptor->frameNumber,\n+\t\t\t\t\t buffer->metadata().timestamp);\n+\n \t/* Prepare to call back the Android camera stack. */\n-\tCamera3RequestDescriptor *descriptor =\n-\t\treinterpret_cast<Camera3RequestDescriptor *>(request->cookie());\n \n \tcamera3_capture_result_t captureResult = {};\n \tcaptureResult.frame_number = descriptor->frameNumber;\n@@ -1220,21 +1230,12 @@ void CameraDevice::requestComplete(Request *request)\n \tcaptureResult.output_buffers =\n \t\tconst_cast<const camera3_stream_buffer_t *>(descriptor->buffers);\n \n-\t/*\n-\t * \\todo The timestamp used for the metadata is currently always taken\n-\t * from the first buffer (which may be the first stream) in the Request.\n-\t * It might be appropriate to return a 'correct' (as determined by\n-\t * pipeline handlers) timestamp in the Request itself.\n-\t */\n-\tFrameBuffer *buffer = buffers.begin()->second;\n \n \tif (status == CAMERA3_BUFFER_STATUS_OK) {\n \t\tnotifyShutter(descriptor->frameNumber,\n \t\t\t buffer->metadata().timestamp);\n \n \t\tcaptureResult.partial_result = 1;\n-\t\tresultMetadata = getResultMetadata(descriptor->frameNumber,\n-\t\t\t\t\t\t buffer->metadata().timestamp);\n \t\tcaptureResult.result = resultMetadata->get();\n \t}\n \n", "prefixes": [ "libcamera-devel", "v3", "11/13" ] }