Patch Detail
Show a patch.
GET /api/1.1/patches/14262/?format=api
{ "id": 14262, "url": "https://patchwork.libcamera.org/api/1.1/patches/14262/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14262/", "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": "<20211022143907.3089419-4-naush@raspberrypi.com>", "date": "2021-10-22T14:39:04", "name": "[libcamera-devel,v2,3/6] pipeline: raspberrypi: Set packing formats for the Unicam image node", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "905352265a984645f5fce0e812d2d9b2895619ad", "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/14262/mbox/", "series": [ { "id": 2650, "url": "https://patchwork.libcamera.org/api/1.1/series/2650/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2650", "date": "2021-10-22T14:39:01", "name": "Raspberry Pi: Conversion to media controller", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2650/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14262/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14262/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 0334FBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 14:40:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6507C68F69;\n\tFri, 22 Oct 2021 16:40:18 +0200 (CEST)", "from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com\n\t[IPv6:2a00:1450:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 551C86023B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 16:40:15 +0200 (CEST)", "by mail-wr1-x42a.google.com with SMTP id k7so1927579wrd.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 07:40:15 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:f00d:ddf0:61b0:a4cd])\n\tby smtp.gmail.com with ESMTPSA id\n\tr205sm8577878wma.3.2021.10.22.07.40.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 22 Oct 2021 07:40:14 -0700 (PDT)" ], "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=\"pi6IUNDn\"; 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=dlKh+cB15Cw4lo2b5aY9K5NmMsiPItPmPHaK4JaBV0U=;\n\tb=pi6IUNDnL2smEDHm6G0NkaEjSjRXG2v+1O7rAACWRoBzStAGYgoeUtzsFCukbiRGAp\n\tPYtw/ae12c4MBxXTMwCeJf4peLSMJQJl0IYsv41YWOfus6/bSWkelxGhgbyphKEOZHHw\n\t8RgQWzPaaIFH3V53utqVh6VnnngpqKcJ5BR5al3Ow/0kS9UEwQcju+ynfS64QWFCK0Rz\n\t2/YGbpAQQ4FOG01ZKXA2bXZHcQLpJsnm7rcMAB6SU4OERjEhZGb6/JakMxuqZZcAYGOL\n\tsv112pPHKmCdf1GigvM4+PW0l5dzPQrPi71KCousSw4bVM/YJmB1XwRuF1SHx2h/kFq4\n\tq60A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=dlKh+cB15Cw4lo2b5aY9K5NmMsiPItPmPHaK4JaBV0U=;\n\tb=u7Ohuu2zb1f+uaby3R3dP4+WnZWlsSbn2m8SMx0nIUEE/TxVEElN1X81IWLFkZC3pT\n\tXQDSsi0Ay4Ey/SOG6kbNI12qgJZ1jr2AtwaqgHFdfubfTqajQfU8bdrLioAOf4lwtEKL\n\thqq33Ae0+UMoB175KVEENQDYP38TKO3CfRwiVj31lBmD/llC942/ABTKMXBhERLeFYEb\n\tY+XL0iDkv89QAXse0uKG8xMSjSPZ725jFhakPiUgWMEx+B9caQu2v3TJnrpWXXCCgGNp\n\t0/9uT7KLX2PjCcZxcYTYNWgooMh/IrhemsrR/mheJagQUf1lqCqo4uzUAC2ivNGgSdsP\n\tTrgg==", "X-Gm-Message-State": "AOAM530DWh1TSdzN4WSMJ0k+VdL0gX17qqLRlTqNaepk2Va9vZMi9fGS\n\teBt/c9sbGiRYVDvLLLXUEkR4Wa7IMnpYbSY+", "X-Google-Smtp-Source": "ABdhPJwjwf00xnQZ1nBt0tfR0mhXym4ld5rkDebwCYguipeg/Npc3NkW9hKS9bVMdZO2wo3hatQAuw==", "X-Received": "by 2002:a05:6000:1376:: with SMTP id\n\tq22mr272095wrz.359.1634913614727; \n\tFri, 22 Oct 2021 07:40:14 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 22 Oct 2021 15:39:04 +0100", "Message-Id": "<20211022143907.3089419-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211022143907.3089419-1-naush@raspberrypi.com>", "References": "<20211022143907.3089419-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 3/6] pipeline: raspberrypi: Set packing\n\tformats for the Unicam image node", "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": "Default to using CSI2 packed formats when setting up the Unicam image format,\nbut use an unpacked format if the user requests one through StreamConfiguration.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex a31b0f81eba7..45725527d66e 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -61,11 +61,14 @@ SensorFormats populateSensorFormats(std::unique_ptr<CameraSensor> &sensor)\n \treturn formats;\n }\n \n-inline V4L2DeviceFormat toV4L2DeviceFormat(V4L2SubdeviceFormat &mode)\n+inline V4L2DeviceFormat toV4L2DeviceFormat(V4L2SubdeviceFormat &mode, bool unpacked = false)\n {\n \tV4L2DeviceFormat deviceFormat;\n \tBayerFormat bayer = BayerFormat::fromMbusCode(mode.mbus_code);\n \n+\tbayer.packing = unpacked ? BayerFormat::Packing::None\n+\t\t\t\t : BayerFormat::Packing::CSI2Packed;\n+\n \tdeviceFormat.fourcc = bayer.toV4L2PixelFormat();\n \tdeviceFormat.size = mode.size;\n \treturn deviceFormat;\n@@ -598,6 +601,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \tSize maxSize, sensorSize;\n \tunsigned int maxIndex = 0;\n \tbool rawStream = false;\n+\tbool unpacked = false;\n \n \t/*\n \t * Look for the RAW stream (if given) size as well as the largest\n@@ -613,6 +617,10 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \t\t\t */\n \t\t\tsensorSize = cfg.size;\n \t\t\trawStream = true;\n+\t\t\t/* Check if the user has explicitly set an unpacked format. */\n+\t\t\tV4L2PixelFormat fourcc = V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat);\n+\t\t\tBayerFormat bayer = BayerFormat::fromV4L2PixelFormat(fourcc);\n+\t\t\tunpacked = bayer.packing == BayerFormat::Packing::None;\n \t\t} else {\n \t\t\tif (cfg.size > maxSize) {\n \t\t\t\tmaxSize = config->at(i).size;\n@@ -623,7 +631,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)\n \n \t/* First calculate the best sensor mode we can use based on the user request. */\n \tV4L2SubdeviceFormat sensorFormat = findBestMode(data->sensorFormats_, rawStream ? sensorSize : maxSize);\n-\tV4L2DeviceFormat unicamFormat = toV4L2DeviceFormat(sensorFormat);\n+\tV4L2DeviceFormat unicamFormat = toV4L2DeviceFormat(sensorFormat, unpacked);\n \n \tret = data->sensor_->setFormat(&sensorFormat);\n \tif (ret)\n", "prefixes": [ "libcamera-devel", "v2", "3/6" ] }