From patchwork Thu Oct 31 09:49:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 21786 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 9E5ECC330C for ; Thu, 31 Oct 2024 09:52:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8C132653AF; Thu, 31 Oct 2024 10:52:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="V69RPKKX"; dkim-atps=neutral Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CA1E653B1 for ; Thu, 31 Oct 2024 10:52:46 +0100 (CET) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4315ce4d250so1110695e9.2 for ; Thu, 31 Oct 2024 02:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1730368365; x=1730973165; 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=V69RPKKXF2BW8FsHwomgaEnlEQ0VDPeWFi52N/fpBxfd4TGE6sA6By/ftFHZnktW3K 7ox8NHMjhHwCa29a+Y0rVkQZvKLgJMvYyaLKR7f20WTMOaI529HCffIa6lOnnvBO4jgE LdejEzXCNFdJaFxVxJ+AC6Brf2UTh6NY+ScbgYpimup/LQtDWGutvkPMbwbYWnfEakXO X9Bvggt2zzunVBlLl0K72qZmWWH6UizYwXOTBCg6Lr3eolWa7OGJcuQdW6nr9rqzRATN sWK+Oa8PKX9yfoC5tpw/wn6rG3W7uc+o5rElkmZNGLwj+rlQbIJm9P/TX3iGRzmsIDdc LPAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730368365; x=1730973165; 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=ezB2egE3kMrm+v9Nv3As3M2e99qiu5NlHv4Lm8ZhtUr67pRor9TelhdmQyVxyCiq8w 3tcmKD6eKa9fgQusEyVIFiYRyoPCtpcOWSYX33G3edbhhRvSs/LJyEnYKpEagHOP4xgw KtgMr3LvL1nvfeNalRqS5sIANO7N5EFGOpralHSyzV1Nnpawj2MxkQeT/mZQRwtwyFcm zyfoAc/DFmYOtLKCJ6O4ovXTU2k8TR3O9V7AzlfWM16AgR7F/9dHjG4TfliEudy0ZDiU eFm0zgI5VFEQCfXZGxJLBgF5yh4ntfNFrfUr8kKMAB0OVX2KtWvnwJ0q8gRU6ToggpXK f7pw== X-Gm-Message-State: AOJu0Ywf2CWWYwOHD4qCAp8hb5GN0YDE94svEyuJr7N3Ac5NkIVC4QXF QMGqXdmSdwNhH2ZJC/3p6gdZIF4KFZx17eksS2krnDY6/GT0PJ1lpfm4RxfUBeSAmxT3hPmokMp m X-Google-Smtp-Source: AGHT+IGTxlcZIevLQcruaS0eSC8GVIDqQMmKIGOgNrbEHrrIBm8FFcL8dvZj5tXfimS28lgTCMPC2Q== X-Received: by 2002:a05:600c:4fd4:b0:42c:aeee:e604 with SMTP id 5b1f17b1804b1-4319ad41ba8mr69907905e9.8.1730368365060; Thu, 31 Oct 2024 02:52:45 -0700 (PDT) Received: from naush-laptop.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d6983c2sm19789835e9.42.2024.10.31.02.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 02:52:44 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , Laurent Pinchart , Jacopo Mondi Subject: [PATCH v4 5/7] pipeline: rpi: Track which ISP output is configured for a stream Date: Thu, 31 Oct 2024 09:49:55 +0000 Message-Id: <20241031094957.18471-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241031094957.18471-1-naush@raspberrypi.com> References: <20241031094957.18471-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; }