From patchwork Fri Jun 6 10:55:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 23475 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id C1ECBC31E9 for ; Fri, 6 Jun 2025 10:57:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3B7EC68DBD; Fri, 6 Jun 2025 12:56:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="kEvJafhd"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5673868DB3 for ; Fri, 6 Jun 2025 12:56:55 +0200 (CEST) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-450cfb8b335so1660795e9.2 for ; Fri, 06 Jun 2025 03:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1749207415; x=1749812215; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a2HaDOVW+9Aps8YprLiWRQYgcbe5COfEJ4ggym7ZoOg=; b=kEvJafhdRiQf7FQuchsE+Me+zLR+Or6Vc0Rt+fCiZYRbDVsxKcI5r02xVAI/uSX5vZ U/RE0Hf+qyMCLhcCp+jXXpoiXdrP2ahOd3tdkXy/MSW/rxr39RHNla2vON4KD5NeZ0Hv x1L/1EUvBWEb+GDXnfEalvJlFI7nTnMeTN7Vm7iSGhw9BFWLaR9YuxuZGPetYewQaFlx p4IjRUc1GAL+0Kiauifi/2aolLbqu1OwifJ5CEvHfzRq2M8WKXSFPuITUAaR62X/vt8o nU9tAOwqGzCpMyOuzIcTIL8d9zIw7GmCCbVCVGCfqfatfro+NK5z1so0O8xue9sokcZo bIHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749207415; x=1749812215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a2HaDOVW+9Aps8YprLiWRQYgcbe5COfEJ4ggym7ZoOg=; b=AkuVuRD2+8rT5EqXM7ABXeDMEVa56kUfTmNFmOBI22vj2Rt0F+YGa3nX3X3oQFG1qU nRJRgDIj7tgTyFFZx5y4OZvIfrCUKXgZhTa6KgbblDVLZeefS5b2TRa8wICZfg9OF/Re NAHyeY8QCE/fMHENvQLJl7N0n7BJiv3uXgeZzySqL+CyTxz38Jxe2eXXNJxSavovqXz5 dwfRwChQFUhCZT4rUM7BjBPHVQVGx9bAbf6tZyeebzMTiBQ1ML4rhuOeJXnaU1J5c1DE C5vrMijV+rvoByT9pm/QfHtvH6oUEA9Z5Ye6qAYKgfJXSiiszQxi1lkSSdpdZPXtUQh5 y1JQ== X-Gm-Message-State: AOJu0YwOZo+drj4QfH0+E9v4Rnc1mOdCnzHLYH8hvX7jyk3+XgiOwKFI KUwhS4fAqfuBHpyxGVRlDaSUdt7FHRV8MC74RIebPR1T7qnDe2WSuSvDGZuL0qX3DiAeOg3vkac szPul X-Gm-Gg: ASbGncuAcOPFgzwoGRiEpNvjf0+Y/gk09w9LORV9sOlCpZtHN7Kw4BuUlbn5StIRe0D oZH+j2jvcaMTXKaxrFWjipxWAoh5HsYmv7QVqZMrhsxfOAv3rTC+NiuGnoDGNXM5qsukEshsog4 8aKPhu2+34a4nzUg0sMaF8kNMMpBhcnDu7ozTa5iaKcU63rYLvVX9pHU6h5ZX0YHcs58z3lvjYD FzX3Z/PV24bAhUYtYMbfxP1AuxjyH8Jj9yVSYKFJ56Ul42ZWKM8EicRRDmKOLAiwt+PjKL1PxN/ R55olZgsqJs5LEB8JllmapvNDCncuXuaVvFSEiNc67iAEu44u6KCOB8xRbur3eQj09CJSJN4+Me X+qp+coHBB3g= X-Google-Smtp-Source: AGHT+IFsZoV8v23pcDTpfzEZ0vwNFgfV+Qih5ZUVTxL+u4p6Zagv2jV8fET5gQjsPlZRr2QTHpKfYA== X-Received: by 2002:a05:6000:2211:b0:3a4:e667:9226 with SMTP id ffacd0b85a97d-3a533191a08mr671186f8f.10.1749207414596; Fri, 06 Jun 2025 03:56:54 -0700 (PDT) Received: from NAUSH-P-DELL.tail9c427.ts.net ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-452137277afsm20092455e9.30.2025.06.06.03.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jun 2025 03:56:54 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Jacopo Mondi Subject: [PATCH v3 1/6] libcamera: framebuffer: Add FrameMetadata::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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a new status enum, FrameStartup, used to denote that even though the frame has been successfully captured, the IQ parameters set by the IPA will cause the frame to be unusable and applications are advised to not consume this frame. An example of this would be on a cold-start of the 3A algorithms, and there will be large oscillations to converge to a stable state quickly. Additional, update the definition of the FrameError state to cover the usage when the sensor is known to produce a number of invalid/error frames after stream-on. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- include/libcamera/framebuffer.h | 1 + src/libcamera/framebuffer.cpp | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h index ff83924300ac..e83825b466aa 100644 --- a/include/libcamera/framebuffer.h +++ b/include/libcamera/framebuffer.h @@ -26,6 +26,7 @@ struct FrameMetadata { FrameSuccess, FrameError, FrameCancelled, + FrameStartup, }; struct Plane { diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp index 826848f75a56..93be497be052 100644 --- a/src/libcamera/framebuffer.cpp +++ b/src/libcamera/framebuffer.cpp @@ -43,12 +43,19 @@ LOG_DEFINE_CATEGORY(Buffer) * The frame has been captured with success and contains valid data. All fields * of the FrameMetadata structure are valid. * \var FrameMetadata::FrameError - * An error occurred during capture of the frame. The frame data may be partly - * or fully invalid. The sequence and timestamp fields of the FrameMetadata - * structure is valid, the other fields may be invalid. + * The frame data is partly or fully corrupted, missing or otherwise invalid. + * This can for instance indicate a hardware transmission error, or invalid data + * produced by the sensor during its startup phase. The sequence and timestamp + * fields of the FrameMetadata structure is valid, all the other fields may be + * invalid. * \var FrameMetadata::FrameCancelled * Capture stopped before the frame completed. The frame data is not valid. All * fields of the FrameMetadata structure but the status field are invalid. + * \var FrameMetadata::FrameStartup The frame has been successfully captured. + * However, the IPA is in a cold-start or reset phase and will result in image + * quality parameters producing unusable images. Applications are recommended to + * not consume these frames. All other fields of the FrameMetadata structure are + * valid. */ /**