Patch Detail
Show a patch.
GET /api/patches/11044/?format=api
{ "id": 11044, "url": "https://patchwork.libcamera.org/api/patches/11044/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11044/", "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": "<20210128102214.160250-1-paul.elder@ideasonboard.com>", "date": "2021-01-28T10:22:14", "name": "[libcamera-devel] android: camera_device: Fix exposure time tag in exif and android", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a0217a20b5977dc63f2956117d0ae5b24658188b", "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/11044/mbox/", "series": [ { "id": 1621, "url": "https://patchwork.libcamera.org/api/series/1621/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1621", "date": "2021-01-28T10:22:14", "name": "[libcamera-devel] android: camera_device: Fix exposure time tag in exif and android", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1621/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11044/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11044/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 3F26FBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Jan 2021 10:22:24 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0C4E368383;\n\tThu, 28 Jan 2021 11:22:24 +0100 (CET)", "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 C8F2D6030A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Jan 2021 11:22:22 +0100 (CET)", "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 5C011331;\n\tThu, 28 Jan 2021 11:22:21 +0100 (CET)" ], "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=\"Je+95ynM\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611829342;\n\tbh=VIcB+dMKsOM9BBmKe9Y0SnbfyhgH6+GhywZb7Ho72IA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Je+95ynMdfq4ynjFfDeEXcyE+ZaaE6MltNWExAviaqrkmE+RT16yA4Jl9sEQOYso+\n\t/lKqDHfa3czLnNwLhpkgkAVGY3ksUyNHgQl5s9DSEh1ZZYO5StUuWRM5tEBg0muBI/\n\t5zXbtslmxF6bon6p3C3/YsL9PckBTOTxIeXeJp1Q=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 28 Jan 2021 19:22:14 +0900", "Message-Id": "<20210128102214.160250-1-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] android: camera_device: Fix exposure time\n\ttag in exif and android", "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": "The exposure time libcamera control is in microseconds while android and\nour exif component use nanoseconds. Convert it appropriately.\n\nCTS also expects the exposure time exif tag to match the exposure time\nset in the android result metadata. Fix it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n src/android/camera_device.cpp | 2 +-\n src/android/jpeg/post_processor_jpeg.cpp | 3 ++-\n 2 files changed, 3 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex f5066709..36382941 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -2058,7 +2058,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \t}\n \n \tif (metadata.contains(controls::ExposureTime)) {\n-\t\tint32_t exposure = metadata.get(controls::ExposureTime);\n+\t\tint64_t exposure = metadata.get(controls::ExposureTime) * 1000;\n \t\tresultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME,\n \t\t\t\t\t &exposure, 1);\n \t}\ndiff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\nindex cac0087b..6250b050 100644\n--- a/src/android/jpeg/post_processor_jpeg.cpp\n+++ b/src/android/jpeg/post_processor_jpeg.cpp\n@@ -113,7 +113,8 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n \texif.setTimestamp(std::time(nullptr), 0ms);\n \n \t/* \\todo Get this information from libcamera::Request::metadata */\n-\texif.setExposureTime(0);\n+\tret = resultMetadata->getEntry(ANDROID_SENSOR_EXPOSURE_TIME, &entry);\n+\texif.setExposureTime(ret ? *entry.data.i64 : 0);\n \tret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry);\n \tif (ret)\n \t\texif.setAperture(*entry.data.f);\n", "prefixes": [ "libcamera-devel" ] }