[{"id":15556,"web_url":"https://patchwork.libcamera.org/comment/15556/","msgid":"<YEc9aeMfrlDtS7B7@pendragon.ideasonboard.com>","date":"2021-03-09T09:18:33","subject":"Re: [libcamera-devel] [PATCH v2 4/4] android: jpeg: exif: change\n\tGPS method encoding from ASCII to NoEncoding","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Tue, Mar 09, 2021 at 05:52:35PM +0900, Paul Elder wrote:\n> According to the EXIF specification, the GPS method should be UNDEFINED,\n> and the first 8 bytes will designate the type. However, CTS expects the\n> first 8 bytes to be part of the data. Remove the 8-byte encoding\n> designator by changing the encoding to NoEncoding to appease CTS.\n> \n> This is part of the fix that allows the following CTS test to pass:\n> - android.hardware.cts.CameraTest#testJpegExif\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\nExif is such an amazing specification. I don't see a way to find an\nauthoritative answer to the question of what we should do here, so being\nCTS-compliant is probably as good as it gets.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n> Changes in v2:\n> - keep UNDEFINED instead of changing it to ASCII, and use NoEncoding\n> ---\n>  src/android/jpeg/exif.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 628382a9..7e47c1ac 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -407,7 +407,7 @@ void Exif::setGPSLocation(const double *coords)\n>  void Exif::setGPSMethod(const std::string &method)\n>  {\n>  \tsetString(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_PROCESSING_METHOD),\n> -\t\t  EXIF_FORMAT_UNDEFINED, method, Unicode);\n> +\t\t  EXIF_FORMAT_UNDEFINED, method, NoEncoding);\n>  }\n>  \n>  void Exif::setOrientation(int orientation)","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 C31EFBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Mar 2021 09:19:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F09E68A9F;\n\tTue,  9 Mar 2021 10:19:06 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1F26D6051F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Mar 2021 10:19:05 +0100 (CET)","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 8A5C1E9;\n\tTue,  9 Mar 2021 10:19:04 +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=\"pcTNbBCJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615281544;\n\tbh=vjDRikxaD2/hBAXbI6DQFgNuMh0LTfpU3EJAqCuVr3o=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pcTNbBCJUQD+Q1EfYWIm28PrVJJ/SlHBwBXoxtV3HsBM7e2btSTyaEKYNZe0AoLSt\n\t/pcz/HmVYzA6CQNxlrsI7q2aJUsB9jzvflxGB13+qTsiNlqoMf/QgopERmoRBxSQrV\n\twKcyKTtn/wroO4YAehUpe/4yDL6aR1BjWoy7h7gg=","Date":"Tue, 9 Mar 2021 11:18:33 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YEc9aeMfrlDtS7B7@pendragon.ideasonboard.com>","References":"<20210309085235.106691-1-paul.elder@ideasonboard.com>\n\t<20210309085235.106691-5-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210309085235.106691-5-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 4/4] android: jpeg: exif: change\n\tGPS method encoding from ASCII to NoEncoding","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":15572,"web_url":"https://patchwork.libcamera.org/comment/15572/","msgid":"<20210309132322.crpt5w3tjrlzr54k@uno.localdomain>","date":"2021-03-09T13:23:22","subject":"Re: [libcamera-devel] [PATCH v2 4/4] android: jpeg: exif: change\n\tGPS method encoding from ASCII to NoEncoding","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Paul,\n\nOn Tue, Mar 09, 2021 at 05:52:35PM +0900, Paul Elder wrote:\n> According to the EXIF specification, the GPS method should be UNDEFINED,\n> and the first 8 bytes will designate the type. However, CTS expects the\n> first 8 bytes to be part of the data. Remove the 8-byte encoding\n> designator by changing the encoding to NoEncoding to appease CTS.\n>\n> This is part of the fix that allows the following CTS test to pass:\n> - android.hardware.cts.CameraTest#testJpegExif\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n\nI'm not sure I fully get the reasons behind this, but as long as it\nfixes one more CTS test, I'm happy\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n> ---\n> Changes in v2:\n> - keep UNDEFINED instead of changing it to ASCII, and use NoEncoding\n> ---\n>  src/android/jpeg/exif.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 628382a9..7e47c1ac 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -407,7 +407,7 @@ void Exif::setGPSLocation(const double *coords)\n>  void Exif::setGPSMethod(const std::string &method)\n>  {\n>  \tsetString(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_PROCESSING_METHOD),\n> -\t\t  EXIF_FORMAT_UNDEFINED, method, Unicode);\n> +\t\t  EXIF_FORMAT_UNDEFINED, method, NoEncoding);\n>  }\n>\n>  void Exif::setOrientation(int orientation)\n> --\n> 2.27.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 77FADBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Mar 2021 13:23:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 44F0268AA3;\n\tTue,  9 Mar 2021 14:23:05 +0100 (CET)","from relay13.mail.gandi.net (relay13.mail.gandi.net\n\t[217.70.178.233])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AFB1368A99\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Mar 2021 14:23:04 +0100 (CET)","from uno.localdomain (host-79-22-58-175.retail.telecomitalia.it\n\t[79.22.58.175]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay13.mail.gandi.net (Postfix) with ESMTPSA id B3C6380006;\n\tTue,  9 Mar 2021 13:22:58 +0000 (UTC)"],"Date":"Tue, 9 Mar 2021 14:23:22 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20210309132322.crpt5w3tjrlzr54k@uno.localdomain>","References":"<20210309085235.106691-1-paul.elder@ideasonboard.com>\n\t<20210309085235.106691-5-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210309085235.106691-5-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 4/4] android: jpeg: exif: change\n\tGPS method encoding from ASCII to NoEncoding","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>"}}]