Patch Detail
Show a patch.
GET /api/1.1/patches/11061/?format=api
{ "id": 11061, "url": "https://patchwork.libcamera.org/api/1.1/patches/11061/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11061/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210129151154.1051163-2-naush@raspberrypi.com>", "date": "2021-01-29T15:11:49", "name": "[libcamera-devel,v5,1/6] pipeline: raspberrypi: Refactor stream configuration routine", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "3c53070314cb60664d10f5e1f9b3de039ba31e6f", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11061/mbox/", "series": [ { "id": 1627, "url": "https://patchwork.libcamera.org/api/1.1/series/1627/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1627", "date": "2021-01-29T15:11:48", "name": "Raspberry Pi: Colour denoise", "version": 5, "mbox": "https://patchwork.libcamera.org/series/1627/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11061/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11061/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 17433BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 29 Jan 2021 15:12:03 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D859F683B9;\n\tFri, 29 Jan 2021 16:12:02 +0100 (CET)", "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 523E5683AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Jan 2021 16:12:00 +0100 (CET)", "by mail-wr1-x429.google.com with SMTP id v15so9205069wrx.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Jan 2021 07:12:00 -0800 (PST)", "from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tf13sm6517461wmf.1.2021.01.29.07.11.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 29 Jan 2021 07:11:58 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"qRavClEI\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=UyFjSnujeS0bFhaSast+12b5DEuvqd6mLGYgdgtqrLs=;\n\tb=qRavClEIUZL/rkhoWiuC2LiuO6fBB4Q85NSW0hF9FgW4Wda9a7BP9mBCHxFCeobaGG\n\tirbUMUxf56QTSxvWgTIheeYL1Tme9FItjdB9MKAPt7lPkSO3nHYlHd0St6sbQGv0kti7\n\txBqhUB57AoNZ6yVgHzqGyHLQdt7zL6ZRBlvep0NDk7+JonkqR9aeax/aPw/m1uUZD25D\n\t+Xc3xP4taR0H7yMZcDemKLS7eVaFVO77tLQ9Uz2zJSfvNeWiUgXvy0tE2jhfwt4Pybj/\n\terVWPO69xmZ8TXQym4kovnzTUZCWjoZoKqkzUSWyPRca+rnEtp9LzwFDKdOulW1/PXTl\n\t6bgg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=UyFjSnujeS0bFhaSast+12b5DEuvqd6mLGYgdgtqrLs=;\n\tb=W7sA28Y45AxOhyrGHw1TSmRLs6LB2+dSBOkYSUcCUpDx+XD2X4kJvqHIC+S3sNhvLj\n\toymYIbGqgweS6Q5ld0bRQraHMQJJZvtFGY7S5HsndHlvU3FrcunzQRLzKUw2TvRRCYN7\n\tn0VkgxIz+G84hSNX28s7s4x17TEtQh9baUyuUbvaxySDYGhHHAHySilrt4cDWHi0sblA\n\t5Lsi/I3puvyTtxFEwTJJu6NyeTrpfa0atAGCPuIsBvAz4mAlCrafPw8EJvUMgmCB9XeI\n\t6ZR93Jf6OalZhh4iOczuutXNei7LGuqTnSsYkU1FTtuBAUcV1pfEm9aDz96jUSzZ2t0v\n\tEk2A==", "X-Gm-Message-State": "AOAM5320xTHVHHgJd7u5ZKqvcnqyWbMDW3KCbBK+xb+Nu+6FOpQ2s+Lq\n\teNgk1ag/Zjm9tRGE76nrlrcUc1p4UdZSJQKc", "X-Google-Smtp-Source": "ABdhPJwLD+HYqowTBlCspqLvipy9TbG4lpyhlspMxNuygK3HkfIefmwMAoQf4kzFZaruHHPdYxIuHw==", "X-Received": "by 2002:adf:fd52:: with SMTP id\n\th18mr5065920wrs.295.1611933119522; \n\tFri, 29 Jan 2021 07:11:59 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 29 Jan 2021 15:11:49 +0000", "Message-Id": "<20210129151154.1051163-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210129151154.1051163-1-naush@raspberrypi.com>", "References": "<20210129151154.1051163-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v5 1/6] pipeline: raspberrypi: Refactor\n\tstream configuration routine", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Refactor the high/low resolution stream format and output selection\nroutine. This change is in preparation of adding 1/4 resolution output\nfor fast colour denoise.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp | 57 ++++++-------------\n 1 file changed, 16 insertions(+), 41 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 524cc960dd37..d9895c779725 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -624,52 +624,27 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tif (i == maxIndex) {\n-\t\t\t/* ISP main output format. */\n-\t\t\tV4L2VideoDevice *dev = data->isp_[Isp::Output0].dev();\n-\t\t\tV4L2PixelFormat fourcc = dev->toV4L2PixelFormat(cfg.pixelFormat);\n-\t\t\tformat.size = cfg.size;\n-\t\t\tformat.fourcc = fourcc;\n-\n-\t\t\tret = dev->setFormat(&format);\n-\t\t\tif (ret)\n-\t\t\t\treturn -EINVAL;\n-\n-\t\t\tif (format.size != cfg.size || format.fourcc != fourcc) {\n-\t\t\t\tLOG(RPI, Error)\n-\t\t\t\t\t<< \"Failed to set format on ISP capture0 device: \"\n-\t\t\t\t\t<< format.toString();\n-\t\t\t\treturn -EINVAL;\n-\t\t\t}\n-\n-\t\t\tcfg.setStream(&data->isp_[Isp::Output0]);\n-\t\t\tdata->isp_[Isp::Output0].setExternal(true);\n-\t\t}\n+\t\t/* The largest resolution gets routed to the ISP Output 0 node. */\n+\t\tRPi::Stream *stream = (i == maxIndex) ? &data->isp_[Isp::Output0]\n+\t\t\t\t\t\t : &data->isp_[Isp::Output1];\n \n-\t\t/*\n-\t\t * ISP second output format. This fallthrough means that if a\n-\t\t * second output stream has not been configured, we simply use\n-\t\t * the Output0 configuration.\n-\t\t */\n-\t\tV4L2VideoDevice *dev = data->isp_[Isp::Output1].dev();\n-\t\tformat.fourcc = dev->toV4L2PixelFormat(cfg.pixelFormat);\n+\t\tV4L2PixelFormat fourcc = stream->dev()->toV4L2PixelFormat(cfg.pixelFormat);\n \t\tformat.size = cfg.size;\n+\t\tformat.fourcc = fourcc;\n \n-\t\tret = dev->setFormat(&format);\n-\t\tif (ret) {\n+\t\tret = stream->dev()->setFormat(&format);\n+\t\tif (ret)\n+\t\t\treturn -EINVAL;\n+\n+\t\tif (format.size != cfg.size || format.fourcc != fourcc) {\n \t\t\tLOG(RPI, Error)\n-\t\t\t\t<< \"Failed to set format on ISP capture1 device: \"\n-\t\t\t\t<< format.toString();\n-\t\t\treturn ret;\n-\t\t}\n-\t\t/*\n-\t\t * If we have not yet provided a stream for this config, it\n-\t\t * means this is to be routed from Output1.\n-\t\t */\n-\t\tif (!cfg.stream()) {\n-\t\t\tcfg.setStream(&data->isp_[Isp::Output1]);\n-\t\t\tdata->isp_[Isp::Output1].setExternal(true);\n+\t\t\t\t<< \"Failed get requested format on \" << stream->name()\n+\t\t\t\t<< \", returned \" << format.toString();\n+\t\t\treturn -EINVAL;\n \t\t}\n+\n+\t\tcfg.setStream(stream);\n+\t\tstream->setExternal(true);\n \t}\n \n \t/* ISP statistics output format. */\n", "prefixes": [ "libcamera-devel", "v5", "1/6" ] }