Patch Detail
Show a patch.
GET /api/patches/19521/?format=api
{ "id": 19521, "url": "https://patchwork.libcamera.org/api/patches/19521/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19521/", "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": "<20240221124919.2684-1-david.plowman@raspberrypi.com>", "date": "2024-02-21T12:49:19", "name": "pipeline: rpi: vc4: Use an unpacked format if no packed one is available", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "94f241b3f85436ad58b1203fb6e58bbd49e2ead8", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19521/mbox/", "series": [ { "id": 4175, "url": "https://patchwork.libcamera.org/api/series/4175/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4175", "date": "2024-02-21T12:49:19", "name": "pipeline: rpi: vc4: Use an unpacked format if no packed one is available", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4175/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19521/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19521/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 CD071BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Feb 2024 12:49:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D88562813;\n\tWed, 21 Feb 2024 13:49:25 +0100 (CET)", "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 84E1F61C9D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Feb 2024 13:49:23 +0100 (CET)", "by mail-wm1-x334.google.com with SMTP id\n\t5b1f17b1804b1-41275855dc4so4168075e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Feb 2024 04:49:23 -0800 (PST)", "from pi4-davidp.pitowers.org\n\t([2001:4d4e:300:1f:70fb:d051:958c:e7b3])\n\tby smtp.gmail.com with ESMTPSA id\n\tp8-20020a5d68c8000000b0033b2799815csm16832220wrw.86.2024.02.21.04.49.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 21 Feb 2024 04:49:22 -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=\"ov/utB9L\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1708519763; x=1709124563;\n\tdarn=lists.libcamera.org; \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=PweA0cfznhN2qUFthBK9Z8S5zqPSVidIc7lgtNrB2Wk=;\n\tb=ov/utB9Lcna3s+SogCNSumaGSkChWS4yzGL9c8hqxJDOAvc7GWeMaXmXMUL7Ti424z\n\tcNHQSTFzz7vr/L6YZBLJ3r2+xndBBwICZpQFfLWPZvy8gMEuX72NODMH2sl0Jq1fQRcX\n\ty4m9rNPh6kELZezU7LZJXuMyDea+qktsN1uaMppSbGb+U9ck1f1ggcYhBWMu85L+NzPn\n\teouxVnGmTcRNr0a690jzzW1CIBgiY0fnM/cChaQD8bjnHhfz8rZtQ7iLppxlhYNTcMsh\n\tnSVXH4qM3DyAFghR5+5vdP+5Jw7F1s7Wdpdg/gU0xJzdswG7RtptRnLY84pSiXg70aOH\n\tABCw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1708519763; x=1709124563;\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=PweA0cfznhN2qUFthBK9Z8S5zqPSVidIc7lgtNrB2Wk=;\n\tb=UFgrkZVFJKAdKe7rCh4peUqSnjyu4HN/O8rONEzO097vi6GTEU58lnsxvXgJ95575e\n\tgn+Xb/ABw9rsu03kx70SyT4hDeOdftSHu4nOwtgYJm67sBEbh94qAezursuE1GBJmKfY\n\tZtQFBIBioI+sYJAavzOiUf82f36y0DCoGaYBS5dhxzNzUT3CS0ihOOFdd582eyjRYg0o\n\t+3BeTCnkB4ZjfY33FnO4/QTfHWrqA30BT1zdJsYZaaU/QfYyHMohFy2tRwkjid0CAt/j\n\tO4lIXqHnYIREItZP2m4qKiuxLT2bWecvqTr7C40CkHmNZ7Ol+bWywhOLuDf44w83l4Zb\n\tU1NA==", "X-Gm-Message-State": "AOJu0YzDZ1QO9UlMmEv3yFZmASpTzpUmVfrga55jXo9gawxhc4Ui1Ycw\n\t+7tnXqjhzMgFXkIzcphHP/N0r/46wfFzWqjFKOosY9jSjCmUd8N79vvtQT2cWZTkgjdajx8s2Lu\n\tT", "X-Google-Smtp-Source": "AGHT+IGofiP2bNiswG9Q4ssuiAncoReNDR2s7aZvl7rSd3CfYeXpMyhLteC2OQ9p+EcaAs+zf+grmg==", "X-Received": "by 2002:a7b:c415:0:b0:412:e80:be4d with SMTP id\n\tk21-20020a7bc415000000b004120e80be4dmr12670700wmi.36.1708519762778; \n\tWed, 21 Feb 2024 04:49:22 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH] pipeline: rpi: vc4: Use an unpacked format if no packed one\n\tis available", "Date": "Wed, 21 Feb 2024 12:49:19 +0000", "Message-Id": "<20240221124919.2684-1-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.30.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "When validating a stream, and no valid packed pixel format can be\nfound, see if an unpacked format can be used instead.\n\nThis is particularly helpful for 8 (and 16) bit raw formats, where\nasking for a packed format would previously have failed. Now the\nconfiguration will be adjusted to give you a format (in fact, the only\nformat) that will work.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 10 ++++++++++\n 1 file changed, 10 insertions(+)", "diff": "diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex a52f0e7a..ad76099b 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -434,6 +434,16 @@ CameraConfiguration::Status Vc4CameraData::platformValidate(RPi::RPiCameraConfig\n \t\t\trawBayer.packing = BayerFormat::Packing::CSI2;\n \n \t\tPixelFormat rawFormat = rawBayer.toPixelFormat();\n+\n+\t\t/*\n+\t\t * Try for an unpacked format if a packed one wasn't available.This catches\n+\t\t * 8 (and 16) bit formats which would otherwise fail.\n+\t\t */\n+\t\tif (!rawFormat.isValid() && rawBayer.packing != BayerFormat::Packing::None) {\n+\t\t\trawBayer.packing = BayerFormat::Packing::None;\n+\t\t\trawFormat = rawBayer.toPixelFormat();\n+\t\t}\n+\n \t\tif (rawStream->pixelFormat != rawFormat ||\n \t\t rawStream->size != rpiConfig->sensorFormat_.size) {\n \t\t\trawStream->pixelFormat = rawFormat;\n", "prefixes": [] }