From patchwork Thu Oct 3 07:47:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 21491 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 9109DBD80A for ; Thu, 3 Oct 2024 07:54:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1868C63530; Thu, 3 Oct 2024 09:53:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="g56uDgdd"; dkim-atps=neutral Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 815EB6352C for ; Thu, 3 Oct 2024 09:53:49 +0200 (CEST) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42cae563348so1105895e9.0 for ; Thu, 03 Oct 2024 00:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1727942029; x=1728546829; 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=m+HMPpTvzYXkSdblmG4sRCzch1p6qCvF2EX9uYU6P/c=; b=g56uDgddQ2R6OTMKxECBBYkOpK01NkQWDPjjHpzUSsh3sbB8TiFNQAmNziT2W84Omf OI+LUtj+Li6l/9JvwGSdDo6rwwoNcnqSp1vXW3Ui339fotmgag/HHbtRcXeULYw0Ibm1 IbbKvnJKv5243i1rojk3AJ26ycnIOIP9QMiZe8CstWRvnWhrQ29IAx9WUtnYgJI3fABo Hrw5n2l36u5Q58InfeRHk/jijq/cu5K+ZhbSEdpVANT6pFOIBZAyc5DSFazZUp4o0xs6 XhWdkvaXEVJRMDSvSMpta7z6rf4orVN5YlJTPzaGP1B2Ycu7ClCR50kq8GYftGkATT3h VlFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727942029; x=1728546829; 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=m+HMPpTvzYXkSdblmG4sRCzch1p6qCvF2EX9uYU6P/c=; b=bd9gzOvoscskOiQIhdVD41jqKGX6pEv/m6LC5qVP9ltJY6N/WreGX+YIglTs0wSGSP bbFyrMfxq4bonkFA2BWrKkywV/pOvPNV1uPyuTxQfUGJM8K4f4EglBpiN1m0a+ifGM3s +LnV1xUjbbrvXEdcxUHd0T5iG2u64UsdlJuWQcs4VVOQWI8qKZMc4fGXXOrNPRl9nuKY KQ0cfq5bEapYaGkvsG7nnbLNOKiFKye7SCbiHT2zrUjo5VT92j/+My0GR2iAbuflby7p g/vrqw36HYn9xRuEdqv+tUuRP7M58F9Rb4igZuoGJ6JPe1GkfFqQX5WaHw0TECDBDNvM 5BWg== X-Gm-Message-State: AOJu0Yy6qFnkAHO35M9ojBwRTBfNHy3cDcTwiXNK8paxLYzx+rarXnRl kCUHYihfEay/wWTA2NTlbM4EA00j+ziRkFtalu93JEMZcMPd1plX1HO6s73M1JCezlhio1z1+Bt u X-Google-Smtp-Source: AGHT+IHdf2DX5E19P4CGwDzfmAFfUi//erzlBIbG7DzSjnNiFNsWJywdXgVFwuP0dQqwWj69bwb2nw== X-Received: by 2002:a05:600c:3ba2:b0:42c:baba:13cb with SMTP id 5b1f17b1804b1-42f7d0a1371mr11327285e9.2.1727942028652; Thu, 03 Oct 2024 00:53:48 -0700 (PDT) Received: from naush-laptop.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f8025b583sm8740825e9.12.2024.10.03.00.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 00:53:48 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , Laurent Pinchart , Jacopo Mondi Subject: [PATCH v3 5/7] pipeline: rpi: Track which ISP output is configured for a stream Date: Thu, 3 Oct 2024 08:47:18 +0100 Message-Id: <20241003074720.18882-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241003074720.18882-1-naush@raspberrypi.com> References: <20241003074720.18882-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 ispIndex field to CropParams that is used to track which ISP output (0/1) will be used for a given stream during configuration. Tracking this information is required for an upcoming change where crop rectangles can be specified for each configured stream. Currently, the value is fixed to 0. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/rpi/common/pipeline_base.h | 6 ++++-- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h index 88bd603193f4..9912796ec472 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h @@ -135,8 +135,8 @@ public: IPACameraSensorInfo sensorInfo_; struct CropParams { - CropParams(Rectangle ispCrop_, Size ispMinCropSize_) - : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_) + CropParams(Rectangle ispCrop_, Size ispMinCropSize_, unsigned int ispIndex_) + : ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_), ispIndex(ispIndex_) { } @@ -144,6 +144,8 @@ public: Rectangle ispCrop; /* Minimum crop size in ISP output pixels */ Size ispMinCropSize; + /* Index of the ISP output channel for this crop */ + unsigned int ispIndex; }; /* Mapping of CropParams keyed by the output stream order in CameraConfiguration */ diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index 8080f55a1cf4..cfed214ddbd4 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -714,7 +714,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi */ cropParams_.emplace(std::piecewise_construct, std::forward_as_tuple(0), - std::forward_as_tuple(ispCrop, testCrop.size())); + std::forward_as_tuple(ispCrop, testCrop.size(), 0)); return 0; }