{"id":21786,"url":"https://patchwork.libcamera.org/api/patches/21786/?format=json","web_url":"https://patchwork.libcamera.org/patch/21786/","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":"<20241031094957.18471-6-naush@raspberrypi.com>","date":"2024-10-31T09:49:55","name":"[v4,5/7] pipeline: rpi: Track which ISP output is configured for a stream","commit_ref":"d6a1d9596bca20188ad90c99654cf9dbff5de403","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/21786/mbox/","series":[{"id":4760,"url":"https://patchwork.libcamera.org/api/series/4760/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4760","date":"2024-10-31T09:49:50","name":"Raspberry Pi: Add controls::rpi::ScalerCrops","version":4,"mbox":"https://patchwork.libcamera.org/series/4760/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21786/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21786/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 9E5ECC330C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 31 Oct 2024 09:52:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8C132653AF;\n\tThu, 31 Oct 2024 10:52:53 +0100 (CET)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CA1E653B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Oct 2024 10:52:46 +0100 (CET)","by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-4315ce4d250so1110695e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Oct 2024 02:52:46 -0700 (PDT)","from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4327d6983c2sm19789835e9.42.2024.10.31.02.52.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 31 Oct 2024 02:52:44 -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=\"V69RPKKX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1730368365; x=1730973165;\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=V69RPKKXF2BW8FsHwomgaEnlEQ0VDPeWFi52N/fpBxfd4TGE6sA6By/ftFHZnktW3K\n\t7ox8NHMjhHwCa29a+Y0rVkQZvKLgJMvYyaLKR7f20WTMOaI529HCffIa6lOnnvBO4jgE\n\tLdejEzXCNFdJaFxVxJ+AC6Brf2UTh6NY+ScbgYpimup/LQtDWGutvkPMbwbYWnfEakXO\n\tX9Bvggt2zzunVBlLl0K72qZmWWH6UizYwXOTBCg6Lr3eolWa7OGJcuQdW6nr9rqzRATN\n\tsWK+Oa8PKX9yfoC5tpw/wn6rG3W7uc+o5rElkmZNGLwj+rlQbIJm9P/TX3iGRzmsIDdc\n\tLPAw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1730368365; x=1730973165;\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=ezB2egE3kMrm+v9Nv3As3M2e99qiu5NlHv4Lm8ZhtUr67pRor9TelhdmQyVxyCiq8w\n\t3tcmKD6eKa9fgQusEyVIFiYRyoPCtpcOWSYX33G3edbhhRvSs/LJyEnYKpEagHOP4xgw\n\tKtgMr3LvL1nvfeNalRqS5sIANO7N5EFGOpralHSyzV1Nnpawj2MxkQeT/mZQRwtwyFcm\n\tzyfoAc/DFmYOtLKCJ6O4ovXTU2k8TR3O9V7AzlfWM16AgR7F/9dHjG4TfliEudy0ZDiU\n\teFm0zgI5VFEQCfXZGxJLBgF5yh4ntfNFrfUr8kKMAB0OVX2KtWvnwJ0q8gRU6ToggpXK\n\tf7pw==","X-Gm-Message-State":"AOJu0Ywf2CWWYwOHD4qCAp8hb5GN0YDE94svEyuJr7N3Ac5NkIVC4QXF\n\tQMGqXdmSdwNhH2ZJC/3p6gdZIF4KFZx17eksS2krnDY6/GT0PJ1lpfm4RxfUBeSAmxT3hPmokMp\n\tm","X-Google-Smtp-Source":"AGHT+IGTxlcZIevLQcruaS0eSC8GVIDqQMmKIGOgNrbEHrrIBm8FFcL8dvZj5tXfimS28lgTCMPC2Q==","X-Received":"by 2002:a05:600c:4fd4:b0:42c:aeee:e604 with SMTP id\n\t5b1f17b1804b1-4319ad41ba8mr69907905e9.8.1730368365060; \n\tThu, 31 Oct 2024 02:52:45 -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 v4 5/7] pipeline: rpi: Track which ISP output is configured\n\tfor 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","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":["v4","5/7"]}