Patch Detail
Show a patch.
GET /api/1.1/patches/18035/?format=api
{ "id": 18035, "url": "https://patchwork.libcamera.org/api/1.1/patches/18035/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18035/", "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": "<20221216143344.8177-2-david.plowman@raspberrypi.com>", "date": "2022-12-16T14:33:42", "name": "[libcamera-devel,1/3] libcamera: camera: fix validateColorSpaces to choose the correct \"main\" colour space", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a193144c6ea10790a796c81e2a8fd68e5dc228ac", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18035/mbox/", "series": [ { "id": 3677, "url": "https://patchwork.libcamera.org/api/1.1/series/3677/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3677", "date": "2022-12-16T14:33:41", "name": "Fix colour spaces on Raspberry Pi", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3677/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18035/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18035/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 5D647C328E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 16 Dec 2022 14:33:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE16A633A3;\n\tFri, 16 Dec 2022 15:33:49 +0100 (CET)", "from mail-ej1-x629.google.com (mail-ej1-x629.google.com\n\t[IPv6:2a00:1450:4864:20::629])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 923746339A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Dec 2022 15:33:48 +0100 (CET)", "by mail-ej1-x629.google.com with SMTP id b2so6567806eja.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 16 Dec 2022 06:33:48 -0800 (PST)", "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tmb4-20020a170906eb0400b0073dd8e5a39fsm907903ejb.156.2022.12.16.06.33.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 16 Dec 2022 06:33:47 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1671201229;\n\tbh=AjsZ5OBxjl+SqU7Re2waHsIwAPXf1FOEa0JjUaSIn9U=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=G+idHKnW2ZQpbG+kl2rjFhtBI1LX2GdHvUOA3OV4muJWs4yZJC0KUn0zix3te6nyY\n\txJJd4BMzgSE9g1yKpcn2tftGRAJbQuxF7jB3lbbRNqW8jVAmXzWnIXkdV6VENmZb7d\n\tlfcRBwOSFmYkJxLrRva0u2nySuty3jPCspinOn8YL3v4uSR4TIhwG6JCFalJFQU1n2\n\tusfespGaLmVGtBEV66LzycFdnKWb7s8ncN+eLC4c8hpjjVCzKEwkFmuzIPXfzKrfn4\n\taw4bnGucF4SPEmwdLsd3jnchuCTqmvLY70ez7I47jZZt9NEuE18kKm6qFuzGp6SyiC\n\t4iko8JgTSmQ3w==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=K49KIMd4v47JvPDJ6npG1gv54cNQtVc9KB/uy2SBRng=;\n\tb=CJjEyuhfC4ikK33ptAK90b9QarT9HbxsZCkGNwW/+vMavXExZURnwtFGMq0dUPzEww\n\tSKqy+K0HXY6BPAyeICBFmszt+R8+kCGBJUzggeqoqw3KLAWEycnSdi6mUTKHO43CizKH\n\tb08aY1meLxZtJe2auvd5VP5FF1M07PBF1ZktaEGq+4Tdlu3ZZuubtjGOy1l2jLV44eNw\n\t4roDuIBEYqUwDtbq9Lnu27ARqyqTgf1Jq+8qgY4oNt6zog3Vqr2uYgUUZQMCUtBa7erl\n\t1zLwU3m8NlPBIDUIsVMDepDvB0b5YskAV9LXb+6zZG+zKV1j0/n+t8IDvrJM5TJJrAaZ\n\tE99A==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"CJjEyuhf\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=K49KIMd4v47JvPDJ6npG1gv54cNQtVc9KB/uy2SBRng=;\n\tb=7xa+V9Z/dp1AK/I9IGQbFaftq7wPQ2qqjXLB7TQN5gAuPWhNFCF16AJTwYKYjA/yFH\n\t/uXbr4otffouuk3V061j+S9l0cP2AfH6AWmYqvmTvtYW+TvX/HSfbQLiRuvSD0Qp+ax3\n\tOz0WoylSjfx0kZCyx2it0V11/bc5YLoAc4veD+PRVX96vU8oeAOpvX8E1BAgPlukDoeH\n\tsa6IuQzXgHI0Zai9ezHPzLWOYz47PL7XF+eVoLLRnFlYeqdP2LZBZKJQNKD/XF0/oFON\n\tvagcfPWOuwQrWbxCA+iC5Fe5nzU1VixGKwJS6IYjIQ+0eUstCq4dPkO4ua1YFrZ91uVz\n\tqmsw==", "X-Gm-Message-State": "ANoB5pmQNxKXtiu4BzSf4dQVZTR9e2uHmezYpzlib1cpkBBKu/VYtymT\n\tDvKBzX5pavDIdEEttqAQH5sqI0X28lxt7d1B", "X-Google-Smtp-Source": "AA0mqf4zQpnvMpC2qRAI46ZxyyN0Z8LCgMPKM/O45Eo9+szWv6U5AXBhcyXKflNIAEufCHw6vDBLRA==", "X-Received": "by 2002:a17:906:a886:b0:7c1:8f53:83a0 with SMTP id\n\tha6-20020a170906a88600b007c18f5383a0mr12165568ejb.13.1671201227961; \n\tFri, 16 Dec 2022 06:33:47 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 16 Dec 2022 14:33:42 +0000", "Message-Id": "<20221216143344.8177-2-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20221216143344.8177-1-david.plowman@raspberrypi.com>", "References": "<20221216143344.8177-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/3] libcamera: camera: fix\n\tvalidateColorSpaces to choose the correct \"main\" colour space", "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": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>", "Reply-To": "David Plowman <david.plowman@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The intention is that the \"main\" colour space is the colour space of\nthe largest non-raw stream. Unfortunately the use of \"config_[i].size\"\nis clearly incorrect, and has been copied from prior versions of the\ncode. This small change merely corrects the error.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/camera.cpp | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 2d947a44..0da167a7 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -361,6 +361,7 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n \t * largest non-raw stream with a defined color space (if there is one).\n \t */\n \tstd::optional<ColorSpace> colorSpace;\n+\tSize size;\n \n \tfor (auto [i, cfg] : utils::enumerate(config_)) {\n \t\tif (!cfg.colorSpace)\n@@ -369,9 +370,10 @@ CameraConfiguration::Status CameraConfiguration::validateColorSpaces(ColorSpaceF\n \t\tif (cfg.colorSpace->adjust(cfg.pixelFormat))\n \t\t\tstatus = Adjusted;\n \n-\t\tif (cfg.colorSpace != ColorSpace::Raw &&\n-\t\t (!colorSpace || cfg.size > config_[i].size))\n+\t\tif (cfg.colorSpace != ColorSpace::Raw && cfg.size > size) {\n \t\t\tcolorSpace = cfg.colorSpace;\n+\t\t\tsize = cfg.size;\n+\t\t}\n \t}\n \n \tif (!colorSpace || !(flags & ColorSpaceFlag::StreamsShareColorSpace))\n", "prefixes": [ "libcamera-devel", "1/3" ] }