From patchwork Thu Dec 19 21:10:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 22418 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 CD8BFBD7D8 for ; Thu, 19 Dec 2024 21:10:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D2BDC68479; Thu, 19 Dec 2024 22:10:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="YpFP+CSb"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EECB68471 for ; Thu, 19 Dec 2024 22:10:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734642623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uf4gBN0ZvpYwIkMbhn8KswbtpedXWWNv9puo5ThpWlQ=; b=YpFP+CSblHSZXhPrsR94i99JqV45e0rOcaKTkzgaHjXkwQxYT5cNO9QTNtDqG+x1nlyPJW x5UseshThXk96c/JnF7nbjDoMcOkrCXgrFuvmYgtNrN7W9WgSBWuNo4O90yGhAGegT8gcs nO9t1gqS/yV+JQ9jQm91jOEItyiPRaw= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-hpOorTGONQ-oAtYCsMrU4Q-1; Thu, 19 Dec 2024 16:10:19 -0500 X-MC-Unique: hpOorTGONQ-oAtYCsMrU4Q-1 X-Mimecast-MFC-AGG-ID: hpOorTGONQ-oAtYCsMrU4Q Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A5590195609D; Thu, 19 Dec 2024 21:10:18 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.224.37]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CE2DE300F9B5; Thu, 19 Dec 2024 21:10:16 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham , Laurent Pinchart Subject: [PATCH v2 0/5] ipa: simple: Introduce metadata reporting Date: Thu, 19 Dec 2024 22:10:05 +0100 Message-ID: <20241219211010.103310-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: slklxDNlgo1AoLWKTKU_sJcf5-aYhtB97fBV16ef9cc_1734642618 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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" Provide metadata reporting for the software ISP. Initially the Black Levels, ColourGains and Contrast are reported, but also serve as a direction to add further metadata or internal reporting of the software ISP. Running cam -c1 -C10 --metadata now produces the following: 1668.359684 (14.95 fps) cam0-stream0 seq: 000004 bytesused: 15069888 SensorBlackLevels = [ 4096, 4096, 4096, 4096 ] ColourGains = [ 0.316406, 0.299805 ] SensorTimestamp = 1668359684000 Changes in v2: - Taken over from Kieran. - Updated for master. - Black level is reported as uint16_t, according to the control documentation. - Contrast value is reported in metadata. - The metadata used to proces the image is reported rather than the metadata determined from the image. - Metadata is reported using a new signal rather than (ab)using setIspParams; this change is less or more needed due to changed simple IPA structure since v1. - Frame -> request mapping is introduced to make sure the metadata is assigned to the right request. Kieran Bingham (3): ipa: simple: softisp: Extend to pass metadata ipa: simple: Report the ColourGains in metadata ipa: simple: Report black levels in metadata Milan Zamazal (2): libcamera: software_isp: Track frames and requests ipa: simple: Report contrast in metadata .../internal/software_isp/software_isp.h | 2 + include/libcamera/ipa/soft.mojom | 1 + src/ipa/simple/algorithms/awb.cpp | 11 +- src/ipa/simple/algorithms/blc.cpp | 9 +- src/ipa/simple/algorithms/lut.cpp | 11 ++ src/ipa/simple/algorithms/lut.h | 5 + src/ipa/simple/soft_simple.cpp | 7 +- src/libcamera/pipeline/simple/simple.cpp | 108 +++++++++++++++++- src/libcamera/software_isp/software_isp.cpp | 11 ++ 9 files changed, 151 insertions(+), 14 deletions(-)