Patch Detail
Show a patch.
GET /api/patches/19135/?format=api
{ "id": 19135, "url": "https://patchwork.libcamera.org/api/patches/19135/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19135/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20231013074841.16972-13-naush@raspberrypi.com>", "date": "2023-10-13T07:48:33", "name": "[libcamera-devel,v2,12/20] pipeline: rpi: Add SW downscale status to RPi::Stream", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "648bd9de0aa3afb13c4f2fb5ffbd368e0f0df8dd", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19135/mbox/", "series": [ { "id": 4049, "url": "https://patchwork.libcamera.org/api/series/4049/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4049", "date": "2023-10-13T07:48:21", "name": "Raspberry Pi: Preliminary PiSP support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4049/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19135/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19135/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 96FA8C32BD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Oct 2023 07:49:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3611D629A1;\n\tFri, 13 Oct 2023 09:49:03 +0200 (CEST)", "from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E7CD62987\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 09:48:55 +0200 (CEST)", "by mail-wm1-x336.google.com with SMTP id\n\t5b1f17b1804b1-406618d0992so18911255e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Oct 2023 00:48:55 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm16-20020a7bca50000000b003fee6e170f9sm1791890wml.45.2023.10.13.00.48.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 13 Oct 2023 00:48:54 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697183343;\n\tbh=laC4WmX5dHbJ/iHze+vwusWOUuOXhEdsffSbd9YGUYw=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=gMadSTw7bC056I/94rg85fAzzNlC/rIGU1dQKq8VcQFC0zb2LoLOHgNfbZLrjx6B7\n\tH8fMC9Z3r65jWImoGDkEFR6itAUcrde5K1wCkC4dhPaFUR81hl49HWfKMbpS3RBxBg\n\tNOm9B0kehFP0SGNEsBeAfAGsEDdQf2uw/gWXxja3Ec3jyI0l68ke9x1UtyT1cL2UKC\n\txG/0VGAj7NCkhDGAjtAxQNSyBB0ChLXNdkKns6jk418WKZReUfPaYULg85NcDkrcat\n\tfOVDGDFHaDqtpqkhstqROVv0WJ9zSRkKjRows2chO3qmyras0JMduY+hS22MtAGydn\n\tpMScfrDOmBpfA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697183335; x=1697788135;\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=fs9TmN/NmB3KCzxAJfMZtU6Q37Dpqb4i7HZcupMowb8=;\n\tb=n6NfM0ojPVILUmm5Vb13f55fYTJJGOstYyeaSTILV/jqWoYGbZO5ZuuMtz7on4ry3v\n\t0AZW6nidS/bkdYDpw8YGOzg/41i6ruUHqAGMzkhk1yjanJV91GmKEZw+hMcLva9MMJgA\n\tzojgNYUjjMzxdjQlIraYJm6uaAnvd3j2G/ky1TV9NduVLiBnp7kKgsy1sw1IQcQWc+Wt\n\t71otk0PVJGxv0nGzxeOKbcMh9uG0RV8jy17SP5P5+lzA0G+Qyla4YtKPNWUhAjfCSNLc\n\thGoCX7kNNbNPoFywqSjQvTdX3T8jBUuWNaD7ksaFTulCq00WZcRZotYMabCYfEyePWrN\n\th1+A==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"n6NfM0oj\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697183335; x=1697788135;\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=fs9TmN/NmB3KCzxAJfMZtU6Q37Dpqb4i7HZcupMowb8=;\n\tb=njJuLi9oj3CxWDmwxRk+Tgh8mswW9nSIc2GLEBTOSNsFpRdMj54YqoVpDRd/AkwMHd\n\tCBovlhT2LC2RAJEfy7OZMB4HQRkSJICIzojhmQCIDo7y/CiyejSoTsgaerG5L62bb1Yz\n\t/B8rp/MFjVqmaFlVkC2Haq8OWfpWzCgU1bD7uacZ5NH4V799fh4hwGkO1Ljxxa+sxNTz\n\tHnyazPITu6ibYDk+TPu3NjavIR8YIgvRiIH4HJyi0q3H9gg8YaL+9qT7QbUfuqO0qF0B\n\tqXIZwmvx66npe3P51O6d5yvOW1DsgwOO/hS4E2031eZp8UuEH5t+ZK54+hnSPGXNUJ/D\n\tFR1g==", "X-Gm-Message-State": "AOJu0YwASKWcDWBFBUeX4K0rYzD6QhsmKy6VZfXZBF3kMyzmJhbq1DfP\n\tfC1cU3wrNLrCgEu0CEgXO4yz3mx6syTM4AqDUKkDdg==", "X-Google-Smtp-Source": "AGHT+IH5Nih2aSqUcjcudbqO3grdLn+/r+Qsx7U1W3+bfUhcG4tUdLU/S0uImjAd90GF9rOXMDYrvQ==", "X-Received": "by 2002:a1c:f709:0:b0:405:3b1f:9691 with SMTP id\n\tv9-20020a1cf709000000b004053b1f9691mr24010464wmh.11.1697183335036; \n\tFri, 13 Oct 2023 00:48:55 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 13 Oct 2023 08:48:33 +0100", "Message-Id": "<20231013074841.16972-13-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20231013074841.16972-1-naush@raspberrypi.com>", "References": "<20231013074841.16972-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 12/20] pipeline: rpi: Add SW downscale\n\tstatus to RPi::Stream", "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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Record if additional software downscaling is needed for a particular\nstream in the RPi::Stream class. Additional software downscaling may be\nneeded if the user required downscale factor is greater than what the\nISP hardware is capable of.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 10 ++++++++++\n src/libcamera/pipeline/rpi/common/rpi_stream.h | 11 +++++++++--\n 2 files changed, 19 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\nindex 20864aeed2d1..70f115f17977 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n@@ -57,6 +57,16 @@ const std::string &Stream::name() const\n \treturn name_;\n }\n \n+unsigned int Stream::swDownscale() const\n+{\n+\treturn swDownscale_;\n+}\n+\n+void Stream::setSwDownscale(unsigned int swDownscale)\n+{\n+\tswDownscale_ = swDownscale;\n+}\n+\n void Stream::resetBuffers()\n {\n \t/* Add all internal buffers to the queue of usable buffers. */\ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\nindex c5e35d134926..fc2bdfe25d4a 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n@@ -86,13 +86,14 @@ public:\n \tusing StreamFlags = Flags<StreamFlag>;\n \n \tStream()\n-\t\t: flags_(StreamFlag::None), id_(0)\n+\t\t: flags_(StreamFlag::None), id_(0), swDownscale_(0)\n \t{\n \t}\n \n \tStream(const char *name, MediaEntity *dev, StreamFlags flags = StreamFlag::None)\n \t\t: flags_(flags), name_(name),\n-\t\t dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(0)\n+\t\t dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(0),\n+\t\t swDownscale_(0)\n \t{\n \t}\n \n@@ -104,6 +105,9 @@ public:\n \tconst std::string &name() const;\n \tvoid resetBuffers();\n \n+\tunsigned int swDownscale() const;\n+\tvoid setSwDownscale(unsigned int swDownscale);\n+\n \tvoid setExportedBuffers(std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n \tconst BufferMap &getBuffers() const;\n \tunsigned int getBufferId(FrameBuffer *buffer) const;\n@@ -139,6 +143,9 @@ private:\n \t/* Tracks a unique id key for the bufferMap_ */\n \tunsigned int id_;\n \n+\t/* Power of 2 greater than one if software downscaling will be required. */\n+\tunsigned int swDownscale_;\n+\n \t/* All frame buffers associated with this device stream. */\n \tBufferMap bufferMap_;\n \n", "prefixes": [ "libcamera-devel", "v2", "12/20" ] }