{"id":20837,"url":"https://patchwork.libcamera.org/api/1.1/patches/20837/?format=json","web_url":"https://patchwork.libcamera.org/patch/20837/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20240808102346.13065-7-naush@raspberrypi.com>","date":"2024-08-08T10:23:45","name":"[v1,6/7] pipeline: rpi: Pass ISP output index into platformSetIspCrop()","commit_ref":null,"pull_url":null,"state":"superseded","archived":true,"hash":"9fbf745d22b344ba15962149d4393a911d6abc0b","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20837/mbox/","series":[{"id":4501,"url":"https://patchwork.libcamera.org/api/1.1/series/4501/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4501","date":"2024-08-08T10:23:39","name":"Raspberry Pi: Add controls::rpi::ScalerCrops","version":1,"mbox":"https://patchwork.libcamera.org/series/4501/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20837/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20837/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 EE232C32D7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Aug 2024 10:24:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A2D64633C3;\n\tThu,  8 Aug 2024 12:24:02 +0200 (CEST)","from mail-lj1-x232.google.com (mail-lj1-x232.google.com\n\t[IPv6:2a00:1450:4864:20::232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1827B6337F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Aug 2024 12:23:51 +0200 (CEST)","by mail-lj1-x232.google.com with SMTP id\n\t38308e7fff4ca-2f035ae1083so7481681fa.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 08 Aug 2024 03:23:51 -0700 (PDT)","from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-36d272290c2sm1404234f8f.92.2024.08.08.03.23.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 08 Aug 2024 03:23:49 -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=\"NL1LjAMi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1723112630; x=1723717430;\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=VjueByByZqvccxa/i0QAXN2/rnotxj6xlf7+JpUcICE=;\n\tb=NL1LjAMiOcHdV39I80vkqrKKxRrAoDYQJYhyDvnmU82z+iVuQJBwb9mTnuwFUnfecH\n\tBwZGgabngZtzOUA3b293IjDvQipMMQtiSi07VSnTvfhJJMg2GB9btSvBzEgn/GCkfKD6\n\twAVHUvh3mDGQcokmG+EkbxhkgMb1gIsKhFNYBlXGVNKRoZ34i1Su/l/08pqYCsWCBNul\n\tvv3GWrGESj7w6Yds1lGcP48ydEizeXU7DwBl20M+M6M93rIw06R3l6c49AtRT+KOod8E\n\tACW8PbXizEaXi7Yeabp84sVnF1SJWGnh9MZy0/jzj2XkzKzptXgnZOx0soFxdhl2n9KO\n\tGuRw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1723112630; x=1723717430;\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=VjueByByZqvccxa/i0QAXN2/rnotxj6xlf7+JpUcICE=;\n\tb=CbzI9P92MnSlJ3jb5BdfuiixouLqXvGuprF7Adja+ayKFTu/ArQejrYJpn4TIlnvFT\n\tW8P0H72+tBEYxuQxWiH3I0asKyaxkVoCevLl8XavP+Av96vRcmVX3IkZjkpLJI8HWC1V\n\tyjcT3zb7k1UXGsl0IZiTn2sh8IF69XLFaMHXtAfXnxtcn808fAa+sR5TKNStkmc4996A\n\tDqUhf5T+RaBvVVWiLRk2PGu05fxpO7JM2BcvQA+MAvJ1qBCM5Ywr1R7URtJ5emngTvkU\n\ttaJX9i2+VH19sZN0asSCjg1yNajtbyORc/w3O0nn1BVAVNH0UgNlpVT5gyJK/HnoWet6\n\tXKCA==","X-Gm-Message-State":"AOJu0Ywnf32AWrgAOrpH3bIXMYx3N2e6KW+puSGn3xFgIPwhx1eiduIA\n\tM4Hjt1FdS9cfcXWLmZSJshMWe9DxGgUkW1Vx/OUMVcFYfjxWoJxlCuRZb7qcG8rGIWnqqHZqq2x\n\tt","X-Google-Smtp-Source":"AGHT+IHHvbyJV9J2ORFB/SNQ8SaTTLjCAQ+SFLF0al0KAqRC6nPfOVhy37Rh48UpQU5f8UrtKGr9uA==","X-Received":"by 2002:a2e:90ce:0:b0:2ef:2d5a:485 with SMTP id\n\t38308e7fff4ca-2f19de86b91mr8825831fa.46.1723112629898; \n\tThu, 08 Aug 2024 03:23:49 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>","Subject":"[PATCH v1 6/7] pipeline: rpi: Pass ISP output index into\n\tplatformSetIspCrop()","Date":"Thu,  8 Aug 2024 11:23:45 +0100","Message-Id":"<20240808102346.13065-7-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","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":"At this point, the index is unused, but will be in a future commit where\nwe can set different crops on each ISP output.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n src/libcamera/pipeline/rpi/common/pipeline_base.h   | 2 +-\n src/libcamera/pipeline/rpi/vc4/vc4.cpp              | 4 ++--\n 3 files changed, 4 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 412e71648231..a6ea4e9c47dd 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -1317,7 +1317,7 @@ void CameraData::applyScalerCrop(const ControlList &controls)\n \n \t\tif (ispCrop != cropParams.ispCrop) {\n \t\t\tcropParams.ispCrop = ispCrop;\n-\t\t\tplatformSetIspCrop(ispCrop);\n+\t\t\tplatformSetIspCrop(cropParams.ispIndex, ispCrop);\n \t\t}\n \t}\n }\ndiff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\nindex 0ccfa4e82e86..7959d874dd6f 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n@@ -83,7 +83,7 @@ public:\n \n \tRectangle scaleIspCrop(const Rectangle &ispCrop) const;\n \tvoid applyScalerCrop(const ControlList &controls);\n-\tvirtual void platformSetIspCrop(const Rectangle &ispCrop) = 0;\n+\tvirtual void platformSetIspCrop(unsigned int index, const Rectangle &ispCrop) = 0;\n \n \tvoid cameraTimeout();\n \tvoid frameStarted(uint32_t sequence);\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex ffc45653daf1..04fb3c066baf 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -109,7 +109,7 @@ public:\n \tConfig config_;\n \n private:\n-\tvoid platformSetIspCrop(const Rectangle &ispCrop) override\n+\tvoid platformSetIspCrop([[maybe_unused]] unsigned int index, const Rectangle &ispCrop) override\n \t{\n \t\tRectangle crop = ispCrop;\n \t\tisp_[Isp::Input].dev()->setSelection(V4L2_SEL_TGT_CROP, &crop);\n@@ -707,7 +707,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \tSize size = unicamFormat.size.boundedToAspectRatio(maxSize);\n \tRectangle ispCrop = size.centeredTo(Rectangle(unicamFormat.size).center());\n \n-\tplatformSetIspCrop(ispCrop);\n+\tplatformSetIspCrop(0, ispCrop);\n \t/*\n \t * Set the scaler crop to the value we are using (scaled to native sensor\n \t * coordinates).\n","prefixes":["v1","6/7"]}