{"id":23475,"url":"https://patchwork.libcamera.org/api/patches/23475/?format=json","web_url":"https://patchwork.libcamera.org/patch/23475/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250606105651.1624640-2-naush@raspberrypi.com>","date":"2025-06-06T10:55:19","name":"[v3,1/6] libcamera: framebuffer: Add FrameMetadata::Status::FrameStartup","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"f0f1916ebd6c518b278708915b763263af80c644","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23475/mbox/","series":[{"id":5209,"url":"https://patchwork.libcamera.org/api/series/5209/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5209","date":"2025-06-06T10:55:18","name":"Eliminating startup frames","version":3,"mbox":"https://patchwork.libcamera.org/series/5209/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23475/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23475/checks/","tags":{},"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 C1ECBC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Jun 2025 10:57:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B7EC68DBD;\n\tFri,  6 Jun 2025 12:56:58 +0200 (CEST)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5673868DB3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Jun 2025 12:56:55 +0200 (CEST)","by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-450cfb8b335so1660795e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 06 Jun 2025 03:56:55 -0700 (PDT)","from NAUSH-P-DELL.tail9c427.ts.net ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-452137277afsm20092455e9.30.2025.06.06.03.56.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 06 Jun 2025 03:56:54 -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=\"kEvJafhd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1749207415; x=1749812215;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=a2HaDOVW+9Aps8YprLiWRQYgcbe5COfEJ4ggym7ZoOg=;\n\tb=kEvJafhdRiQf7FQuchsE+Me+zLR+Or6Vc0Rt+fCiZYRbDVsxKcI5r02xVAI/uSX5vZ\n\tU/RE0Hf+qyMCLhcCp+jXXpoiXdrP2ahOd3tdkXy/MSW/rxr39RHNla2vON4KD5NeZ0Hv\n\tx1L/1EUvBWEb+GDXnfEalvJlFI7nTnMeTN7Vm7iSGhw9BFWLaR9YuxuZGPetYewQaFlx\n\tp4IjRUc1GAL+0Kiauifi/2aolLbqu1OwifJ5CEvHfzRq2M8WKXSFPuITUAaR62X/vt8o\n\tnU9tAOwqGzCpMyOuzIcTIL8d9zIw7GmCCbVCVGCfqfatfro+NK5z1so0O8xue9sokcZo\n\tbIHg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1749207415; x=1749812215;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=a2HaDOVW+9Aps8YprLiWRQYgcbe5COfEJ4ggym7ZoOg=;\n\tb=AkuVuRD2+8rT5EqXM7ABXeDMEVa56kUfTmNFmOBI22vj2Rt0F+YGa3nX3X3oQFG1qU\n\tnRJRgDIj7tgTyFFZx5y4OZvIfrCUKXgZhTa6KgbblDVLZeefS5b2TRa8wICZfg9OF/Re\n\tNAHyeY8QCE/fMHENvQLJl7N0n7BJiv3uXgeZzySqL+CyTxz38Jxe2eXXNJxSavovqXz5\n\tdwfRwChQFUhCZT4rUM7BjBPHVQVGx9bAbf6tZyeebzMTiBQ1ML4rhuOeJXnaU1J5c1DE\n\tC5vrMijV+rvoByT9pm/QfHtvH6oUEA9Z5Ye6qAYKgfJXSiiszQxi1lkSSdpdZPXtUQh5\n\ty1JQ==","X-Gm-Message-State":"AOJu0YwOZo+drj4QfH0+E9v4Rnc1mOdCnzHLYH8hvX7jyk3+XgiOwKFI\n\tKUwhS4fAqfuBHpyxGVRlDaSUdt7FHRV8MC74RIebPR1T7qnDe2WSuSvDGZuL0qX3DiAeOg3vkac\n\tszPul","X-Gm-Gg":"ASbGncuAcOPFgzwoGRiEpNvjf0+Y/gk09w9LORV9sOlCpZtHN7Kw4BuUlbn5StIRe0D\n\toZH+j2jvcaMTXKaxrFWjipxWAoh5HsYmv7QVqZMrhsxfOAv3rTC+NiuGnoDGNXM5qsukEshsog4\n\t8aKPhu2+34a4nzUg0sMaF8kNMMpBhcnDu7ozTa5iaKcU63rYLvVX9pHU6h5ZX0YHcs58z3lvjYD\n\tFzX3Z/PV24bAhUYtYMbfxP1AuxjyH8Jj9yVSYKFJ56Ul42ZWKM8EicRRDmKOLAiwt+PjKL1PxN/\n\tR55olZgsqJs5LEB8JllmapvNDCncuXuaVvFSEiNc67iAEu44u6KCOB8xRbur3eQj09CJSJN4+Me\n\tX+qp+coHBB3g=","X-Google-Smtp-Source":"AGHT+IFsZoV8v23pcDTpfzEZ0vwNFgfV+Qih5ZUVTxL+u4p6Zagv2jV8fET5gQjsPlZRr2QTHpKfYA==","X-Received":"by 2002:a05:6000:2211:b0:3a4:e667:9226 with SMTP id\n\tffacd0b85a97d-3a533191a08mr671186f8f.10.1749207414596; \n\tFri, 06 Jun 2025 03:56:54 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[PATCH v3 1/6] libcamera: framebuffer: Add\n\tFrameMetadata::Status::FrameStartup","Date":"Fri,  6 Jun 2025 11:55:19 +0100","Message-ID":"<20250606105651.1624640-2-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250606105651.1624640-1-naush@raspberrypi.com>","References":"<20250606105651.1624640-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"Add a new status enum, FrameStartup, used to denote that even though\nthe frame has been successfully captured, the IQ parameters set by the\nIPA will cause the frame to be unusable and applications are advised to\nnot consume this frame. An example of this would be on a cold-start of\nthe 3A algorithms, and there will be large oscillations to converge to\na stable state quickly.\n\nAdditional, update the definition of the FrameError state to cover the\nusage when the sensor is known to produce a number of invalid/error\nframes after stream-on.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-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(-)","diff":"diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h\nindex 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 {\ndiff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp\nindex 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","prefixes":["v3","1/6"]}