[{"id":16613,"web_url":"https://patchwork.libcamera.org/comment/16613/","msgid":"<YIeT6+52WC6KM6v6@pendragon.ideasonboard.com>","date":"2021-04-27T04:32:43","subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","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 Thu, Apr 22, 2021 at 06:40:54PM +0900, Paul Elder wrote:\n> The data for the exif ISO tag needs to come from SENSOR_SENSITIVITY. Set\n> it.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> \n> ---\n> This on its own doesn't fix any CTS tests, but it prevents a test\n> failure later on when we add the proper static metadata for the FULL\n> hardware level.\n> ---\n>  src/android/jpeg/post_processor_jpeg.cpp | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index 3bf16996..237fb318 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -119,7 +119,10 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n>  \tret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry);\n>  \tif (ret)\n>  \t\texif.setAperture(*entry.data.f);\n> -\texif.setISO(100);\n> +\n> +\tret = resultMetadata->getEntry(ANDROID_SENSOR_SENSITIVITY, &entry);\n> +\texif.setISO(ret ? *entry.data.i32 : 100);\n> +\n>  \texif.setFlash(Exif::Flash::FlashNotPresent);\n>  \texif.setWhiteBalance(Exif::WhiteBalance::Auto);\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 898F2BDCC3\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Apr 2021 04:32:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BDEC068878;\n\tTue, 27 Apr 2021 06:32:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73C3560512\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Apr 2021 06:32:50 +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 B3C24E9;\n\tTue, 27 Apr 2021 06:32:49 +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=\"bAuqQtS/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619497969;\n\tbh=Mq7ZwxKVRt25vjWagbO1HlpoR3cabw+sIv+TjA0u6Ok=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=bAuqQtS/HxxeCu/ygeT58fBXWKcUQHNbcz0UO3JuOKr7lOFBWjLnawS0s11vyWLgR\n\tRU0ZnLUWOfdrvQwGKg791D8m5D54PXWGKec/wMkAroN2A7oRsFadJ51YSdGsauBOw6\n\ts20etoURAsUAqIFEZKQQyOe0iWeJ3p6/DtNPaOKY=","Date":"Tue, 27 Apr 2021 07:32:43 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YIeT6+52WC6KM6v6@pendragon.ideasonboard.com>","References":"<20210422094102.371772-1-paul.elder@ideasonboard.com>\n\t<20210422094102.371772-5-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210422094102.371772-5-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","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":16642,"web_url":"https://patchwork.libcamera.org/comment/16642/","msgid":"<20210427074709.enxpeiokbxsru22b@uno.localdomain>","date":"2021-04-27T07:47:09","subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"On Thu, Apr 22, 2021 at 06:40:54PM +0900, Paul Elder wrote:\n> The data for the exif ISO tag needs to come from SENSOR_SENSITIVITY. Set\n> it.\n>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n> ---\n> This on its own doesn't fix any CTS tests, but it prevents a test\n> failure later on when we add the proper static metadata for the FULL\n> hardware level.\n> ---\n>  src/android/jpeg/post_processor_jpeg.cpp | 5 ++++-\n>  1 file changed, 4 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> index 3bf16996..237fb318 100644\n> --- a/src/android/jpeg/post_processor_jpeg.cpp\n> +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> @@ -119,7 +119,10 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n>  \tret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry);\n>  \tif (ret)\n>  \t\texif.setAperture(*entry.data.f);\n> -\texif.setISO(100);\n> +\n> +\tret = resultMetadata->getEntry(ANDROID_SENSOR_SENSITIVITY, &entry);\n\nI don't see this tag being filled in the result metadata...\n\n> +\texif.setISO(ret ? *entry.data.i32 : 100);\n> +\n>  \texif.setFlash(Exif::Flash::FlashNotPresent);\n>  \texif.setWhiteBalance(Exif::WhiteBalance::Auto);\n>\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 7213DBDE19\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Apr 2021 07:46:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71684688C1;\n\tTue, 27 Apr 2021 09:46:30 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0282B688B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Apr 2021 09:46:28 +0200 (CEST)","from uno.localdomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1B933E000E;\n\tTue, 27 Apr 2021 07:46:27 +0000 (UTC)"],"X-Originating-IP":"93.61.96.190","Date":"Tue, 27 Apr 2021 09:47:09 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<20210427074709.enxpeiokbxsru22b@uno.localdomain>","References":"<20210422094102.371772-1-paul.elder@ideasonboard.com>\n\t<20210422094102.371772-5-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210422094102.371772-5-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","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":16665,"web_url":"https://patchwork.libcamera.org/comment/16665/","msgid":"<20210428100347.GI195599@pyrite.rasen.tech>","date":"2021-04-28T10:03:47","subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Tue, Apr 27, 2021 at 09:47:09AM +0200, Jacopo Mondi wrote:\n> On Thu, Apr 22, 2021 at 06:40:54PM +0900, Paul Elder wrote:\n> > The data for the exif ISO tag needs to come from SENSOR_SENSITIVITY. Set\n> > it.\n> >\n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> >\n> > ---\n> > This on its own doesn't fix any CTS tests, but it prevents a test\n> > failure later on when we add the proper static metadata for the FULL\n> > hardware level.\n> > ---\n> >  src/android/jpeg/post_processor_jpeg.cpp | 5 ++++-\n> >  1 file changed, 4 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp\n> > index 3bf16996..237fb318 100644\n> > --- a/src/android/jpeg/post_processor_jpeg.cpp\n> > +++ b/src/android/jpeg/post_processor_jpeg.cpp\n> > @@ -119,7 +119,10 @@ int PostProcessorJpeg::process(const FrameBuffer &source,\n> >  \tret = requestMetadata.getEntry(ANDROID_LENS_APERTURE, &entry);\n> >  \tif (ret)\n> >  \t\texif.setAperture(*entry.data.f);\n> > -\texif.setISO(100);\n> > +\n> > +\tret = resultMetadata->getEntry(ANDROID_SENSOR_SENSITIVITY, &entry);\n> \n> I don't see this tag being filled in the result metadata...\n\nIt will be later :)\n\n\nPaul\n\n> > +\texif.setISO(ret ? *entry.data.i32 : 100);\n> > +\n> >  \texif.setFlash(Exif::Flash::FlashNotPresent);\n> >  \texif.setWhiteBalance(Exif::WhiteBalance::Auto);\n> >\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 91F5BBDE44\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Apr 2021 10:03:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D4622688B9;\n\tWed, 28 Apr 2021 12:03:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 55BAF602D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Apr 2021 12:03:55 +0200 (CEST)","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 C7CEF2CF;\n\tWed, 28 Apr 2021 12:03:53 +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=\"WjTt623K\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1619604235;\n\tbh=Qd8oAtuc1HMQu5avnxWB2JF9KsC8vhFCBNA3u3c2Wrk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WjTt623KHi5Ct9tDOXTALs/7Z9MS2sGEtvm+GlKf/2a4lV554eR3eh/EY7xoBIRK8\n\tFMRI7YlDQ47nqj8ahf0Vzf+JMl8zI/7RFpPk0zKxNdbfgAKkjrwEsw5lw2zaMz2OG7\n\tXxa8LnXzQyzX//5wkRGqjPtYxEorXqHfM6gDoUzg=","Date":"Wed, 28 Apr 2021 19:03:47 +0900","From":"paul.elder@ideasonboard.com","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20210428100347.GI195599@pyrite.rasen.tech>","References":"<20210422094102.371772-1-paul.elder@ideasonboard.com>\n\t<20210422094102.371772-5-paul.elder@ideasonboard.com>\n\t<20210427074709.enxpeiokbxsru22b@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210427074709.enxpeiokbxsru22b@uno.localdomain>","Subject":"Re: [libcamera-devel] [RFC PATCH v2 04/12] android: jpeg: get ISO\n\tfrom SENSOR_SENSITIVITY","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>"}}]