{"id":21430,"url":"https://patchwork.libcamera.org/api/1.1/patches/21430/?format=json","web_url":"https://patchwork.libcamera.org/patch/21430/","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":"<20240930141415.8857-6-naush@raspberrypi.com>","date":"2024-09-30T14:14:13","name":"[v2,5/7] pipeline: rpi: Track which ISP output is configured for a stream","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"1404d6c8c46e54a102e284fbba275b4cb3a44f1a","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/21430/mbox/","series":[{"id":4639,"url":"https://patchwork.libcamera.org/api/1.1/series/4639/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4639","date":"2024-09-30T14:14:08","name":"Raspberry Pi: Add controls::rpi::ScalerCrops","version":2,"mbox":"https://patchwork.libcamera.org/series/4639/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21430/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21430/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 8B9C7C32DB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Sep 2024 14:14:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AEB0B63516;\n\tMon, 30 Sep 2024 16:14:11 +0200 (CEST)","from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B00CC6351F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 16:14:02 +0200 (CEST)","by mail-wm1-x335.google.com with SMTP id\n\t5b1f17b1804b1-42caeb4d671so6138825e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Sep 2024 07:14:02 -0700 (PDT)","from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-37cd56e65c3sm9142524f8f.60.2024.09.30.07.14.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Sep 2024 07:14:01 -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=\"qs+fxVBV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1727705642; x=1728310442;\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=KjkCxnvGYGkI5PTky/1pzr2+gdc74PnXCKK21TvDtuE=;\n\tb=qs+fxVBV29iMas5ozsSxFCFKON2mG1A+S3L2FCAJ2HA+ZQBk20kUspmA78ZLwwPzug\n\tZicwrKZZIvGn20DH0VZa6V2Fus4G1sAXQ/zLZLAWJosxJeZW9ZkrX6rZtgL8VdTo29se\n\t1CCfJOmA0pWbXvljouPAbTi1ezggMT0L1UA9oD4E6rAZPFIK678le7m4XXJ7oviEcuY6\n\t0gPG0qcpYV+rEePjaWNjIFqFrfH+G8ar1gsCZgsOOlQyO2OuCiNdMLwdMirUTACY61WH\n\t0Nhms5xzI9p2N+q0hLzrmYfesFGP9cEc7EHSvKFYEXVGtAqb/kp0P6Wo5z0znH8naYf7\n\tWLew==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727705642; x=1728310442;\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=KjkCxnvGYGkI5PTky/1pzr2+gdc74PnXCKK21TvDtuE=;\n\tb=skkWRsr/AJxxbkt8bFiyzQz5mU7kPfMaDCwJ6YQZwJgQUu3nlgDOF1HarShoZtpMMS\n\txlKT+BTnmZYM/P3mSm/9NQyWmQEr/Co+k3plmBG8xKhyDaDXsvfxJ6WBoMHSvaOtDNKy\n\tFezLG/1MZHgTEmWyX0p1ecGUmrcPMUk1RogHKAKkbPKJauRWZQexINP1kxGwZKSCSdhB\n\tFIe3unFJEJXhQG/m/abcYTNJsigg0A8YDsgigPlZA1x9kD57eOdGpNTcadY7mmYlvFeq\n\tcU1lpQwuyRM24Tizti4Xwo2yibet9731FRJmwNOFrVAS9vSVnTb2sACfQ/C68RYZu/IP\n\tcgBA==","X-Gm-Message-State":"AOJu0Yz77KbY0qzf+AXTxdRPDH7PPMFeeua4/jkXyAHujOvdhOrCiRBJ\n\tH0ufNJgAxzbZ8XgtrlD0xGtpRIK2X5IYombaD+yvpX5epHFWBPTeib/MHLNzDDjqdsdbF0lO7v8\n\ts","X-Google-Smtp-Source":"AGHT+IHRU5cOhPu0iGoc7ILf+FvE+JaJkVhp2qdmNh5aWjxFbiqmjgTWLF2fmnBcUhSmXliLgaKtxQ==","X-Received":"by 2002:a05:600c:3b87:b0:42c:ba83:3efa with SMTP id\n\t5b1f17b1804b1-42f5e30dd5cmr30020155e9.0.1727705641724; \n\tMon, 30 Sep 2024 07:14:01 -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>","Subject":"[PATCH v2 5/7] pipeline: rpi: Track which ISP output is configured\n\tfor 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","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>\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 75babbe17f31..9d23a1994f00 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@@ -148,6 +148,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":["v2","5/7"]}