[{"id":14825,"web_url":"https://patchwork.libcamera.org/comment/14825/","msgid":"<YBFBUks7ZhlksxWP@pendragon.ideasonboard.com>","date":"2021-01-27T10:32:50","subject":"Re: [libcamera-devel] [PATCH] android: camera_device: Set AE\n\tprecapture trigger according to request","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 Wed, Jan 27, 2021 at 07:14:35PM +0900, Paul Elder wrote:\n> Set the AE precapture triggler tag in the android result metadata\n> according to what was passed in the request metadata.\n> \n> This allows the following CTS test to pass:\n> - android.hardware.camera2.cts.StillCaptureTest#testAePrecaptureTriggerCancelJpegCapture\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/android/camera_device.cpp | 13 ++++++++++---\n>  1 file changed, 10 insertions(+), 3 deletions(-)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 82bf0d3a..941e89a8 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -1806,6 +1806,13 @@ void CameraDevice::requestComplete(Request *request)\n>  \tuint64_t timestamp = buffers.begin()->second->metadata().timestamp;\n>  \tresultMetadata = getResultMetadata(descriptor, timestamp);\n>  \n> +\tcamera_metadata_ro_entry_t entry;\n> +\t/* \\todo Handle IPA appropriately */\n> +\tint ret = descriptor->settings_.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry);\n> +\tif (ret)\n> +\t\tresultMetadata->updateEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,\n> +\t\t\t\t\t    entry.data.u8, 1);\n\nShould this be moved to getResultMetadata() and replace the existing\ncode that sets ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER ?\n\n> +\n>  \t/* Handle any JPEG compression. */\n>  \tfor (unsigned int i = 0; i < descriptor->numBuffers_; ++i) {\n>  \t\tCameraStream *cameraStream =\n> @@ -1832,9 +1839,9 @@ void CameraDevice::requestComplete(Request *request)\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> -\t\tint ret = cameraStream->process(*buffer, &mapped,\n> -\t\t\t\t\t\tdescriptor->settings_,\n> -\t\t\t\t\t\tresultMetadata.get());\n> +\t\tret = cameraStream->process(*buffer, &mapped,\n> +\t\t\t\t\t    descriptor->settings_,\n> +\t\t\t\t\t    resultMetadata.get());\n>  \t\tif (ret) {\n>  \t\t\tstatus = CAMERA3_BUFFER_STATUS_ERROR;\n>  \t\t\tcontinue;","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 BA224BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jan 2021 10:33:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4555668368;\n\tWed, 27 Jan 2021 11:33:13 +0100 (CET)","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 3CB5568363\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jan 2021 11:33:11 +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 A000E240;\n\tWed, 27 Jan 2021 11:33:10 +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=\"Az5A2zEF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611743590;\n\tbh=gZ9Q/Rh2GbNGc0eoJ8j55fUZm3hSvX8SQKSq1g+qPwY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Az5A2zEFNc4L8dXXr0sczLi5OAVSXEtGb3HchZCu7r1onuhCiL5YUSNqtkteqFQMI\n\tzHzASm71YhP9GlqNrNdetSE+dk6YGlQdyg1Aow53+5vMPjNU1zuDU+Z+Iy+LhW56Wl\n\tV+rtds1mbGVtzn4ZgUaJsN+XIOQZXKy2tduS/FXw=","Date":"Wed, 27 Jan 2021 12:32:50 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YBFBUks7ZhlksxWP@pendragon.ideasonboard.com>","References":"<20210127101435.3903-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210127101435.3903-1-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: camera_device: Set AE\n\tprecapture trigger according to request","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":14826,"web_url":"https://patchwork.libcamera.org/comment/14826/","msgid":"<20210127103748.GA2154@pyrite.rasen.tech>","date":"2021-01-27T10:37:48","subject":"Re: [libcamera-devel] [PATCH] android: camera_device: Set AE\n\tprecapture trigger according to request","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Wed, Jan 27, 2021 at 12:32:50PM +0200, Laurent Pinchart wrote:\n> Hi Paul,\n> \n> Thank you for the patch.\n> \n> On Wed, Jan 27, 2021 at 07:14:35PM +0900, Paul Elder wrote:\n> > Set the AE precapture triggler tag in the android result metadata\n> > according to what was passed in the request metadata.\n> > \n> > This allows the following CTS test to pass:\n> > - android.hardware.camera2.cts.StillCaptureTest#testAePrecaptureTriggerCancelJpegCapture\n> > \n> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> > ---\n> >  src/android/camera_device.cpp | 13 ++++++++++---\n> >  1 file changed, 10 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index 82bf0d3a..941e89a8 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -1806,6 +1806,13 @@ void CameraDevice::requestComplete(Request *request)\n> >  \tuint64_t timestamp = buffers.begin()->second->metadata().timestamp;\n> >  \tresultMetadata = getResultMetadata(descriptor, timestamp);\n> >  \n> > +\tcamera_metadata_ro_entry_t entry;\n> > +\t/* \\todo Handle IPA appropriately */\n> > +\tint ret = descriptor->settings_.getEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER, &entry);\n> > +\tif (ret)\n> > +\t\tresultMetadata->updateEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,\n> > +\t\t\t\t\t    entry.data.u8, 1);\n> \n> Should this be moved to getResultMetadata() and replace the existing\n> code that sets ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER ?\n\nOh yeah that would probably be better.\n\n\nThanks,\n\nPaul\n> > +\n> >  \t/* Handle any JPEG compression. */\n> >  \tfor (unsigned int i = 0; i < descriptor->numBuffers_; ++i) {\n> >  \t\tCameraStream *cameraStream =\n> > @@ -1832,9 +1839,9 @@ void CameraDevice::requestComplete(Request *request)\n> >  \t\t\tcontinue;\n> >  \t\t}\n> >  \n> > -\t\tint ret = cameraStream->process(*buffer, &mapped,\n> > -\t\t\t\t\t\tdescriptor->settings_,\n> > -\t\t\t\t\t\tresultMetadata.get());\n> > +\t\tret = cameraStream->process(*buffer, &mapped,\n> > +\t\t\t\t\t    descriptor->settings_,\n> > +\t\t\t\t\t    resultMetadata.get());\n> >  \t\tif (ret) {\n> >  \t\t\tstatus = CAMERA3_BUFFER_STATUS_ERROR;\n> >  \t\t\tcontinue;","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 99980C0F2B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 27 Jan 2021 10:37:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F4C168368;\n\tWed, 27 Jan 2021 11:37:57 +0100 (CET)","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 D280768364\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 27 Jan 2021 11:37:55 +0100 (CET)","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 4C00F240;\n\tWed, 27 Jan 2021 11:37:53 +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=\"Yn9/Ukhb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1611743875;\n\tbh=cAFtihGQzeaiI8jQEffVEqgZTOdiLkydEyLoEx4+Ib4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Yn9/UkhbDsyDQ4D0KdmWIiKvk0jbU1DytbU3U/IfRXw7/6iL/lgs5RxH60J0yJYWB\n\t4uJqpuRSL3DFYphmgb45pdYP6iRVlueTzR+pxQItIP5k2g4wG4vX1A48rAgXdjkZTM\n\t1mTDjyh26ChReU5sCDwlEJzV2npGK4l628e7S7RM=","Date":"Wed, 27 Jan 2021 19:37:48 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20210127103748.GA2154@pyrite.rasen.tech>","References":"<20210127101435.3903-1-paul.elder@ideasonboard.com>\n\t<YBFBUks7ZhlksxWP@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YBFBUks7ZhlksxWP@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] android: camera_device: Set AE\n\tprecapture trigger according to request","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>"}}]