Patch Detail
Show a patch.
GET /api/patches/10423/?format=api
{ "id": 10423, "url": "https://patchwork.libcamera.org/api/patches/10423/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10423/", "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": "<20201115211607.2625-1-laurent.pinchart@ideasonboard.com>", "date": "2020-11-15T21:16:07", "name": "[libcamera-devel] libcamera: pipeline: simple: Reset format on capture side of converter", "commit_ref": "d14a3f8ae62d74a21f1a04d1fbbbd23b762a6236", "pull_url": null, "state": "accepted", "archived": false, "hash": "dc178e66b3f7fef333f561a80f9ac409ec60037c", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10423/mbox/", "series": [ { "id": 1460, "url": "https://patchwork.libcamera.org/api/series/1460/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1460", "date": "2020-11-15T21:16:07", "name": "[libcamera-devel] libcamera: pipeline: simple: Reset format on capture side of converter", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1460/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10423/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10423/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 4A459BE082\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 15 Nov 2020 21:16:17 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A8E3463286;\n\tSun, 15 Nov 2020 22:16:16 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A121A6300C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Nov 2020 22:16:15 +0100 (CET)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 23A29AF7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Nov 2020 22:16:15 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kwtsS+H0\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1605474975;\n\tbh=oea5jpt1W8uq3rI/vy6Xs8aGrJiwYkTMF6IePYHjEKA=;\n\th=From:To:Subject:Date:From;\n\tb=kwtsS+H0Q+ed4UTMgu9MxwwIw7hSaAnXQ5M0v84/CtMAmZ2lPmDPYRnKpQ1hcfUzv\n\tFRTyWIkCUGG5CkSETCWkSlcB/O8ioURDINzSMolrCHSoFCgsbfqWKfGzvb9LEekG73\n\tJgJZq6Ycp8/EsiWkI+OCk0AMwmgEl6b0mZSwLBVg=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 15 Nov 2020 23:16:07 +0200", "Message-Id": "<20201115211607.2625-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] libcamera: pipeline: simple: Reset format\n\ton capture side of converter", "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": "When configuring the converter, the format is first set on the output\nside based on the format of the camera pipeline output, and then the\nformat is set on the capture side to match the desired stream\nconfiguration. The format parameter passed to\nV4L2VideoDevice::setFormat() uses the same variable for both calls,\nwhich has the unwanted side effect of carrying plane configuration from\nthe output side to the capture side of the converter. In particular, the\nstride or plane size requested on the capture side can become\nunnecessarily large when converting to a format with a lower number of\nbits per pixel (for instance converting YUYV to NV12).\n\nFix this by resetting the format variable before using it to configure\nthe capture side.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/converter.cpp | 1 +\n 1 file changed, 1 insertion(+)", "diff": "diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\nindex 57538ab08fcd..67e6e864aa0a 100644\n--- a/src/libcamera/pipeline/simple/converter.cpp\n+++ b/src/libcamera/pipeline/simple/converter.cpp\n@@ -164,6 +164,7 @@ int SimpleConverter::configure(PixelFormat inputFormat, const Size &inputSize,\n \n \t/* Set the pixel format and size on the output. */\n \tvideoFormat = m2m_->capture()->toV4L2PixelFormat(cfg->pixelFormat);\n+\tformat = {};\n \tformat.fourcc = videoFormat;\n \tformat.size = cfg->size;\n \n", "prefixes": [ "libcamera-devel" ] }