[{"id":12128,"web_url":"https://patchwork.libcamera.org/comment/12128/","msgid":"<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","date":"2020-08-24T21:28:15","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Umang,\n\nThanks for taking this on.\n\nOn 24/08/2020 21:46, Umang Jain wrote:\n> Hi all,\n> \n> This patch series targets adding initial EXIF metadata support\n> for the frames captured in Android/Libcamera framework.\n> \n> It is initial in the sense, it adds the base infrastructure for\n> Exif metadata support via 'libexif' and also encodes a initial\n> set of metadata tags into the frames.\n> \n> Testing:\n> The testing of this work was carried out via vivid pipeline-handler\n> in conjunction with patch in `cam` using EncoderLibJpeg as the\n> file sink [1]. That way we could see what EXIF metadata could be written\n> and inspect that `exif` or `exiv2` commandline tools.\n> \n> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n> \n> Sample output (1):  exif  frame-stream0-000000.jpg\n> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n> --------------------+----------------------------------------------------------\n> Tag                 |Value\n> --------------------+----------------------------------------------------------\n> Image Width         |1280\n> Image Length        |720\n> Manufacturer        |Libcamera\n\nLooking at my branch, it was of course me who put this in (incorrectly)\nwith a capital L, but please make it lowercase ;-)\n\n> Model               |Camera2111\n\nI assume you set this Camera2111 string manually for testing ?\n\n\n> Orientation         |Bottom-left\n> X-Resolution        |72\n> Y-Resolution        |72\n> Resolution Unit     |Inch\n> Date and Time       |Sun Oct 13 07:03:20 734137\n> \n> YCbCr Positioning   |Centered\n> Exif Version        |Exif Version 2.1\n> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n> \n> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n\nHrm ... we might have some work to do on converting the timestamp values\nappropriately here. That doesn't look right at all ;-)\n\n\n> \n> Components Configura|Y Cb Cr -\n> FlashPixVersion     |FlashPix Version 1.0\n> Color Space         |Internal error (unknown value 65535)\n\nThis one needs to be checked if there is an error/incorrect parameter set.\n\n\n> Pixel X Dimension   |1280\n> Pixel Y Dimension   |720\n> \n> \n> \n> Sample output (2): exiv2  frame-stream0-000000.jpg \n> File name       : frame-stream0-000000.jpg\n> File size       : 38787 Bytes\n> MIME type       : image/jpeg\n> Image size      : 1280 x 720\n> Camera make     : Libcamera\n> Camera model    : Camera2111\n> Image timestamp : Sun Oct 13 07:03:20 734137\n> \n> Image number    : \n\nHrm, I wonder if we should put the sequence number in here.\n\n\n> Exposure time   : \n> Aperture        : \n> Exposure bias   : \n> Flash           : \n> Flash bias      : \n> Focal length    : \n> Subject distance: \n> ISO speed       : \n> Exposure mode   : \n> Metering mode   : \n> Macro mode      : \n> Image quality   : \n\nPlenty of parameters we'll want to get from the IPAs there, but that\nwill be later.\n\n> Exif Resolution : 1280 x 720\n> White balance   : \n> Thumbnail       : None\n> Copyright       : \n> Exif comment    : \n> \n> There are still a lot of tags that needs to be populated,\n> that can be built on top of this groundwork.\n> \n> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n> \n> Kieran Bingham (1):\n>   libcamera: android: Add EXIF infrastructure\n> \n> Umang Jain (2):\n>   android: jpeg: Pass a Exif object while encoding\n>   android: Support initial set of EXIF metadata tags\n> \n>  src/android/camera_device.cpp        |  12 +-\n>  src/android/jpeg/encoder.h           |   5 +-\n>  src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n>  src/android/jpeg/encoder_libjpeg.h   |   3 +-\n>  src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n>  src/android/jpeg/exif.h              |  53 +++++++\n>  src/android/meson.build              |   2 +\n>  7 files changed, 296 insertions(+), 4 deletions(-)\n>  create mode 100644 src/android/jpeg/exif.cpp\n>  create mode 100644 src/android/jpeg/exif.h\n>","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 CD6A2BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Aug 2020 21:28:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 633BB62851;\n\tMon, 24 Aug 2020 23:28:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 27DA4616B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Aug 2020 23:28:18 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F91A9CE;\n\tMon, 24 Aug 2020 23:28:17 +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=\"LwSnEaPo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598304497;\n\tbh=6ClgMqhzZuQRNjl01yfSug5qPYBg1rDxPK9bTWcxxQU=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=LwSnEaPowasl44u6MCrPdDz2pthkDDB6cp/DHN1dVDY7Tu3u9czlixMfjn6Mny6yw\n\tKyJtr5iv+O5Lz0WZG/ekUSXwYoSNNTfh5HkMdDbP8HbIfIv/88HJJ+2mavu/7I3QOH\n\tWyogn5jPO40EcLsw2Ciyo2zpwmTpSEa8w8pGdY3w=","To":"Umang Jain <email@uajain.com>, libcamera-devel@lists.libcamera.org","References":"<20200824204646.16866-1-email@uajain.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\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gXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","Date":"Mon, 24 Aug 2020 22:28:15 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<20200824204646.16866-1-email@uajain.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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>","Reply-To":"kieran.bingham@ideasonboard.com","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>"}},{"id":12148,"web_url":"https://patchwork.libcamera.org/comment/12148/","msgid":"<9ad8deb5-8566-88c5-5d74-0d40a0f79a53@uajain.com>","date":"2020-08-25T20:16:44","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Kieran,\n\nThanks for the review. Almost all of the comments from this and other\npatches review should be addressed now in v2.\n\nOn 8/25/20 2:58 AM, Kieran Bingham wrote:\n> Hi Umang,\n>\n> Thanks for taking this on.\n>\n> On 24/08/2020 21:46, Umang Jain wrote:\n>> Hi all,\n>>\n>> This patch series targets adding initial EXIF metadata support\n>> for the frames captured in Android/Libcamera framework.\n>>\n>> It is initial in the sense, it adds the base infrastructure for\n>> Exif metadata support via 'libexif' and also encodes a initial\n>> set of metadata tags into the frames.\n>>\n>> Testing:\n>> The testing of this work was carried out via vivid pipeline-handler\n>> in conjunction with patch in `cam` using EncoderLibJpeg as the\n>> file sink [1]. That way we could see what EXIF metadata could be written\n>> and inspect that `exif` or `exiv2` commandline tools.\n>>\n>> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n>>\n>> Sample output (1):  exif  frame-stream0-000000.jpg\n>> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n>> --------------------+----------------------------------------------------------\n>> Tag                 |Value\n>> --------------------+----------------------------------------------------------\n>> Image Width         |1280\n>> Image Length        |720\n>> Manufacturer        |Libcamera\n> Looking at my branch, it was of course me who put this in (incorrectly)\n> with a capital L, but please make it lowercase ;-)\n>\n>> Model               |Camera2111\n> I assume you set this Camera2111 string manually for testing ?\nYes, hardcoded in cam's frame_sink_compressor.cpp\n>\n>\n>> Orientation         |Bottom-left\n>> X-Resolution        |72\n>> Y-Resolution        |72\n>> Resolution Unit     |Inch\n>> Date and Time       |Sun Oct 13 07:03:20 734137\n>>\n>> YCbCr Positioning   |Centered\n>> Exif Version        |Exif Version 2.1\n>> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n>>\n>> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n> Hrm ... we might have some work to do on converting the timestamp values\n> appropriately here. That doesn't look right at all ;-)\nWe now use, 'time of encode' as the frame's timestamp as discussed over IRC.\n>\n>\n>> Components Configura|Y Cb Cr -\n>> FlashPixVersion     |FlashPix Version 1.0\n>> Color Space         |Internal error (unknown value 65535)\n> This one needs to be checked if there is an error/incorrect parameter set.\nThis one still needs looking. I will queue it up.\n>\n>\n>> Pixel X Dimension   |1280\n>> Pixel Y Dimension   |720\n>>\n>>\n>>\n>> Sample output (2): exiv2  frame-stream0-000000.jpg\n>> File name       : frame-stream0-000000.jpg\n>> File size       : 38787 Bytes\n>> MIME type       : image/jpeg\n>> Image size      : 1280 x 720\n>> Camera make     : Libcamera\n>> Camera model    : Camera2111\n>> Image timestamp : Sun Oct 13 07:03:20 734137\n>>\n>> Image number    :\n> Hrm, I wonder if we should put the sequence number in here.\nNo idea, seems sane though. :)\n>\n>\n>> Exposure time   :\n>> Aperture        :\n>> Exposure bias   :\n>> Flash           :\n>> Flash bias      :\n>> Focal length    :\n>> Subject distance:\n>> ISO speed       :\n>> Exposure mode   :\n>> Metering mode   :\n>> Macro mode      :\n>> Image quality   :\n> Plenty of parameters we'll want to get from the IPAs there, but that\n> will be later.\nIndeed, I intentionally attached exiv2's output to see where we stand\nand what should be the so called 'next fields' to populate.\n\nWe can build it on top of this\n>\n>> Exif Resolution : 1280 x 720\n>> White balance   :\n>> Thumbnail       : None\n>> Copyright       :\n>> Exif comment    :\n>>\n>> There are still a lot of tags that needs to be populated,\n>> that can be built on top of this groundwork.\n>>\n>> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n>>\n>> Kieran Bingham (1):\n>>    libcamera: android: Add EXIF infrastructure\n>>\n>> Umang Jain (2):\n>>    android: jpeg: Pass a Exif object while encoding\n>>    android: Support initial set of EXIF metadata tags\n>>\n>>   src/android/camera_device.cpp        |  12 +-\n>>   src/android/jpeg/encoder.h           |   5 +-\n>>   src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n>>   src/android/jpeg/encoder_libjpeg.h   |   3 +-\n>>   src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n>>   src/android/jpeg/exif.h              |  53 +++++++\n>>   src/android/meson.build              |   2 +\n>>   7 files changed, 296 insertions(+), 4 deletions(-)\n>>   create mode 100644 src/android/jpeg/exif.cpp\n>>   create mode 100644 src/android/jpeg/exif.h\n>>","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 65D08BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Aug 2020 20:16:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC78761EA0;\n\tTue, 25 Aug 2020 22:16:47 +0200 (CEST)","from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8FAEE6037C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Aug 2020 22:16:45 +0200 (CEST)","by filterdrecv-p3mdw1-5b7978bb98-6hmzg with SMTP id\n\tfilterdrecv-p3mdw1-5b7978bb98-6hmzg-19-5F4571AC-D\n\t2020-08-25 20:16:44.36614482 +0000 UTC m=+2758.127967789","from mail.uajain.com (unknown)\n\tby ismtpd0006p1maa1.sendgrid.net (SG) with ESMTP\n\tid yhifkcneTrOsSixny3jwmw Tue, 25 Aug 2020 20:16:43.735 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"oEZPlH1k\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=cODmWJNOki3rD/CpDsYQd2p39HFEIR1es3PJHoVrUAE=;\n\tb=oEZPlH1k3buxwg5bqBBLWxiPFkBeXCc6wuu0fz/sUjUrlOaCN11msbrX3/01ETcRmDo7\n\tZ9rpRKKEPGbQyl74ISi3dvGtA33I6I5yWyycy6RiZxRHj+dGYvUupcI16LgKGs4KNrSGhW\n\t2rOBwYADEgMxZ4GHdmuKlIsvb8lsEpTQA=","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<9ad8deb5-8566-88c5-5d74-0d40a0f79a53@uajain.com>","Date":"Tue, 25 Aug 2020 20:16:44 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcOiinPhbAFGEz1ue/PLGCvP5uTYf4BZ3oVWcFRD04fdtBR6rlR1Zgp2zLcx6HaphsC+4a8EMJXrQSB9Z2KzGX4Ttb22/vK2hBJ0Y4mXZpA1YMeY4SsTKxOx0D4+UCgDlR/+ohiVXe0/HVn57Nc0L7ixgW9sIwS2svocvhGgpg0wK9HSN7//aTRM2JhD1qLN8Kius3RDu6dRCBRdORMsBsDg==","To":"kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12150,"web_url":"https://patchwork.libcamera.org/comment/12150/","msgid":"<20200825213948.GM6767@pendragon.ideasonboard.com>","date":"2020-08-25T21:39:48","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Tue, Aug 25, 2020 at 08:16:44PM +0000, Umang Jain wrote:\n> Hi Kieran,\n> \n> Thanks for the review. Almost all of the comments from this and other\n> patches review should be addressed now in v2.\n> \n> On 8/25/20 2:58 AM, Kieran Bingham wrote:\n> > Hi Umang,\n> >\n> > Thanks for taking this on.\n> >\n> > On 24/08/2020 21:46, Umang Jain wrote:\n> >> Hi all,\n> >>\n> >> This patch series targets adding initial EXIF metadata support\n> >> for the frames captured in Android/Libcamera framework.\n> >>\n> >> It is initial in the sense, it adds the base infrastructure for\n> >> Exif metadata support via 'libexif' and also encodes a initial\n> >> set of metadata tags into the frames.\n> >>\n> >> Testing:\n> >> The testing of this work was carried out via vivid pipeline-handler\n> >> in conjunction with patch in `cam` using EncoderLibJpeg as the\n> >> file sink [1]. That way we could see what EXIF metadata could be written\n> >> and inspect that `exif` or `exiv2` commandline tools.\n> >>\n> >> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n> >>\n> >> Sample output (1):  exif  frame-stream0-000000.jpg\n> >> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n> >> --------------------+----------------------------------------------------------\n> >> Tag                 |Value\n> >> --------------------+----------------------------------------------------------\n> >> Image Width         |1280\n> >> Image Length        |720\n> >> Manufacturer        |Libcamera\n> >\n> > Looking at my branch, it was of course me who put this in (incorrectly)\n> > with a capital L, but please make it lowercase ;-)\n> >\n> >> Model               |Camera2111\n> >\n> > I assume you set this Camera2111 string manually for testing ?\n> \n> Yes, hardcoded in cam's frame_sink_compressor.cpp\n> \n> >> Orientation         |Bottom-left\n> >> X-Resolution        |72\n> >> Y-Resolution        |72\n> >> Resolution Unit     |Inch\n> >> Date and Time       |Sun Oct 13 07:03:20 734137\n> >>\n> >> YCbCr Positioning   |Centered\n> >> Exif Version        |Exif Version 2.1\n> >> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n> >>\n> >> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n> >\n> > Hrm ... we might have some work to do on converting the timestamp values\n> > appropriately here. That doesn't look right at all ;-)\n>\n> We now use, 'time of encode' as the frame's timestamp as discussed over IRC.\n>\n> >> Components Configura|Y Cb Cr -\n> >> FlashPixVersion     |FlashPix Version 1.0\n> >> Color Space         |Internal error (unknown value 65535)\n> >\n> > This one needs to be checked if there is an error/incorrect parameter set.\n>\n> This one still needs looking. I will queue it up.\n>\n> >> Pixel X Dimension   |1280\n> >> Pixel Y Dimension   |720\n> >>\n> >>\n> >>\n> >> Sample output (2): exiv2  frame-stream0-000000.jpg\n> >> File name       : frame-stream0-000000.jpg\n> >> File size       : 38787 Bytes\n> >> MIME type       : image/jpeg\n> >> Image size      : 1280 x 720\n> >> Camera make     : Libcamera\n> >> Camera model    : Camera2111\n> >> Image timestamp : Sun Oct 13 07:03:20 734137\n> >> Image number    :\n> >\n> > Hrm, I wonder if we should put the sequence number in here.\n>\n> No idea, seems sane though. :)\n\nThat doesn't seem right to me. What is this tag ? I've grepped \"Image\nnumber\" in the exiv2 sources, and the only occurrences are related to\ntags specific to Minolta and Canon.\n\n> >> Exposure time   :\n> >> Aperture        :\n> >> Exposure bias   :\n> >> Flash           :\n> >> Flash bias      :\n> >> Focal length    :\n> >> Subject distance:\n> >> ISO speed       :\n> >> Exposure mode   :\n> >> Metering mode   :\n> >> Macro mode      :\n> >> Image quality   :\n> >\n> > Plenty of parameters we'll want to get from the IPAs there, but that\n> > will be later.\n>\n> Indeed, I intentionally attached exiv2's output to see where we stand\n> and what should be the so called 'next fields' to populate.\n> \n> We can build it on top of this\n>\n> >> Exif Resolution : 1280 x 720\n> >> White balance   :\n> >> Thumbnail       : None\n> >> Copyright       :\n> >> Exif comment    :\n> >>\n> >> There are still a lot of tags that needs to be populated,\n> >> that can be built on top of this groundwork.\n> >>\n> >> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n> >>\n> >> Kieran Bingham (1):\n> >>    libcamera: android: Add EXIF infrastructure\n> >>\n> >> Umang Jain (2):\n> >>    android: jpeg: Pass a Exif object while encoding\n> >>    android: Support initial set of EXIF metadata tags\n> >>\n> >>   src/android/camera_device.cpp        |  12 +-\n> >>   src/android/jpeg/encoder.h           |   5 +-\n> >>   src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n> >>   src/android/jpeg/encoder_libjpeg.h   |   3 +-\n> >>   src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n> >>   src/android/jpeg/exif.h              |  53 +++++++\n> >>   src/android/meson.build              |   2 +\n> >>   7 files changed, 296 insertions(+), 4 deletions(-)\n> >>   create mode 100644 src/android/jpeg/exif.cpp\n> >>   create mode 100644 src/android/jpeg/exif.h","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 835ABBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Aug 2020 21:40:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EBF8162849;\n\tTue, 25 Aug 2020 23:40:10 +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 DA4FF6037C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Aug 2020 23:40:08 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5DDB4B96;\n\tTue, 25 Aug 2020 23:40:08 +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=\"qPx/Gm6f\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598391608;\n\tbh=moiO+O4/6aKn11wK7G9nNxmzgWBrmtTIWcpn7UOBDl0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qPx/Gm6fEV0MeuTiSHKSHhHLr94+c0kvgHYbkjLyj8z5UsMa37h8lQ2ewhONnc06o\n\t4H6c9tP6dCQWWGWMJPkRowb/DIyEPgS6rlvaocaavG1WuWlKmow3RwphYQpYpbdTFb\n\t47Z2TIDB3GCYWjtVMq1QRIJKcNoWy4x7B9/JrzXM=","Date":"Wed, 26 Aug 2020 00:39:48 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <email@uajain.com>","Message-ID":"<20200825213948.GM6767@pendragon.ideasonboard.com>","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>\n\t<9ad8deb5-8566-88c5-5d74-0d40a0f79a53@uajain.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<9ad8deb5-8566-88c5-5d74-0d40a0f79a53@uajain.com>","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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>","Cc":"libcamera-devel@lists.libcamera.org","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>"}},{"id":12161,"web_url":"https://patchwork.libcamera.org/comment/12161/","msgid":"<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>","date":"2020-08-27T05:53:54","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"H Kieran,\n\nOn 8/25/20 2:58 AM, Kieran Bingham wrote:\n> Hi Umang,\n>\n> Thanks for taking this on.\n>\n> On 24/08/2020 21:46, Umang Jain wrote:\n>> Hi all,\n>>\n>> This patch series targets adding initial EXIF metadata support\n>> for the frames captured in Android/Libcamera framework.\n>>\n>> It is initial in the sense, it adds the base infrastructure for\n>> Exif metadata support via 'libexif' and also encodes a initial\n>> set of metadata tags into the frames.\n>>\n>> Testing:\n>> The testing of this work was carried out via vivid pipeline-handler\n>> in conjunction with patch in `cam` using EncoderLibJpeg as the\n>> file sink [1]. That way we could see what EXIF metadata could be written\n>> and inspect that `exif` or `exiv2` commandline tools.\n>>\n>> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n>>\n>> Sample output (1):  exif  frame-stream0-000000.jpg\n>> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n>> --------------------+----------------------------------------------------------\n>> Tag                 |Value\n>> --------------------+----------------------------------------------------------\n>> Image Width         |1280\n>> Image Length        |720\n>> Manufacturer        |Libcamera\n> Looking at my branch, it was of course me who put this in (incorrectly)\n> with a capital L, but please make it lowercase ;-)\n>\n>> Model               |Camera2111\n> I assume you set this Camera2111 string manually for testing ?\n>\n>\n>> Orientation         |Bottom-left\n>> X-Resolution        |72\n>> Y-Resolution        |72\n>> Resolution Unit     |Inch\n>> Date and Time       |Sun Oct 13 07:03:20 734137\n>>\n>> YCbCr Positioning   |Centered\n>> Exif Version        |Exif Version 2.1\n>> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n>>\n>> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n> Hrm ... we might have some work to do on converting the timestamp values\n> appropriately here. That doesn't look right at all ;-)\n>\n>\n>> Components Configura|Y Cb Cr -\n>> FlashPixVersion     |FlashPix Version 1.0\n>> Color Space         |Internal error (unknown value 65535)\n> This one needs to be checked if there is an error/incorrect parameter set.\nI found out that, this is not an error. The error messsage however, is \nmisleading.\nhttps://github.com/Aries85/LightZone/issues/171#issuecomment-195730879\n\nColor Space 65535 => Uncalibrated.\nWe are running exif_data_fix(data_); in exif's constructor, so I think \nit's where\nthis \"Uncalibrated\" value is getting set as the default value for color \nspace.\n\nCan we query colorspace as of now? Then we can try setting it here as well.\n>\n>> Pixel X Dimension   |1280\n>> Pixel Y Dimension   |720\n>>\n>>\n>>\n>> Sample output (2): exiv2  frame-stream0-000000.jpg\n>> File name       : frame-stream0-000000.jpg\n>> File size       : 38787 Bytes\n>> MIME type       : image/jpeg\n>> Image size      : 1280 x 720\n>> Camera make     : Libcamera\n>> Camera model    : Camera2111\n>> Image timestamp : Sun Oct 13 07:03:20 734137\n>>\n>> Image number    :\n> Hrm, I wonder if we should put the sequence number in here.\n>\n>\n>> Exposure time   :\n>> Aperture        :\n>> Exposure bias   :\n>> Flash           :\n>> Flash bias      :\n>> Focal length    :\n>> Subject distance:\n>> ISO speed       :\n>> Exposure mode   :\n>> Metering mode   :\n>> Macro mode      :\n>> Image quality   :\n> Plenty of parameters we'll want to get from the IPAs there, but that\n> will be later.\n>\n>> Exif Resolution : 1280 x 720\n>> White balance   :\n>> Thumbnail       : None\n>> Copyright       :\n>> Exif comment    :\n>>\n>> There are still a lot of tags that needs to be populated,\n>> that can be built on top of this groundwork.\n>>\n>> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n>>\n>> Kieran Bingham (1):\n>>    libcamera: android: Add EXIF infrastructure\n>>\n>> Umang Jain (2):\n>>    android: jpeg: Pass a Exif object while encoding\n>>    android: Support initial set of EXIF metadata tags\n>>\n>>   src/android/camera_device.cpp        |  12 +-\n>>   src/android/jpeg/encoder.h           |   5 +-\n>>   src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n>>   src/android/jpeg/encoder_libjpeg.h   |   3 +-\n>>   src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n>>   src/android/jpeg/exif.h              |  53 +++++++\n>>   src/android/meson.build              |   2 +\n>>   7 files changed, 296 insertions(+), 4 deletions(-)\n>>   create mode 100644 src/android/jpeg/exif.cpp\n>>   create mode 100644 src/android/jpeg/exif.h\n>>","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 6ED2BBD87E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Aug 2020 05:53:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C9649628FB;\n\tThu, 27 Aug 2020 07:53:58 +0200 (CEST)","from wrqvntvw.outbound-mail.sendgrid.net\n\t(wrqvntvw.outbound-mail.sendgrid.net [149.72.39.137])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2B94660377\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Aug 2020 07:53:55 +0200 (CEST)","by filterdrecv-p3las1-79f57dbf57-ppzft with SMTP id\n\tfilterdrecv-p3las1-79f57dbf57-ppzft-18-5F474A71-35\n\t2020-08-27 05:53:54.023364033 +0000 UTC m=+27296.588644330","from mail.uajain.com (unknown)\n\tby ismtpd0005p1maa1.sendgrid.net (SG) with ESMTP\n\tid ENEI9s_bTnmwO-euc1J6Og Thu, 27 Aug 2020 05:53:53.431 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"ZQivzLsP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=h27kauwKR++thviTES5V25eH1GBSxaZb4w2YmTcHv/4=;\n\tb=ZQivzLsPxg5vHMiGg2mWFzOqv0V2dXo0bxNRj0OvVNzdnBkEmPJXftZxX1lk2HkbG1px\n\tOxUjsgwn0F/UPjW1hC/DAjXjU2P8sFkZU8xt57Iiw5fS7ASHk4y3F63bZZCc5h9qEhoYkF\n\tAVLKYK8RXPWD4Uor2IVMfAEMFF9P8aumE=","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>","Date":"Thu, 27 Aug 2020 05:53:54 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcsqq2IL5HKct149ShwfIDnj5GHw/kJYycb7QUmdiAPWB4B7EJMpLzHwj3sXaS3/IvJYp1XqywVmBRMQwekMJfFOXvZYwIKawjfR6QSwwUfbCaiCek5KmXXChfiPaarVgAR/TRdShgt1JM1AkyPpmEXHkE3PVWMFqzmEN0azPS3cMJ3MwzTSYYTumTsZY7uu1Jrzp2MetD5kYTu7rLwyYJzw==","To":"kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12187,"web_url":"https://patchwork.libcamera.org/comment/12187/","msgid":"<20200827174416.GO6042@pendragon.ideasonboard.com>","date":"2020-08-27T17:44:16","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Thu, Aug 27, 2020 at 05:53:54AM +0000, Umang Jain wrote:\n> On 8/25/20 2:58 AM, Kieran Bingham wrote:\n> > On 24/08/2020 21:46, Umang Jain wrote:\n> >> Hi all,\n> >>\n> >> This patch series targets adding initial EXIF metadata support\n> >> for the frames captured in Android/Libcamera framework.\n> >>\n> >> It is initial in the sense, it adds the base infrastructure for\n> >> Exif metadata support via 'libexif' and also encodes a initial\n> >> set of metadata tags into the frames.\n> >>\n> >> Testing:\n> >> The testing of this work was carried out via vivid pipeline-handler\n> >> in conjunction with patch in `cam` using EncoderLibJpeg as the\n> >> file sink [1]. That way we could see what EXIF metadata could be written\n> >> and inspect that `exif` or `exiv2` commandline tools.\n> >>\n> >> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n> >>\n> >> Sample output (1):  exif  frame-stream0-000000.jpg\n> >> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n> >> --------------------+----------------------------------------------------------\n> >> Tag                 |Value\n> >> --------------------+----------------------------------------------------------\n> >> Image Width         |1280\n> >> Image Length        |720\n> >> Manufacturer        |Libcamera\n> >\n> > Looking at my branch, it was of course me who put this in (incorrectly)\n> > with a capital L, but please make it lowercase ;-)\n> >\n> >> Model               |Camera2111\n> >\n> > I assume you set this Camera2111 string manually for testing ?\n> >\n> >> Orientation         |Bottom-left\n> >> X-Resolution        |72\n> >> Y-Resolution        |72\n> >> Resolution Unit     |Inch\n> >> Date and Time       |Sun Oct 13 07:03:20 734137\n> >>\n> >> YCbCr Positioning   |Centered\n> >> Exif Version        |Exif Version 2.1\n> >> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n> >>\n> >> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n> >\n> > Hrm ... we might have some work to do on converting the timestamp values\n> > appropriately here. That doesn't look right at all ;-)\n> >\n> >> Components Configura|Y Cb Cr -\n> >> FlashPixVersion     |FlashPix Version 1.0\n> >> Color Space         |Internal error (unknown value 65535)\n>\n> > This one needs to be checked if there is an error/incorrect parameter set.\n> I found out that, this is not an error. The error messsage however, is \n> misleading.\n> https://github.com/Aries85/LightZone/issues/171#issuecomment-195730879\n> \n> Color Space 65535 => Uncalibrated.\n> We are running exif_data_fix(data_); in exif's constructor, so I think it's where\n> this \"Uncalibrated\" value is getting set as the default value for color space.\n> \n> Can we query colorspace as of now? Then we can try setting it here as well.\n\nSee src/qcam/dng_writer.cpp, we record some colorspace-related\ninformation there.\n\n> >> Pixel X Dimension   |1280\n> >> Pixel Y Dimension   |720\n> >>\n> >>\n> >>\n> >> Sample output (2): exiv2  frame-stream0-000000.jpg\n> >> File name       : frame-stream0-000000.jpg\n> >> File size       : 38787 Bytes\n> >> MIME type       : image/jpeg\n> >> Image size      : 1280 x 720\n> >> Camera make     : Libcamera\n> >> Camera model    : Camera2111\n> >> Image timestamp : Sun Oct 13 07:03:20 734137\n> >>\n> >> Image number    :\n> >\n> > Hrm, I wonder if we should put the sequence number in here.\n> >\n> >> Exposure time   :\n> >> Aperture        :\n> >> Exposure bias   :\n> >> Flash           :\n> >> Flash bias      :\n> >> Focal length    :\n> >> Subject distance:\n> >> ISO speed       :\n> >> Exposure mode   :\n> >> Metering mode   :\n> >> Macro mode      :\n> >> Image quality   :\n> >\n> > Plenty of parameters we'll want to get from the IPAs there, but that\n> > will be later.\n> >\n> >> Exif Resolution : 1280 x 720\n> >> White balance   :\n> >> Thumbnail       : None\n> >> Copyright       :\n> >> Exif comment    :\n> >>\n> >> There are still a lot of tags that needs to be populated,\n> >> that can be built on top of this groundwork.\n> >>\n> >> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n> >>\n> >> Kieran Bingham (1):\n> >>    libcamera: android: Add EXIF infrastructure\n> >>\n> >> Umang Jain (2):\n> >>    android: jpeg: Pass a Exif object while encoding\n> >>    android: Support initial set of EXIF metadata tags\n> >>\n> >>   src/android/camera_device.cpp        |  12 +-\n> >>   src/android/jpeg/encoder.h           |   5 +-\n> >>   src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n> >>   src/android/jpeg/encoder_libjpeg.h   |   3 +-\n> >>   src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n> >>   src/android/jpeg/exif.h              |  53 +++++++\n> >>   src/android/meson.build              |   2 +\n> >>   7 files changed, 296 insertions(+), 4 deletions(-)\n> >>   create mode 100644 src/android/jpeg/exif.cpp\n> >>   create mode 100644 src/android/jpeg/exif.h","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 96EF6BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Aug 2020 17:44:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1BD9B628FD;\n\tThu, 27 Aug 2020 19:44:40 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6D266037C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Aug 2020 19:44:38 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6A70E186A;\n\tThu, 27 Aug 2020 19:44:36 +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=\"W4ddu80X\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598550276;\n\tbh=gb7oLwxLXPNvea2KvteRCrw0pdl+NbDM4AibfHkvRKs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W4ddu80XOv0/JeJre6yjr0bzMWJuLVUerar/EaMCSibpX2DOAj8yUxFaMBv2Me1Mb\n\tJJsmmdg+TspUdPG6G0mKe9yMkcAnIQUA6IRju6DWhAbMA5poqwmgRSzRMtFZ18Y1vh\n\tQym7wIEXouH0W3YHmft0ao3buCeQV3xX2a7NM850=","Date":"Thu, 27 Aug 2020 20:44:16 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <email@uajain.com>","Message-ID":"<20200827174416.GO6042@pendragon.ideasonboard.com>","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>\n\t<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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>","Cc":"libcamera-devel@lists.libcamera.org","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>"}},{"id":12188,"web_url":"https://patchwork.libcamera.org/comment/12188/","msgid":"<0d58a4e4-d45c-4f06-8fdc-b4556dc8125a@uajain.com>","date":"2020-08-28T06:26:16","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Laurent,\n\nOn 8/27/20 11:14 PM, Laurent Pinchart wrote:\n> Hi Umang,\n>\n> On Thu, Aug 27, 2020 at 05:53:54AM +0000, Umang Jain wrote:\n>> On 8/25/20 2:58 AM, Kieran Bingham wrote:\n>>> On 24/08/2020 21:46, Umang Jain wrote:\n>>>> Hi all,\n>>>>\n>>>> This patch series targets adding initial EXIF metadata support\n>>>> for the frames captured in Android/Libcamera framework.\n>>>>\n>>>> It is initial in the sense, it adds the base infrastructure for\n>>>> Exif metadata support via 'libexif' and also encodes a initial\n>>>> set of metadata tags into the frames.\n>>>>\n>>>> Testing:\n>>>> The testing of this work was carried out via vivid pipeline-handler\n>>>> in conjunction with patch in `cam` using EncoderLibJpeg as the\n>>>> file sink [1]. That way we could see what EXIF metadata could be written\n>>>> and inspect that `exif` or `exiv2` commandline tools.\n>>>>\n>>>> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n>>>>\n>>>> Sample output (1):  exif  frame-stream0-000000.jpg\n>>>> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n>>>> --------------------+----------------------------------------------------------\n>>>> Tag                 |Value\n>>>> --------------------+----------------------------------------------------------\n>>>> Image Width         |1280\n>>>> Image Length        |720\n>>>> Manufacturer        |Libcamera\n>>> Looking at my branch, it was of course me who put this in (incorrectly)\n>>> with a capital L, but please make it lowercase ;-)\n>>>\n>>>> Model               |Camera2111\n>>> I assume you set this Camera2111 string manually for testing ?\n>>>\n>>>> Orientation         |Bottom-left\n>>>> X-Resolution        |72\n>>>> Y-Resolution        |72\n>>>> Resolution Unit     |Inch\n>>>> Date and Time       |Sun Oct 13 07:03:20 734137\n>>>>\n>>>> YCbCr Positioning   |Centered\n>>>> Exif Version        |Exif Version 2.1\n>>>> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n>>>>\n>>>> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n>>> Hrm ... we might have some work to do on converting the timestamp values\n>>> appropriately here. That doesn't look right at all ;-)\n>>>\n>>>> Components Configura|Y Cb Cr -\n>>>> FlashPixVersion     |FlashPix Version 1.0\n>>>> Color Space         |Internal error (unknown value 65535)\n>>> This one needs to be checked if there is an error/incorrect parameter set.\n>> I found out that, this is not an error. The error messsage however, is\n>> misleading.\n>> https://github.com/Aries85/LightZone/issues/171#issuecomment-195730879\n>>\n>> Color Space 65535 => Uncalibrated.\n>> We are running exif_data_fix(data_); in exif's constructor, so I think it's where\n>> this \"Uncalibrated\" value is getting set as the default value for color space.\n>>\n>> Can we query colorspace as of now? Then we can try setting it here as well.\n> See src/qcam/dng_writer.cpp, we record some colorspace-related\n> information there.\nAh thanks for the pointer.\nHowever, it seems the values are somewhat implied and hardcoded for\nthe TIFF_PHOTOMETRIC, which I suppose is the tag for conveying\ncolor space information.  PHOTOMETRIC_RGB for the thumbnail and\nPHOTOMETRIC_CFA for the raw image.\n\nHowever, I just come across std::map<PixelFormat, JPEGPixelFormatInfo>\nwhich wraps colorspace information in src/android/jpeg/encoder_libjpeg.cpp\nKieran, can we somehow use it in order to set the ColorSpace? The problem\nhere is we are setting the tags one level up (in \nsrc/android/CameraDevice.cpp)\nso we might to relay the information at that point. What do you think?\n\nAlso, I hope it can be follow up patch, not necessarily blocking this \npatchset\n:-)\n>\n>>>> Pixel X Dimension   |1280\n>>>> Pixel Y Dimension   |720\n>>>>\n>>>>\n>>>>\n>>>> Sample output (2): exiv2  frame-stream0-000000.jpg\n>>>> File name       : frame-stream0-000000.jpg\n>>>> File size       : 38787 Bytes\n>>>> MIME type       : image/jpeg\n>>>> Image size      : 1280 x 720\n>>>> Camera make     : Libcamera\n>>>> Camera model    : Camera2111\n>>>> Image timestamp : Sun Oct 13 07:03:20 734137\n>>>>\n>>>> Image number    :\n>>> Hrm, I wonder if we should put the sequence number in here.\n>>>\n>>>> Exposure time   :\n>>>> Aperture        :\n>>>> Exposure bias   :\n>>>> Flash           :\n>>>> Flash bias      :\n>>>> Focal length    :\n>>>> Subject distance:\n>>>> ISO speed       :\n>>>> Exposure mode   :\n>>>> Metering mode   :\n>>>> Macro mode      :\n>>>> Image quality   :\n>>> Plenty of parameters we'll want to get from the IPAs there, but that\n>>> will be later.\n>>>\n>>>> Exif Resolution : 1280 x 720\n>>>> White balance   :\n>>>> Thumbnail       : None\n>>>> Copyright       :\n>>>> Exif comment    :\n>>>>\n>>>> There are still a lot of tags that needs to be populated,\n>>>> that can be built on top of this groundwork.\n>>>>\n>>>> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n>>>>\n>>>> Kieran Bingham (1):\n>>>>     libcamera: android: Add EXIF infrastructure\n>>>>\n>>>> Umang Jain (2):\n>>>>     android: jpeg: Pass a Exif object while encoding\n>>>>     android: Support initial set of EXIF metadata tags\n>>>>\n>>>>    src/android/camera_device.cpp        |  12 +-\n>>>>    src/android/jpeg/encoder.h           |   5 +-\n>>>>    src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n>>>>    src/android/jpeg/encoder_libjpeg.h   |   3 +-\n>>>>    src/android/jpeg/exif.cpp            | 210 +++++++++++++++++++++++++++\n>>>>    src/android/jpeg/exif.h              |  53 +++++++\n>>>>    src/android/meson.build              |   2 +\n>>>>    7 files changed, 296 insertions(+), 4 deletions(-)\n>>>>    create mode 100644 src/android/jpeg/exif.cpp\n>>>>    create mode 100644 src/android/jpeg/exif.h","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 2D810BF019\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Aug 2020 06:26:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 954CF62901;\n\tFri, 28 Aug 2020 08:26:20 +0200 (CEST)","from wrqvntvw.outbound-mail.sendgrid.net\n\t(wrqvntvw.outbound-mail.sendgrid.net [149.72.39.137])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D6A4A6037D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Aug 2020 08:26:18 +0200 (CEST)","by filterdrecv-p3iad2-787bb5c9bc-nlbrz with SMTP id\n\tfilterdrecv-p3iad2-787bb5c9bc-nlbrz-18-5F48A388-12\n\t2020-08-28 06:26:16.599145014 +0000 UTC m=+44797.640665085","from mail.uajain.com (unknown)\n\tby ismtpd0002p1maa1.sendgrid.net (SG) with ESMTP\n\tid sbyOBDgQS5uDXDhQZUv-Qg Fri, 28 Aug 2020 06:26:15.831 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"c1IGVO1D\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:cc:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=zlFBWteN7Ycjau7rYyfKJq+EqWlCucf1irFifI3tWh0=;\n\tb=c1IGVO1DHLt/YfMpaRMN4yYLS7/31c0sIyCAqKX3uc1NmzvWGyPv0sX7Ze9N67VsAj7D\n\t0bsXCOL2rojBf+6wMFeGK6xkl2PvIV/1+BVlx5AMa2XoXfxGYFsBEtzOFZ2+dYU9Y3XRLQ\n\t3LLY0F1JDmpWVaYNgMhMyfDr2OmDlVg+M=","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>\n\t<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>\n\t<20200827174416.GO6042@pendragon.ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<0d58a4e4-d45c-4f06-8fdc-b4556dc8125a@uajain.com>","Date":"Fri, 28 Aug 2020 06:26:16 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200827174416.GO6042@pendragon.ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcpFdq5YgiOsiT/6hp/evDR4BX05Nr7BCrWqLxaWPZ3wcoNJrL2KGGqe2s7rtbIFs4x5YD8QaxgV/vZZTkGD5LHFP9FGNZEoF3rkoD6WOBaYt7kfuITgeuM/pMY5aCdfvmB++XVCRs6V+lhGxzy7i235ru61kMIKqbYit9wAU0TWcOHRqQ7/LK8zy03KihRTdIqTTObgkxFqa22pF4Dl5b1g==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=\"iso-8859-1\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12190,"web_url":"https://patchwork.libcamera.org/comment/12190/","msgid":"<9f029b39-9fc1-8c45-6515-4c03c5a8df30@ideasonboard.com>","date":"2020-08-28T08:32:11","subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Umang,\n\nOn 28/08/2020 07:26, Umang Jain wrote:\n> Hi Laurent,\n> \n> On 8/27/20 11:14 PM, Laurent Pinchart wrote:\n>> Hi Umang,\n>>\n>> On Thu, Aug 27, 2020 at 05:53:54AM +0000, Umang Jain wrote:\n>>> On 8/25/20 2:58 AM, Kieran Bingham wrote:\n>>>> On 24/08/2020 21:46, Umang Jain wrote:\n>>>>> Hi all,\n>>>>>\n>>>>> This patch series targets adding initial EXIF metadata support\n>>>>> for the frames captured in Android/Libcamera framework.\n>>>>>\n>>>>> It is initial in the sense, it adds the base infrastructure for\n>>>>> Exif metadata support via 'libexif' and also encodes a initial\n>>>>> set of metadata tags into the frames.\n>>>>>\n>>>>> Testing:\n>>>>> The testing of this work was carried out via vivid pipeline-handler\n>>>>> in conjunction with patch in `cam` using EncoderLibJpeg as the\n>>>>> file sink [1]. That way we could see what EXIF metadata could be\n>>>>> written\n>>>>> and inspect that `exif` or `exiv2` commandline tools.\n>>>>>\n>>>>> ($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12\n>>>>>\n>>>>> Sample output (1):  exif  frame-stream0-000000.jpg\n>>>>> EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):\n>>>>> --------------------+----------------------------------------------------------\n>>>>>\n>>>>> Tag                 |Value\n>>>>> --------------------+----------------------------------------------------------\n>>>>>\n>>>>> Image Width         |1280\n>>>>> Image Length        |720\n>>>>> Manufacturer        |Libcamera\n>>>> Looking at my branch, it was of course me who put this in (incorrectly)\n>>>> with a capital L, but please make it lowercase ;-)\n>>>>\n>>>>> Model               |Camera2111\n>>>> I assume you set this Camera2111 string manually for testing ?\n>>>>\n>>>>> Orientation         |Bottom-left\n>>>>> X-Resolution        |72\n>>>>> Y-Resolution        |72\n>>>>> Resolution Unit     |Inch\n>>>>> Date and Time       |Sun Oct 13 07:03:20 734137\n>>>>>\n>>>>> YCbCr Positioning   |Centered\n>>>>> Exif Version        |Exif Version 2.1\n>>>>> Date and Time (Origi|Sun Oct 13 07:03:20 734137\n>>>>>\n>>>>> Date and Time (Digit|Sun Oct 13 07:03:20 734137\n>>>> Hrm ... we might have some work to do on converting the timestamp\n>>>> values\n>>>> appropriately here. That doesn't look right at all ;-)\n>>>>\n>>>>> Components Configura|Y Cb Cr -\n>>>>> FlashPixVersion     |FlashPix Version 1.0\n>>>>> Color Space         |Internal error (unknown value 65535)\n>>>> This one needs to be checked if there is an error/incorrect\n>>>> parameter set.\n>>> I found out that, this is not an error. The error messsage however, is\n>>> misleading.\n>>> https://github.com/Aries85/LightZone/issues/171#issuecomment-195730879\n>>>\n>>> Color Space 65535 => Uncalibrated.\n>>> We are running exif_data_fix(data_); in exif's constructor, so I\n>>> think it's where\n>>> this \"Uncalibrated\" value is getting set as the default value for\n>>> color space.\n>>>\n>>> Can we query colorspace as of now? Then we can try setting it here as\n>>> well.\n>> See src/qcam/dng_writer.cpp, we record some colorspace-related\n>> information there.\n> Ah thanks for the pointer.\n> However, it seems the values are somewhat implied and hardcoded for\n> the TIFF_PHOTOMETRIC, which I suppose is the tag for conveying\n> color space information.  PHOTOMETRIC_RGB for the thumbnail and\n> PHOTOMETRIC_CFA for the raw image.\n> \n> However, I just come across std::map<PixelFormat, JPEGPixelFormatInfo>\n> which wraps colorspace information in src/android/jpeg/encoder_libjpeg.cpp\n> Kieran, can we somehow use it in order to set the ColorSpace? The problem\n> here is we are setting the tags one level up (in\n> src/android/CameraDevice.cpp)\n> so we might to relay the information at that point. What do you think?\n> \n> Also, I hope it can be follow up patch, not necessarily blocking this\n> patchset\n> :-)\n\nYes, this can be a follow on from my perspective.\n\nHowever it might not need any further action:\n\nLooking at:\n\nhttps://www.jeita.or.jp/japanese/standard/book/CP-3451E_E/#target/page_no=49\n(Section 4.6.5-B)\n\nstates the following:\n\n\"\"\"\nThe color space information tag (ColorSpace) is always recorded as the\ncolor space specifier. Normally sRGB (=1) is used to define the color\nspace based on the PC monitor conditions and environment. If a color\nspace other than sRGB is used, Uncalibrated (=FFFF.H) is set.\n\"\"\"\n\nThe question I don't yet know the answer to (color space is very\ncomplex, and possibly dependant upon the connected sensor attributes) is\nif we can assume we're in sRGB even though we are using YUV.\n\nPerhaps taking a look at the CrOS code to see what it does would be\nuseful, but otherwise, I think we can leave this tag for now.\n\n\n\n>>>>> Pixel X Dimension   |1280\n>>>>> Pixel Y Dimension   |720\n>>>>>\n>>>>>\n>>>>>\n>>>>> Sample output (2): exiv2  frame-stream0-000000.jpg\n>>>>> File name       : frame-stream0-000000.jpg\n>>>>> File size       : 38787 Bytes\n>>>>> MIME type       : image/jpeg\n>>>>> Image size      : 1280 x 720\n>>>>> Camera make     : Libcamera\n>>>>> Camera model    : Camera2111\n>>>>> Image timestamp : Sun Oct 13 07:03:20 734137\n>>>>>\n>>>>> Image number    :\n>>>> Hrm, I wonder if we should put the sequence number in here.\n>>>>\n>>>>> Exposure time   :\n>>>>> Aperture        :\n>>>>> Exposure bias   :\n>>>>> Flash           :\n>>>>> Flash bias      :\n>>>>> Focal length    :\n>>>>> Subject distance:\n>>>>> ISO speed       :\n>>>>> Exposure mode   :\n>>>>> Metering mode   :\n>>>>> Macro mode      :\n>>>>> Image quality   :\n>>>> Plenty of parameters we'll want to get from the IPAs there, but that\n>>>> will be later.\n>>>>\n>>>>> Exif Resolution : 1280 x 720\n>>>>> White balance   :\n>>>>> Thumbnail       : None\n>>>>> Copyright       :\n>>>>> Exif comment    :\n>>>>>\n>>>>> There are still a lot of tags that needs to be populated,\n>>>>> that can be built on top of this groundwork.\n>>>>>\n>>>>> [1]: https://github.com/kbingham/libcamera/commit/10ed8ec\n>>>>>\n>>>>> Kieran Bingham (1):\n>>>>>     libcamera: android: Add EXIF infrastructure\n>>>>>\n>>>>> Umang Jain (2):\n>>>>>     android: jpeg: Pass a Exif object while encoding\n>>>>>     android: Support initial set of EXIF metadata tags\n>>>>>\n>>>>>    src/android/camera_device.cpp        |  12 +-\n>>>>>    src/android/jpeg/encoder.h           |   5 +-\n>>>>>    src/android/jpeg/encoder_libjpeg.cpp |  15 +-\n>>>>>    src/android/jpeg/encoder_libjpeg.h   |   3 +-\n>>>>>    src/android/jpeg/exif.cpp            | 210\n>>>>> +++++++++++++++++++++++++++\n>>>>>    src/android/jpeg/exif.h              |  53 +++++++\n>>>>>    src/android/meson.build              |   2 +\n>>>>>    7 files changed, 296 insertions(+), 4 deletions(-)\n>>>>>    create mode 100644 src/android/jpeg/exif.cpp\n>>>>>    create mode 100644 src/android/jpeg/exif.h","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 00A57BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Aug 2020 08:32:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73C9462919;\n\tFri, 28 Aug 2020 10:32:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1551E61EA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Aug 2020 10:32:15 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C7BE24E;\n\tFri, 28 Aug 2020 10:32:14 +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=\"fyNfyxwb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1598603534;\n\tbh=vPejNi/GLGfoL4a6qg10BXaMUqw3+bxtNssfhHifrCs=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=fyNfyxwb6qa5M0I1j3SkfFuqr4Muz37sECSnVWsG7PB07cEP+/+aZA6Ks2ZokIdUR\n\tdzO05wBgtIn3lbX1MrjgPgRtyBRcReR9FonpIJEi7oX9/HKACe/HJn7ntEeFZ44+b9\n\tUPNcLrohR6/GqOnjK1i2+TxQ6jJuV/KmxM7vmKzY=","To":"Umang Jain <email@uajain.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20200824204646.16866-1-email@uajain.com>\n\t<c9d47a39-3f84-2e64-c720-306c93ce99c2@ideasonboard.com>\n\t<52968341-d30d-ea57-87db-4e17eee0751e@uajain.com>\n\t<20200827174416.GO6042@pendragon.ideasonboard.com>\n\t<0d58a4e4-d45c-4f06-8fdc-b4556dc8125a@uajain.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQ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AEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<9f029b39-9fc1-8c45-6515-4c03c5a8df30@ideasonboard.com>","Date":"Fri, 28 Aug 2020 09:32:11 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<0d58a4e4-d45c-4f06-8fdc-b4556dc8125a@uajain.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 0/3] Initial EXIF metadata support","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","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>"}}]