From patchwork Fri Aug 28 06:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 9410 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 3F126BDC71 for ; Fri, 28 Aug 2020 06:57:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CA3BE62912; Fri, 28 Aug 2020 08:57:36 +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="mtWt/6UC"; dkim-atps=neutral Received: from wrqvntvw.outbound-mail.sendgrid.net (wrqvntvw.outbound-mail.sendgrid.net [149.72.39.137]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E85E62901 for ; Fri, 28 Aug 2020 08:57:34 +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=stpSKaPex9Mh457U3Ku37Tj4IWnwmJDGeGeEljo4PYs=; b=mtWt/6UC1TRM0jsW6B/b30pUNpgjTrhMHoPSQWinl7Yjr0JnB27uzV+QMx+p0nyecGzJ /BYUynLllyplzcH+iIXPSLIodDFNNotMmke8O9M8nOeE4mnYol9VTSidUCl+JciJUGXn6N +dwkSf/W8jl1VgZWzWd11UssX+y4U20BI= Received: by filterdrecv-p3las1-75ccf54874-klsj2 with SMTP id filterdrecv-p3las1-75ccf54874-klsj2-18-5F48AADC-17 2020-08-28 06:57:32.703613365 +0000 UTC m=+46655.222845507 Received: from mail.uajain.com (unknown) by ismtpd0005p1maa1.sendgrid.net (SG) with ESMTP id XgIbvc4aQhqlEQ9as0sOqA for ; Fri, 28 Aug 2020 06:57:32.124 +0000 (UTC) From: Umang Jain Date: Fri, 28 Aug 2020 06:57:32 +0000 (UTC) Message-Id: <20200828065727.9909-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPclKwCK9CCZVFbQyNjpl2ex0bz5epgshTQCict6v0nhHwqjXZLIAWQ6H7Z5wzEFmopPHCFCdy7yvgmt4hxUzlobQEY+KGhoel32iHkNWTsNMHNwkYDstsPIM+6u0ya7dP6567YNWX4bb56TiEypCCR8pJieGG+6loGAULGZPzCgpj2lcm91yQE07SZroOXti2kpefI8afHdYO6gwwLTVqE9w== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v4 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 v4: - No major changes expect few alphabetically sort fixes, commit amend, fix coding/variable style etc. Changes in v3: - setTimestamp() now follows the EXIF standard format "YYYY:MM:DD hh:mm:ss" - Strip re-use of EXIF object for every frame. A new EXIF object is created and each tag is set for it, for each frame while encoding. - Exif::generate() returns a int code and Exif::data() will now return a const libcamera::Span of { exif_data_, size_ }. - Null terminate strings in Exif::setString(). - Make setLong, setShort, setString etc. helpers private. 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 (1): libcamera: android: Add EXIF infrastructure Umang Jain (1): android: jpeg: Support an initial set of EXIF metadata tags src/android/camera_device.cpp | 18 ++- src/android/jpeg/encoder.h | 3 +- src/android/jpeg/encoder_libjpeg.cpp | 9 +- src/android/jpeg/encoder_libjpeg.h | 3 +- src/android/jpeg/exif.cpp | 234 +++++++++++++++++++++++++++ src/android/jpeg/exif.h | 53 ++++++ src/android/meson.build | 2 + 7 files changed, 318 insertions(+), 4 deletions(-) create mode 100644 src/android/jpeg/exif.cpp create mode 100644 src/android/jpeg/exif.h