Patch Detail
Show a patch.
GET /api/1.1/patches/18893/?format=api
{ "id": 18893, "url": "https://patchwork.libcamera.org/api/1.1/patches/18893/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18893/", "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": "<20230727130107.20891-1-naush@raspberrypi.com>", "date": "2023-07-27T13:01:07", "name": "[libcamera-devel] pipeline: rpi: Don't call toV4L2DeviceFormat() from validate()", "commit_ref": "fe73f05475ddd71a28005b3da13e05bae201098a", "pull_url": null, "state": "accepted", "archived": false, "hash": "af0e8157879213e546652e325457b393988c7429", "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/18893/mbox/", "series": [ { "id": 3989, "url": "https://patchwork.libcamera.org/api/1.1/series/3989/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3989", "date": "2023-07-27T13:01:07", "name": "[libcamera-devel] pipeline: rpi: Don't call toV4L2DeviceFormat() from validate()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3989/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18893/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18893/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 BC4F5BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Jul 2023 13:01:24 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D3411628C0;\n\tThu, 27 Jul 2023 15:01:23 +0200 (CEST)", "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F3F2600F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jul 2023 15:01:22 +0200 (CEST)", "by mail-wm1-x32f.google.com with SMTP id\n\t5b1f17b1804b1-3fbc1218262so9996675e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Jul 2023 06:01:21 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tf14-20020a7bcd0e000000b003fba94c9e18sm1819289wmj.4.2023.07.27.06.01.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 27 Jul 2023 06:01:20 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690462883;\n\tbh=mOBFsBuv/ro9BnxTiXibgI+nmpIJgoAJ8N1vQ85jMx8=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=YBg2Q9sp0a6Gktr/sALY/hMWZd+Ib5S/3Fy3Fk+RXK455+cB3BY6y8ZD/npbq7WDl\n\tyDXPX8SW6ELBFsY27KMiR/Y3GsCvyxSP/l1AJFxV0w7fz5T3ZLRilF3l3RSixzANE+\n\txP90xuzqBhMFDlkDtrwgC6yVzY6oNXileaaiNpNJb+VAkQk6pMfVG60s1LMLAsS37T\n\t0rdI+KQsX12FVpyUDmBLQcDoytTPLc7szUB9XzF/b8/+7AUN4HBn1h10rNhu4Il62F\n\tPDNbs7JY8/GIw1ZMdCicuXOf80fn9OH7OXvddrCewTVQEcafjTYo2mzAzg5wem54N9\n\tr6mxdGFotMfjQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690462881; x=1691067681;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=JZVsvWZ6uiCBTKHtbjuBJ2/nfVoM/SqLdcpH2mdqm/k=;\n\tb=dfcX3lXfju1/gfvupDGu9urYTimeDchge39onI6RE0ySLs/5t9yXIVkZskYHNSdxD1\n\t0GmDfSgf164UF958EnrqiJQSvNGLrAUjuk2bxk2j++RPioIZZw7UrjnegH21VquM4nMN\n\tbMBbxRw82wkr1DYQ9Cfe46UR9vpMqh2PsOTFKbyQWODwYSowfMjR63I+owN2SRXv423c\n\tAs1OkCe5An2TR/AjqZfTqprv1ilRZcgcEn3sBp+ZLDrYV89cKBlE9E8alw2IrYc1YkX9\n\tLrvvNufYTd96OVeYpOMPvw5T93lnAsn5CY4SMJZ1BrRQFFsKGhiptZHIMVAsEhYrR8SU\n\tCRpA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"dfcX3lXf\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690462881; x=1691067681;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=JZVsvWZ6uiCBTKHtbjuBJ2/nfVoM/SqLdcpH2mdqm/k=;\n\tb=X8pxcQysrPTebC8XUsF1354m4FxTMYQIkj1vscoBQoyAADvsLRwA+vF5aSELUIN7S9\n\tjYNByxbExsHiead66AbvaU0Vx3F2eH5L1KXj2wHzVO14v3bgnot/oduY0I2XpToMVx9f\n\tnsstTlRmViQvv8odFzMXfCrg1/C67wACVo6qqoW3EoMmhcf7pFzLvl26UC6oXTLZLlRI\n\t7Y5Zm2r6Oc37u1JgqQHtRa1+F3Br9wL7FggukSXkRaZTVfU94zyD3kSgPQT9Zy/3ZzG3\n\tGog3eXG7ViTpJtiDUGaO3cCW5O+BfI3v38V0SpbTs3c/we6SFZvuGdNvZhQFgtcuOWwK\n\txRuw==", "X-Gm-Message-State": "ABy/qLYptRhED12jcmGGh2gfGiB6GM59g+hfUdftocHdPW7/OrEHaX23\n\tnFaDU4Sznm/j5zM5/G8Ol4Qzmw2ak8c/kCbVrkMdKA==", "X-Google-Smtp-Source": "APBJJlF52soRVv6BJpn6lak3efcK2oaeUdocyYqUjCCLFxnTLPFO/7yrzJXHaXx2TX2TQ+Fl+bEw/Q==", "X-Received": "by 2002:a7b:c4c5:0:b0:3f9:c04:e76c with SMTP id\n\tg5-20020a7bc4c5000000b003f90c04e76cmr1653887wmk.28.1690462881269; \n\tThu, 27 Jul 2023 06:01:21 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 27 Jul 2023 14:01:07 +0100", "Message-Id": "<20230727130107.20891-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] pipeline: rpi: Don't call\n\ttoV4L2DeviceFormat() from validate()", "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": "Don't make an unnecessary call to toV4L2DeviceFormat() from validate()\nto get a V4L2DeviceFormat. Instead, the conversion can happen directly\nfrom the RAW stream PixelFormat.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex e0fbeec37fe9..97acafbbb728 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -226,10 +226,11 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()\n \t/* Further fixups on the RAW streams. */\n \tfor (auto &raw : rawStreams) {\n \t\tStreamConfiguration &cfg = config_.at(raw.index);\n-\t\tV4L2DeviceFormat rawFormat;\n \n-\t\tBayerFormat::Packing packing = BayerFormat::fromPixelFormat(cfg.pixelFormat).packing;\n-\t\trawFormat = PipelineHandlerBase::toV4L2DeviceFormat(raw.dev, sensorFormat_, packing);\n+\t\tV4L2DeviceFormat rawFormat;\n+\t\trawFormat.fourcc = raw.dev->toV4L2PixelFormat(cfg.pixelFormat);\n+\t\trawFormat.size = cfg.size;\n+\t\trawFormat.colorSpace = cfg.colorSpace;\n \n \t\tint ret = raw.dev->tryFormat(&rawFormat);\n \t\tif (ret)\n", "prefixes": [ "libcamera-devel" ] }