Patch Detail
Show a patch.
GET /api/1.1/patches/10945/?format=api
{ "id": 10945, "url": "https://patchwork.libcamera.org/api/1.1/patches/10945/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10945/", "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": "<20210122092537.708375-2-naush@raspberrypi.com>", "date": "2021-01-22T09:25:32", "name": "[libcamera-devel,v2,1/6] pipeline: raspberrypi: Refactor stream configuration routine", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "417496d31944ef517f4b33d63d1df8b17d63f396", "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/10945/mbox/", "series": [ { "id": 1596, "url": "https://patchwork.libcamera.org/api/1.1/series/1596/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1596", "date": "2021-01-22T09:25:31", "name": "Raspberry Pi: Colour denoise", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1596/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10945/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10945/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 C7EC4BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jan 2021 09:25:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8359D68234;\n\tFri, 22 Jan 2021 10:25:45 +0100 (CET)", "from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 189E56822E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 10:25:44 +0100 (CET)", "by mail-wm1-x330.google.com with SMTP id i63so3645789wma.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jan 2021 01:25:44 -0800 (PST)", "from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\th15sm10664801wru.4.2021.01.22.01.25.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Jan 2021 01:25:42 -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=\"BzNDN7Fj\"; 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=1n89ZRC5Vh+k3ELtf1Atij889tc9bzPmkfqXvkbD0y0=;\n\tb=BzNDN7Fj5Oulw9csNipRJaaCVFAi2WdmMwWZZGy7O11rfZ3NC5mG2SMyO8tQb/j1aH\n\tVSRhNW5tkcbFf3Pua4Y707AwXBcYZ7/ynbKtN5EBuINSeKi+zGEjRAlP51SekN+ZJeQW\n\t76S+RvOaQxntJFO2vYfR0xlEM2V/bkmsvr7/+CzY1dQsFUuNVRHJ+GXUT9cWAIPkiNfu\n\tRciknD/FFmamtUcrraeDe0Yt4O4a/LImhihYp4eFi9g+0tdkhXVO0UK7J9Vb0T9TL1KA\n\tZojbYoiMlw80b4enaeY9kEGJSYuEIV25AdqVWvj8REtqjbii8FrA0upytRuhCFrLWzqs\n\tKD5g==", "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=1n89ZRC5Vh+k3ELtf1Atij889tc9bzPmkfqXvkbD0y0=;\n\tb=FMmEEMJsvJKQZXaQjl23zzdFD5l91gVu9UTwu90Cz7zWSnt2Thkk9lRtnb0qrGbiXL\n\tgrP93ImFZsIN2vu4Yi9wmxMnKe6fQpt/SFwCP1/vlZhG9aeAsYNIuxEjE4SVNLG7B7nL\n\tUP0jdyFZKT4ANYA7zGAQVaYW5qIIkE6/o6nOTvpoZNQVYUkiEUm3Z9dZxCKDnV9lQuk+\n\tEvURdUV7xnNRc3y3aSLOTpzmSjprRMxA1QlGl1d1SiYJsHOGplFz856d4dbIEovtkIhE\n\tYE5PGPWG9jXWdmegLaqyNE2xBYcmIlLrd7pIU5bMkvMiPhSRs4g0G0/PrWtMO7IPUnSd\n\tw5Wg==", "X-Gm-Message-State": "AOAM530Gt/riw8NwR4fErcrsirWz5/qUS7YiX0yqboNo4uGt62gl4u+K\n\teZ0txdelIOjag5qG6Y1poyWYELf6ysfzag==", "X-Google-Smtp-Source": "ABdhPJxqD1znKl5oKHElBjBqSJtD/wMi9ouq82YQF3OVtl33aR1K2KOq2hf+mNsEnerXjv26u9ctLA==", "X-Received": "by 2002:a05:600c:2255:: with SMTP id\n\ta21mr3017444wmm.79.1611307543548; \n\tFri, 22 Jan 2021 01:25:43 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 22 Jan 2021 09:25:32 +0000", "Message-Id": "<20210122092537.708375-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210122092537.708375-1-naush@raspberrypi.com>", "References": "<20210122092537.708375-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 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>\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..7e92f7669126 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\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 to set format on \" << stream->name()\n+\t\t\t\t<< \" to \" << 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", "v2", "1/6" ] }