From patchwork Mon Sep 30 14:14:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 21430 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 8B9C7C32DB for ; Mon, 30 Sep 2024 14:14:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AEB0B63516; Mon, 30 Sep 2024 16:14:11 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qs+fxVBV"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B00CC6351F for ; Mon, 30 Sep 2024 16:14:02 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42caeb4d671so6138825e9.2 for ; Mon, 30 Sep 2024 07:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1727705642; x=1728310442; 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=KjkCxnvGYGkI5PTky/1pzr2+gdc74PnXCKK21TvDtuE=; b=qs+fxVBV29iMas5ozsSxFCFKON2mG1A+S3L2FCAJ2HA+ZQBk20kUspmA78ZLwwPzug ZicwrKZZIvGn20DH0VZa6V2Fus4G1sAXQ/zLZLAWJosxJeZW9ZkrX6rZtgL8VdTo29se 1CCfJOmA0pWbXvljouPAbTi1ezggMT0L1UA9oD4E6rAZPFIK678le7m4XXJ7oviEcuY6 0gPG0qcpYV+rEePjaWNjIFqFrfH+G8ar1gsCZgsOOlQyO2OuCiNdMLwdMirUTACY61WH 0Nhms5xzI9p2N+q0hLzrmYfesFGP9cEc7EHSvKFYEXVGtAqb/kp0P6Wo5z0znH8naYf7 WLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727705642; x=1728310442; 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=KjkCxnvGYGkI5PTky/1pzr2+gdc74PnXCKK21TvDtuE=; b=skkWRsr/AJxxbkt8bFiyzQz5mU7kPfMaDCwJ6YQZwJgQUu3nlgDOF1HarShoZtpMMS xlKT+BTnmZYM/P3mSm/9NQyWmQEr/Co+k3plmBG8xKhyDaDXsvfxJ6WBoMHSvaOtDNKy FezLG/1MZHgTEmWyX0p1ecGUmrcPMUk1RogHKAKkbPKJauRWZQexINP1kxGwZKSCSdhB FIe3unFJEJXhQG/m/abcYTNJsigg0A8YDsgigPlZA1x9kD57eOdGpNTcadY7mmYlvFeq cU1lpQwuyRM24Tizti4Xwo2yibet9731FRJmwNOFrVAS9vSVnTb2sACfQ/C68RYZu/IP cgBA== X-Gm-Message-State: AOJu0Yz77KbY0qzf+AXTxdRPDH7PPMFeeua4/jkXyAHujOvdhOrCiRBJ H0ufNJgAxzbZ8XgtrlD0xGtpRIK2X5IYombaD+yvpX5epHFWBPTeib/MHLNzDDjqdsdbF0lO7v8 s X-Google-Smtp-Source: AGHT+IHRU5cOhPu0iGoc7ILf+FvE+JaJkVhp2qdmNh5aWjxFbiqmjgTWLF2fmnBcUhSmXliLgaKtxQ== X-Received: by 2002:a05:600c:3b87:b0:42c:ba83:3efa with SMTP id 5b1f17b1804b1-42f5e30dd5cmr30020155e9.0.1727705641724; Mon, 30 Sep 2024 07:14:01 -0700 (PDT) Received: from naush-laptop.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd56e65c3sm9142524f8f.60.2024.09.30.07.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 07:14:01 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , Laurent Pinchart Subject: [PATCH v2 5/7] pipeline: rpi: Track which ISP output is configured for a stream Date: Mon, 30 Sep 2024 15:14:13 +0100 Message-Id: <20240930141415.8857-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930141415.8857-1-naush@raspberrypi.com> References: <20240930141415.8857-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 75babbe17f31..9d23a1994f00 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 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; }