{"id":24836,"url":"https://patchwork.libcamera.org/api/1.1/patches/24836/?format=json","web_url":"https://patchwork.libcamera.org/patch/24836/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251027232047.192357-1-robert.mader@collabora.com>","date":"2025-10-27T23:20:47","name":"[v2] pipeline: simple: Consider output sizes when choosing pipe config","commit_ref":"94d32fdc55a3d794479d0a2cecdb524f2c4c7189","pull_url":null,"state":"accepted","archived":false,"hash":"618d1827a803d6076a2a43d9b22052f73e3d3d31","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/1.1/people/140/?format=json","name":"Robert Mader","email":"robert.mader@collabora.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/24836/mbox/","series":[{"id":5534,"url":"https://patchwork.libcamera.org/api/1.1/series/5534/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5534","date":"2025-10-27T23:20:47","name":"[v2] pipeline: simple: Consider output sizes when choosing pipe config","version":2,"mbox":"https://patchwork.libcamera.org/series/5534/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/24836/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/24836/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 1F886BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Oct 2025 23:21:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 473326077C;\n\tTue, 28 Oct 2025 00:21:23 +0100 (CET)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 600E6606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Oct 2025 00:21:21 +0100 (CET)","by mx.zohomail.com with SMTPS id 1761607276440427.90727772249784; \n\tMon, 27 Oct 2025 16:21:16 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"h+viFDqA\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1761607278; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=MUU2nuW3StQyZjnCaDvBWvlW7brekl0UCaXGoj9eLYOrSHWL27E966ITDPYIg53KfuAjcqw4pLjoW/bdeWXW7EReq21DFK8Fa6Z4fa+41z0qtGsVT1djzsNAGeOXPPR/E7xZZri07RSBDxl0SHVvdxJUCDzvRErqpm+0pi6HhAo=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1761607278;\n\th=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=qlqe4jyZk+MOgPfT4LadH6NAWKJjA16lI8oG0TuUp7A=; \n\tb=mT8HU/xt+6Dnljt7U4SK1a4MZyx5NHIzDKKcJBUYLa1Vxmvh0DW58vuuCUew9A53+lTjYXl+XVyHFM2gjnoBBJ0hklBM9sFIXdSmIk4Xi98VY5giMyzI310nsHTUL8FXG2fzUYb4bdk3kQ9MHFSVARcmqWDO9GG8t21UPRdUpIc=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1761607278;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=qlqe4jyZk+MOgPfT4LadH6NAWKJjA16lI8oG0TuUp7A=;\n\tb=h+viFDqApVRUBDLuSBAOYfHN4+cvs09fqlrk4KQn+ipNly29hh5FCmpqKcFJOydk\n\tvJwWuYPW40y1wuIs4WWZ+21fafWQ8Texes5ORTKOxy4K1MNBOsovTKoIgLBCO0I/Sne\n\tfRNy1C06WrJroRfa9gA8pJyNbCHSYJINnBf4novo=","From":"Robert Mader <robert.mader@collabora.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Robert Mader <robert.mader@collabora.com>","Subject":"[PATCH v2] pipeline: simple: Consider output sizes when choosing\n\tpipe config","Date":"Tue, 28 Oct 2025 00:20:47 +0100","Message-ID":"<20251027232047.192357-1-robert.mader@collabora.com>","X-Mailer":"git-send-email 2.51.1","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 a converter or the software ISP is used, output sizes do not equal\ninput sizes - they notably can be smaller.\n\nPrevious to this patch only capture sizes were considered, in some cases\nresulting in configs with too small maximum output sizes being selected,\nsuch as 1912x1080 for stream sizes of 1920x1080.\n\nCheck that the maximum output sizes are big enough instead, while continuing\nto minimize capture sizes.\n\nCloses https://gitlab.freedesktop.org/camera/libcamera/-/issues/236\n\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 7b0783cdb..91715b7f8 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -1164,15 +1164,16 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()\n \tpipeConfig_ = nullptr;\n \n \tfor (const SimpleCameraData::Configuration *pipeConfig : *configs) {\n-\t\tconst Size &size = pipeConfig->captureSize;\n+\t\tconst Size &captureSize = pipeConfig->captureSize;\n+\t\tconst Size &maxOutputSize = pipeConfig->outputSizes.max;\n \n-\t\tif (size.width >= maxStreamSize.width &&\n-\t\t    size.height >= maxStreamSize.height) {\n-\t\t\tif (!pipeConfig_ || size < pipeConfig_->captureSize)\n+\t\tif (maxOutputSize.width >= maxStreamSize.width &&\n+\t\t    maxOutputSize.height >= maxStreamSize.height) {\n+\t\t\tif (!pipeConfig_ || captureSize < pipeConfig_->captureSize)\n \t\t\t\tpipeConfig_ = pipeConfig;\n \t\t}\n \n-\t\tif (!maxPipeConfig || maxPipeConfig->captureSize < size)\n+\t\tif (!maxPipeConfig || maxPipeConfig->captureSize < captureSize)\n \t\t\tmaxPipeConfig = pipeConfig;\n \t}\n \n","prefixes":["v2"]}