[{"id":17218,"web_url":"https://patchwork.libcamera.org/comment/17218/","msgid":"<YKw+injTuoTFPK3A@pendragon.ideasonboard.com>","date":"2021-05-25T00:02:18","subject":"Re: [libcamera-devel] [PATCH] android: CameraDevice: Skip post\n\tprocessings to unsuccessful buffers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nThank you for the patch.\n\nOn Mon, Apr 26, 2021 at 12:02:24PM +0900, Hirokazu Honda wrote:\n> This skips executing post processings to unsuccessful buffers as\n> they are meaningless.\n\nThis conflicts with \"[PATCH v3 0/8] Implement flush() camera operation\".\nThat series already handles the case where the whole request fails.\n\nWe probably need to handle the case where only specific buffers fail,\nthat doesn't seem to be handled by Jacopo's series, neither for the\nbuffer that failed, nor for the buffers that should be produced from it\nthrough reprocessing. Jacopo, is this correct ?\n\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/android/camera_device.cpp | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index a71aee2f..abb06810 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -2064,6 +2064,9 @@ void CameraDevice::requestComplete(Request *request)\n>  \n>  \t/* Handle any JPEG compression. */\n>  \tfor (camera3_stream_buffer_t &buffer : descriptor.buffers_) {\n> +\t\tif (status == CAMERA3_BUFFER_STATUS_ERROR)\n> +\t\t\tcontinue;\n> +\n>  \t\tCameraStream *cameraStream =\n>  \t\t\tstatic_cast<CameraStream *>(buffer.stream->priv);\n>  \n> @@ -2076,6 +2079,12 @@ void CameraDevice::requestComplete(Request *request)\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> +\t\tif (src->metadata().status != FrameMetadata::FrameSuccess) {\n> +\t\t\tLOG(HAL, Debug) << \"Skip post-processing because the \"\n> +\t\t\t\t\t<< \"buffer is not filled successfully\";\n> +\t\t\tcontinue;\n> +\t\t}\n> +\n>  \t\tint ret = cameraStream->process(*src,\n>  \t\t\t\t\t\t*buffer.buffer,\n>  \t\t\t\t\t\tdescriptor.settings_,","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 11927C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 00:02:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 842EE68919;\n\tTue, 25 May 2021 02:02:25 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2DFF601A9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 02:02:24 +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 31242344;\n\tTue, 25 May 2021 02:02:24 +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=\"Cw9m7l47\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621900944;\n\tbh=/8JCY40tcx9eae3Augoej8eWK9aycLdl/f3bWgEtW2M=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Cw9m7l47HHDwzTWyUkLUb0E2UsZERtEKsXRNJpAqobque8U7XrFdzYJ+1sPQwSCI8\n\tIaYPpWBy4pdM674p4cW+hijiFBSknGZ1k96GwLhtHLtk/kk5f3LJ2kb2obv5Y1fiDa\n\tl5u0i9wcLS65QnEQTv4KwsF/KdZCy7JgOhbYDlJI=","Date":"Tue, 25 May 2021 03:02:18 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YKw+injTuoTFPK3A@pendragon.ideasonboard.com>","References":"<20210426030224.2255533-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210426030224.2255533-1-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH] android: CameraDevice: Skip post\n\tprocessings to unsuccessful buffers","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]