[{"id":34460,"web_url":"https://patchwork.libcamera.org/comment/34460/","msgid":"<174974580474.896144.2382618567667227657@ping.linuxembedded.co.uk>","date":"2025-06-12T16:30:04","subject":"Re: [PATCH v3 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck (2025-06-06 11:55:19)\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> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\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>                 FrameSuccess,\n>                 FrameError,\n>                 FrameCancelled,\n> +               FrameStartup,\n>         };\n>  \n>         struct 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\nThis needs to have a new line after \\var FrameMetadata::FrameStartup,\nand the following text rewrapped.\n\nI've done that locally - and repushed to the CI to re-check it.\n\n--\nKieran\n\n\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>   */\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 E778CBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jun 2025 16:30:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B5E5668DBE;\n\tThu, 12 Jun 2025 18:30:09 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D0CD66154C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jun 2025 18:30:07 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 82B56D6;\n\tThu, 12 Jun 2025 18:29:58 +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=\"hjGtuLU+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749745798;\n\tbh=8WuY6aeC4hYvudJqsUwsZ0MkH06C6lpgAnLa70U3kEE=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=hjGtuLU+ibmPytrDW8L4bmSWjMB3PlGvUNyZbiQ7xtgqwkf90YfPEWsxFeAK5Djl9\n\tyKN/pmORkx0iuv4PUVw/aqD/K8r1GZQK2b876DIKj4IVMtBzU6BL8TrEje1Pl9aiAZ\n\tZNuyah3VFK+k2i/hfd5krKOT37qk0bcwaqPyOTPo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250606105651.1624640-2-naush@raspberrypi.com>","References":"<20250606105651.1624640-1-naush@raspberrypi.com>\n\t<20250606105651.1624640-2-naush@raspberrypi.com>","Subject":"Re: [PATCH v3 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 12 Jun 2025 17:30:04 +0100","Message-ID":"<174974580474.896144.2382618567667227657@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}},{"id":34461,"web_url":"https://patchwork.libcamera.org/comment/34461/","msgid":"<CAEmqJPpRmwjfESeT0qDhDNf26_3A9mnii+u+A__mHq8ZzQky5g@mail.gmail.com>","date":"2025-06-13T07:04:19","subject":"Re: [PATCH v3 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Thu, 12 Jun 2025, 5:30 pm Kieran Bingham, <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Naushir Patuck (2025-06-06 11:55:19)\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> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\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\n> 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> >                 FrameSuccess,\n> >                 FrameError,\n> >                 FrameCancelled,\n> > +               FrameStartup,\n> >         };\n> >\n> >         struct Plane {\n> > diff --git a/src/libcamera/framebuffer.cpp\n> 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.\n> 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\n> partly\n> > - * or fully invalid. The sequence and timestamp fields of the\n> FrameMetadata\n> > - * structure is valid, the other fields may be invalid.\n> > + * The frame data is partly or fully corrupted, missing or otherwise\n> invalid.\n> > + * This can for instance indicate a hardware transmission error, or\n> invalid data\n> > + * produced by the sensor during its startup phase. The sequence and\n> timestamp\n> > + * fields of the FrameMetadata structure is valid, all the other fields\n> may be\n> > + * invalid.\n> >   * \\var FrameMetadata::FrameCancelled\n> >   * Capture stopped before the frame completed. The frame data is not\n> valid. All\n> >   * fields of the FrameMetadata structure but the status field are\n> invalid.\n> > + * \\var FrameMetadata::FrameStartup The frame has been successfully\n> captured.\n>\n> This needs to have a new line after \\var FrameMetadata::FrameStartup,\n> and the following text rewrapped.\n>\n> I've done that locally - and repushed to the CI to re-check it.\n>\n\nOops sorry I missed that. And thanks for merging!\n\n\n\n> --\n> Kieran\n>\n>\n> > + * However, the IPA is in a cold-start or reset phase and will result\n> in image\n> > + * quality parameters producing unusable images. Applications are\n> recommended to\n> > + * not consume these frames. All other fields of the FrameMetadata\n> structure are\n> > + * valid.\n>\n>\n>\n>\n> >   */\n> >\n> >  /**\n> > --\n> > 2.43.0\n> >\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 20646C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Jun 2025 07:04:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA92868DBF;\n\tFri, 13 Jun 2025 09:04:32 +0200 (CEST)","from mail-ua1-x932.google.com (mail-ua1-x932.google.com\n\t[IPv6:2607:f8b0:4864:20::932])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 486706154F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Jun 2025 09:04:31 +0200 (CEST)","by mail-ua1-x932.google.com with SMTP id\n\ta1e0cc1a2514c-87ece144819so45621241.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Jun 2025 00:04:31 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"KoFhYOgp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1749798270; x=1750403070;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=9lr44vwlM0LEX+cpiN1/J8lHdDHJMLoAbvjS/gedBGs=;\n\tb=KoFhYOgpfe8WditmK8lLl4AL/vPjzC8DDO3K+wlsB4sQG/gsW0/AucIZHUPwtxsMvd\n\tBE+Fa3YkudYbrhlTwV6Ml+SyKGiQSCte4YHoRYSikAdUQHk8ZPvj1I8i0DjQcNX2q0Ru\n\tyIvTAHJlx3uIodgL3PBQr86CRt59eGKX1TpXLwJLVTmDfj8A4U23sgS4I6vRTYCb1PWV\n\tC0GGhTZ66X6gN4tUEAmLI16YD9Pe2g0mqATZyFAAfmblObMKJWmFN6JZ5elLEOWLJxyF\n\tGZMWpp7op5v8T5xYwNUTqL0GGI/UGA8UrGCz8oQJZyPUUQs/O/5hmCqObZKNTVBR2NIx\n\tnLyw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1749798270; x=1750403070;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=9lr44vwlM0LEX+cpiN1/J8lHdDHJMLoAbvjS/gedBGs=;\n\tb=SuUt3/UrVVoAs8nwAaPrcx3Wu7qjiBaTjuPLMGdVwNCEu4sBeBtezFXNDQnrb6PIse\n\tJZ6SW2kdaaId5RwtkEm6g1uOZsKtujpK8P2PK5wWozMUnaeVWKTTnlVzv8XbefIiF9PJ\n\txawPa/sHfAISWsVX7XAIWnsKza7KRaBXBBj2e9oB4tfr4vg1rCUKNeGnIO3wQNgJfQwF\n\thhu84UhcQEi8Fc0TxTK729U+l5A7Fl1ASOpAY8H6BBZ0Cln5ho6VdcEps1nPn55rdces\n\to1GGYuLl7RcvIfikn+x8yS59wMebyF0BdA2YMpoFWHkjKlfsQROIicCtMF8uVy2nXKLb\n\tJshw==","X-Gm-Message-State":"AOJu0Yx7jARA3ZrljTB26AMtYAjw03nISUfXynytqTdAMws9jcytG5RL\n\toibZEuQ1e4JT3oI3i68U1cGRu2i2SmkO9TjclXtGh/B3FHRcRTnQh9rlECqIY22QZCGgI2Pr94s\n\t3Ht3Xc9O0M0pUGWgQQuNwHJYwsuIUOkmeUNzu+zZ1jA==","X-Gm-Gg":"ASbGncuAaBYJjSJP7jwUNPG5XAiRsLxcJupV5/gvb22VnrVi8uV5w8YHywooO6AOBLC\n\tD+Xta69xMTDG8wigyGOQi+DZOd3DTAAVyDGpRVwEfHOzuZIdW9cArsfshDdku7EyXn5F+FKElpd\n\t5M/QdSRNI0HbADv8SXalMS4QslcX+e5DbPebw7HebXpXidSPYvLYg71h92XMRUSn7vIQ1Jy7XtB\n\t08=","X-Google-Smtp-Source":"AGHT+IG4R6bxjByanpNLWjIxqNbcXiVKuGi0I1vUVtNEVQpwEy/NlKYEK79Nk9XCYOpidyGU3fm8IeZfIOy+ZuL/MFY=","X-Received":"by 2002:a05:6102:6884:b0:4e7:e0a2:7818 with SMTP id\n\tada2fe7eead31-4e7e39ed631mr393424137.8.1749798269907; Fri, 13 Jun 2025\n\t00:04:29 -0700 (PDT)","MIME-Version":"1.0","References":"<20250606105651.1624640-1-naush@raspberrypi.com>\n\t<20250606105651.1624640-2-naush@raspberrypi.com>\n\t<174974580474.896144.2382618567667227657@ping.linuxembedded.co.uk>","In-Reply-To":"<174974580474.896144.2382618567667227657@ping.linuxembedded.co.uk>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 13 Jun 2025 08:04:19 +0100","X-Gm-Features":"AX0GCFsadh6Z-wHhkRZyqu1eX2i2mSucgZZis6ccF4WakdjP3LuUt9TZ2-1B5CA","Message-ID":"<CAEmqJPpRmwjfESeT0qDhDNf26_3A9mnii+u+A__mHq8ZzQky5g@mail.gmail.com>","Subject":"Re: [PATCH v3 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, \n\tDavid Plowman <david.plowman@raspberrypi.com>, \n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000004e87f006376ea8ed\"","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>"}}]