From patchwork Thu Aug 8 10:23:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 20835 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 D88B0C323E for ; Thu, 8 Aug 2024 10:24:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9453A6337F; Thu, 8 Aug 2024 12:23:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="JZgKu1iB"; dkim-atps=neutral Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D3A4B63398 for ; Thu, 8 Aug 2024 12:23:49 +0200 (CEST) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42816ca797fso5632385e9.2 for ; Thu, 08 Aug 2024 03:23:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1723112629; x=1723717429; 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=Yf16f/8809mBEiavgIV3g6OlgJ66hlAI1lvZj9UlDg4=; b=JZgKu1iBhAb6oL+1qE53nEtQoCzT7R28M84WLqdw/t6f3bB04/B5PKEwQXGceeiIl4 a5lqV2gqooi2EU2AsHsbEOobRYFPwLfvKo/lSTuhEwDunDeic4gTzlANz5xykAISB3fX y1owLJfcs93ceeFKAmEElSqhteTnEv8YgFGL10HUGPCUogypXp890dfNM0hu2YHL35H1 NGPDe99RVbVLuoQDDjehHqUoUDt2HnXtF6LTnKXdrLD8YkOoGCPshXsbkpLgyw0uR5vF lkVHCTofk1DZzysed5n6xmWvrDoKyp14evzeHT5h+rJ3KEGW3ipwL6mQdv9LC4YkUYTH fOXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723112629; x=1723717429; 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=Yf16f/8809mBEiavgIV3g6OlgJ66hlAI1lvZj9UlDg4=; b=ENpkXew9q5JHzzV1JOZTSknnO5kdLbE9fuGKLmGPO07y7p2Vn41werL0qAdT6CHVp2 TnCcidJUBhp2N7uqOy76dVMfW5OGlzq+rICQt6NO0uBgcrhf4Kd1tyBmU2h9hip1vlqY 6YG9/DaFrReEBi1pAlFC76uakFfjQplZIz9U9WqLCIwj60VIX38sSjoKliaCI+dDq4So 0aEZLmR0EEetMrIYD3K8miJzDqZI2IMqu4Kta2csSsg1vQgQTZovsgRTkvYczhJt6bZU vEA7tSwOeb8/2lt8ebfQcq00kWGHaKABkatWvgLmfMxCnOBhHke4t7JMDWrZ6ub8WBhg iNkw== X-Gm-Message-State: AOJu0Yxy1cC+y/WuB8wl4HMTObrhRGoRMj9Nuh6gDYdhjGaWz6sAo0L1 DARkjXhLFyIpLOYGm0WWBKNJdSNU/ucANXclaUr2QfkFVlggOWgSRF4oMouG3/UfdHUs+wtq2iD 4 X-Google-Smtp-Source: AGHT+IHsyns4ohzuHV8hf8rQvX1bSTc60E5TDbh8+itCX3HD3Xg1GY/v/wQe6SzNPFaExcFrfpdwMA== X-Received: by 2002:a5d:50ca:0:b0:367:8ff0:e022 with SMTP id ffacd0b85a97d-36d275830eamr957298f8f.63.1723112628875; Thu, 08 Aug 2024 03:23:48 -0700 (PDT) Received: from naush-laptop.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36d272290c2sm1404234f8f.92.2024.08.08.03.23.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 03:23:48 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v1 5/7] pipeline: rpi: Track which ISP output is configured for a stream Date: Thu, 8 Aug 2024 11:23:44 +0100 Message-Id: <20240808102346.13065-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240808102346.13065-1-naush@raspberrypi.com> References: <20240808102346.13065-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 --- 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 2bed905178bc..0ccfa4e82e86 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_) { } @@ -148,6 +148,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 stream index in CameraConfiguration */ diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index d118252f02dd..ffc45653daf1 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -715,7 +715,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi cropParams_.clear(); cropParams_.emplace(std::piecewise_construct, std::forward_as_tuple(0), - std::forward_as_tuple(scaleIspCrop(ispCrop), testCrop.size())); + std::forward_as_tuple(scaleIspCrop(ispCrop), testCrop.size(), 0)); return 0; }