From patchwork Tue Aug 25 20:10:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 9381 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id AEF32BD87E for ; Tue, 25 Aug 2020 20:10:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 35F2B61EA0; Tue, 25 Aug 2020 22:10:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="r6PgCwyL"; dkim-atps=neutral Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 09BF36037C for ; Tue, 25 Aug 2020 22:10:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=s1; bh=n2Mb6tc/LHU6uhyLq55y5co3xcz+mWKSF7HTu4rb4P8=; b=r6PgCwyLZOYILt8xBYdIdMlzENukQR8sHyLqbDtXOhTLJhPt4ct2tPqEB6q0l5dr+SAF DzB5K5NcZ8om3/uopuJQ/KIQkqe/99hvySRbRqWT2pcz8gLAbKf75Nfg8vGTLQGON++gle xTyhPsfPnp6bo4YEotFUsbxzJOMEG8D/Q= Received: by filterdrecv-p3mdw1-5b7978bb98-6fh2n with SMTP id filterdrecv-p3mdw1-5b7978bb98-6fh2n-19-5F457037-19 2020-08-25 20:10:31.439764039 +0000 UTC m=+2389.281353859 Received: from mail.uajain.com (unknown) by ismtpd0006p1maa1.sendgrid.net (SG) with ESMTP id pEZI6zQwSwq6BIi8G3jlGA for ; Tue, 25 Aug 2020 20:10:30.810 +0000 (UTC) From: Umang Jain Date: Tue, 25 Aug 2020 20:10:31 +0000 (UTC) Message-Id: <20200825201020.13498-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPc/mSirh79xX0l6HRHZb2eYJclYOiGeQzgWU9yeI2e02O6wZgXDUfRz/NRAOAecdN8nhoS7ZiGoMCKxYlYUCO1gmk6Q0zd6RMdZPTotQhW6M2RrzDD5t46Cn8+/ndCIZE3hFUgSeZ0kE2q5jEAnXVV/t4SSEDC/RNznIZ6zhliMNXRnzEq7wJTkcxyVJnrUGeNJ7rJYxKjo0qJMR8oet1Fjw== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v2 0/2] Initial EXIF metadata support X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Changes in v2: - Patch 2/3 and 3/3 in v1 are merged. - We ignore the Frame Metadata timestamp, instead use the 'time of encoding' as the frame timestamp for EXIF data. Since the resolution is only 1s, this seems to be fine (consensus over IRC). - EXIF data placeholder is now wrapper inside CameraStream. This prevents setting static metadata repeatedly in v1, like Make/Model etc. - Jpeg Encoder encodes the EXIF generated Span<> directly into the image. This avoids JPEG encoder dealing with EXIF specifics inside itself. - Orientation tag value is rectified and is similar to how it's done in Chrome HAL. - Exif::setWidth() and Exif::setHeight() are merged to achieve common Exif::setSize(libcamera::Size) for setting frame sizes. Kieran Bingham (2): libcamera: android: Add EXIF infrastructure android: jpeg: Support a initial set of EXIF metadata tags src/android/camera_device.cpp | 22 ++- src/android/camera_device.h | 2 + src/android/jpeg/encoder.h | 5 +- src/android/jpeg/encoder_libjpeg.cpp | 9 +- src/android/jpeg/encoder_libjpeg.h | 3 +- src/android/jpeg/exif.cpp | 242 +++++++++++++++++++++++++++ src/android/jpeg/exif.h | 54 ++++++ src/android/meson.build | 2 + 8 files changed, 335 insertions(+), 4 deletions(-) create mode 100644 src/android/jpeg/exif.cpp create mode 100644 src/android/jpeg/exif.h