[{"id":34419,"web_url":"https://patchwork.libcamera.org/comment/34419/","msgid":"<mg3r7u2madca2s4hnvnfwqdhcszvr6opwbwqlqz4tvxbocbhni@vvxifk5ufrzg>","date":"2025-06-05T06:55:13","subject":"Re: [PATCH v2 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Thu, May 22, 2025 at 08:48:17AM +0100, Naushir Patuck wrote:\n> Add a new status enum, FrameStartup, used to denote that even though\n> the frame has been successfully captured, the IQ parameters set by the\n> IPA will cause the frame to be unusable and applications are advised to\n> not consume this frame. An example of this would be on a cold-start of\n> the 3A algorithms, and there will be large oscillations to converge to\n> a stable state quickly.\n>\n> Additional, update the definition of the FrameError state to cover the\n> usage when the sensor is known to produce a number of invalid/error\n> frames after stream-on.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThansk\n  j\n\n> ---\n>  include/libcamera/framebuffer.h |  1 +\n>  src/libcamera/framebuffer.cpp   | 13 ++++++++++---\n>  2 files changed, 11 insertions(+), 3 deletions(-)\n>\n> diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h\n> index ff83924300ac..e83825b466aa 100644\n> --- a/include/libcamera/framebuffer.h\n> +++ b/include/libcamera/framebuffer.h\n> @@ -26,6 +26,7 @@ struct FrameMetadata {\n>  \t\tFrameSuccess,\n>  \t\tFrameError,\n>  \t\tFrameCancelled,\n> +\t\tFrameStartup,\n>  \t};\n>\n>  \tstruct Plane {\n> diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp\n> index 826848f75a56..93be497be052 100644\n> --- a/src/libcamera/framebuffer.cpp\n> +++ b/src/libcamera/framebuffer.cpp\n> @@ -43,12 +43,19 @@ LOG_DEFINE_CATEGORY(Buffer)\n>   * The frame has been captured with success and contains valid data. All fields\n>   * of the FrameMetadata structure are valid.\n>   * \\var FrameMetadata::FrameError\n> - * An error occurred during capture of the frame. The frame data may be partly\n> - * or fully invalid. The sequence and timestamp fields of the FrameMetadata\n> - * structure is valid, the other fields may be invalid.\n> + * The frame data is partly or fully corrupted, missing or otherwise invalid.\n> + * This can for instance indicate a hardware transmission error, or invalid data\n> + * produced by the sensor during its startup phase. The sequence and timestamp\n> + * fields of the FrameMetadata structure is valid, all the other fields may be\n> + * invalid.\n>   * \\var FrameMetadata::FrameCancelled\n>   * Capture stopped before the frame completed. The frame data is not valid. All\n>   * fields of the FrameMetadata structure but the status field are invalid.\n> + * \\var FrameMetadata::FrameStartup The frame has been successfully captured.\n> + * However, the IPA is in a cold-start or reset phase and will result in image\n> + * quality parameters producing unusable images. Applications are recommended to\n> + * not consume these frames. All other fields of the FrameMetadata structure are\n> + * valid.\n>   */\n>\n>  /**\n> --\n> 2.43.0\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 B22B4C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Jun 2025 06:55:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 93D5B68DB3;\n\tThu,  5 Jun 2025 08:55:19 +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 8D3AD60342\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Jun 2025 08:55:17 +0200 (CEST)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CE12D3A4;\n\tThu,  5 Jun 2025 08:55:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Z8rB7BRl\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749106513;\n\tbh=THd9x9uMieeP2Y8XGsfN+4/ByUrZCtEr+9JK1kUmndE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Z8rB7BRlb4HxSeDv1s7yEgXIN4nSGzjEFCn0Rw3boHgoe6ur0V7BGSdEKinlHLKMI\n\tdGji/0atbH6/4+GN6wo6AfrTEoUAaM1a9XUAHdXKICmIkxsP5fN/oOzDDFi5sfe8q3\n\ta9dh58/cCz91i4h/ur+kwXOuJvM+T/x9MoeUGxhY=","Date":"Thu, 5 Jun 2025 08:55:13 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tDavid Plowman <david.plowman@raspberrypi.com>","Subject":"Re: [PATCH v2 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","Message-ID":"<mg3r7u2madca2s4hnvnfwqdhcszvr6opwbwqlqz4tvxbocbhni@vvxifk5ufrzg>","References":"<20250522075244.1198110-1-naush@raspberrypi.com>\n\t<20250522075244.1198110-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250522075244.1198110-2-naush@raspberrypi.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]