{"id":21491,"url":"https://patchwork.libcamera.org/api/patches/21491/?format=json","web_url":"https://patchwork.libcamera.org/patch/21491/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20241003074720.18882-6-naush@raspberrypi.com>","date":"2024-10-03T07:47:18","name":"[v3,5/7] pipeline: rpi: Track which ISP output is configured for a stream","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"1404d6c8c46e54a102e284fbba275b4cb3a44f1a","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/21491/mbox/","series":[{"id":4651,"url":"https://patchwork.libcamera.org/api/series/4651/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4651","date":"2024-10-03T07:47:13","name":"Raspberry Pi: Add controls::rpi::ScalerCrops","version":3,"mbox":"https://patchwork.libcamera.org/series/4651/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21491/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21491/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9109DBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  3 Oct 2024 07:54:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1868C63530;\n\tThu,  3 Oct 2024 09:53:59 +0200 (CEST)","from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 815EB6352C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  3 Oct 2024 09:53:49 +0200 (CEST)","by mail-wm1-x32b.google.com with SMTP id\n\t5b1f17b1804b1-42cae563348so1105895e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 03 Oct 2024 00:53:49 -0700 (PDT)","from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-42f8025b583sm8740825e9.12.2024.10.03.00.53.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 03 Oct 2024 00:53:48 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"g56uDgdd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727942029; x=1728546829;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=m+HMPpTvzYXkSdblmG4sRCzch1p6qCvF2EX9uYU6P/c=;\n\tb=g56uDgddQ2R6OTMKxECBBYkOpK01NkQWDPjjHpzUSsh3sbB8TiFNQAmNziT2W84Omf\n\tOI+LUtj+Li6l/9JvwGSdDo6rwwoNcnqSp1vXW3Ui339fotmgag/HHbtRcXeULYw0Ibm1\n\tIbbKvnJKv5243i1rojk3AJ26ycnIOIP9QMiZe8CstWRvnWhrQ29IAx9WUtnYgJI3fABo\n\tHrw5n2l36u5Q58InfeRHk/jijq/cu5K+ZhbSEdpVANT6pFOIBZAyc5DSFazZUp4o0xs6\n\tXhWdkvaXEVJRMDSvSMpta7z6rf4orVN5YlJTPzaGP1B2Ycu7ClCR50kq8GYftGkATT3h\n\tVlFg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727942029; x=1728546829;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=m+HMPpTvzYXkSdblmG4sRCzch1p6qCvF2EX9uYU6P/c=;\n\tb=bd9gzOvoscskOiQIhdVD41jqKGX6pEv/m6LC5qVP9ltJY6N/WreGX+YIglTs0wSGSP\n\tbbFyrMfxq4bonkFA2BWrKkywV/pOvPNV1uPyuTxQfUGJM8K4f4EglBpiN1m0a+ifGM3s\n\t+LnV1xUjbbrvXEdcxUHd0T5iG2u64UsdlJuWQcs4VVOQWI8qKZMc4fGXXOrNPRl9nuKY\n\tKQ0cfq5bEapYaGkvsG7nnbLNOKiFKye7SCbiHT2zrUjo5VT92j/+My0GR2iAbuflby7p\n\tg/vrqw36HYn9xRuEdqv+tUuRP7M58F9Rb4igZuoGJ6JPe1GkfFqQX5WaHw0TECDBDNvM\n\t5BWg==","X-Gm-Message-State":"AOJu0Yy6qFnkAHO35M9ojBwRTBfNHy3cDcTwiXNK8paxLYzx+rarXnRl\n\tkCUHYihfEay/wWTA2NTlbM4EA00j+ziRkFtalu93JEMZcMPd1plX1HO6s73M1JCezlhio1z1+Bt\n\tu","X-Google-Smtp-Source":"AGHT+IHdf2DX5E19P4CGwDzfmAFfUi//erzlBIbG7DzSjnNiFNsWJywdXgVFwuP0dQqwWj69bwb2nw==","X-Received":"by 2002:a05:600c:3ba2:b0:42c:baba:13cb with SMTP id\n\t5b1f17b1804b1-42f7d0a1371mr11327285e9.2.1727942028652; \n\tThu, 03 Oct 2024 00:53:48 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[PATCH v3 5/7] pipeline: rpi: Track which ISP output is configured\n\tfor 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","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a ispIndex field to CropParams that is used to track\nwhich ISP output (0/1) will be used for a given stream during\nconfiguration.\n\nTracking this information is required for an upcoming change where crop\nrectangles can be specified for each configured stream. Currently, the\nvalue is fixed to 0.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.h | 6 ++++--\n src/libcamera/pipeline/rpi/vc4/vc4.cpp            | 2 +-\n 2 files changed, 5 insertions(+), 3 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\nindex 88bd603193f4..9912796ec472 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n@@ -135,8 +135,8 @@ public:\n \tIPACameraSensorInfo sensorInfo_;\n \n \tstruct CropParams {\n-\t\tCropParams(Rectangle ispCrop_, Size ispMinCropSize_)\n-\t\t\t: ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_)\n+\t\tCropParams(Rectangle ispCrop_, Size ispMinCropSize_, unsigned int ispIndex_)\n+\t\t\t: ispCrop(ispCrop_), ispMinCropSize(ispMinCropSize_), ispIndex(ispIndex_)\n \t\t{\n \t\t}\n \n@@ -144,6 +144,8 @@ public:\n \t\tRectangle ispCrop;\n \t\t/* Minimum crop size in ISP output pixels */\n \t\tSize ispMinCropSize;\n+\t\t/* Index of the ISP output channel for this crop */\n+\t\tunsigned int ispIndex;\n \t};\n \n \t/* Mapping of CropParams keyed by the output stream order in CameraConfiguration */\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex 8080f55a1cf4..cfed214ddbd4 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -714,7 +714,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \t */\n \tcropParams_.emplace(std::piecewise_construct,\n \t\t\t    std::forward_as_tuple(0),\n-\t\t\t    std::forward_as_tuple(ispCrop, testCrop.size()));\n+\t\t\t    std::forward_as_tuple(ispCrop, testCrop.size(), 0));\n \n \treturn 0;\n }\n","prefixes":["v3","5/7"]}