From patchwork Wed Dec 10 16:15:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 25472 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 32CBDC3257 for ; Wed, 10 Dec 2025 16:41:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0F1CA61509; Wed, 10 Dec 2025 17:41:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Swvy/CW7"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 054226149B for ; Wed, 10 Dec 2025 17:41:05 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-47796a837c7so68495e9.0 for ; Wed, 10 Dec 2025 08:41:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1765384864; x=1765989664; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WP1VupwtxAszKVcn9Ser24SVpYpOcJsqWi7KlZMCpE8=; b=Swvy/CW7gin8LXWHuvplE/JbYo/SqApIXS7WXyr0hp0D/omA/PEHAyhmqaDqJiLV2G C3kGkbS+j6JtNOraMe2/8rv7GlIgIL4TMh/O7aIdJjap3cxFx0RyMJ7rjvPDQEXGqy6f zCHfnxUDjAd8ZobS674++A9f9Cq9+YZub+CokS4zoN4T6VFgqAPwFmfEGpzXeE0k1HkS tSZaFPmf1vU9XeI56XaLHxvYJQJOigaeU1MFFB3R1GN/pfcgudO91aQ10cs8imIZ5mta s+4vlKIrowFwE9M6IHNHIh0RSugTeefU0LyukLzwQsv1PVfIy2VyWabDcLCBtEXux5b+ TrDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765384864; x=1765989664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WP1VupwtxAszKVcn9Ser24SVpYpOcJsqWi7KlZMCpE8=; b=w/5ZIc4ARcUhQUTJUjm223Wkio5UMeN6oI6SBXY9xWg9Zk9srMfps9Sn/yM3mWF9LD FRiESg4piUhV6JLhH09kfOyEtoWjV5Ozx8Fuh2QgCxIJXWYgTwIOm49xgeHBd39+6xwj Zz0Kc59vhR73u9xy5tdNpN/B57Y2iBCWiimvn5qtoIa34o6qrguGjw3hsFsXC2xV9zs9 0VMAu+Et4mfJn70mq3TsFxO6ijHovmSAYnQAKu42ivapm3KaV8u7wZJqd3zF5MZCIB2Q Is3ImMQ99bDHfKfXe5IQPYzdOCX3ZflpxAARfGBk3r1PgDoDQ+ESe2zvroz4s/AffSt7 esXw== X-Gm-Message-State: AOJu0YyRAeEtfCNQnbmkbjHFCCKb4ZelF4bSqXn2NZM5zBWG4KcfZ4YA L4vm14x3tUWhzMbAq8VCu4LA4C7lV+mFNeN3qJefU36/s7fHIBcgVepaFfWRyAhpRC6KHmI1mBp e2CCR X-Gm-Gg: ASbGncvorlZW/hWfF0eRugQFlmwxdebFv6K6h7Zbb8GAkUkYTTwHkLtUiUZCuLGgmR3 rkYWoiaivKgzoftvlNDqJXYUbQBbH7VJwpYjXc32iKABcr3rJ9WA/xm5tzBjpwPPZBDgERt0adS qpGADoT2KoW6QqmUdQBbvOmXuxjgxcq9B8yjEw2srEhNDOTYnjG0nChsDj4Yih4MjrvvM+UCLIh ogaELhIKNx90hFLS0emURux+vp76CVZb5E+ZmLsudlwVdZ9pDKtuqfvdyPzo7d6VgJfX4Ki25Wz g2BGMABoHBsY4HJHa5WJ+MWlYoqPXsTqBcJGh+ioWcEtJx6UZPoqeJfaZ32GwxLHOuI9up81gE6 MyWOMjc/o8/eMaqm37M3V3fYPUvtvkl/3Dz80PI9IyWHUtubzEqWl1SO74x6LZNIRSekh5fPn5x hu92hxYl1xLGOx2196U8/23hgegwnn8QRMNiG674mjOy2UsnQgI7kfepR0OMhAuaRyd4wo4NWIq 0UMuuTZNr+nCMs0IrrBfzkY+sKVAA== X-Google-Smtp-Source: AGHT+IFJUQ+YnA3RrO7tWmKeEtcYivHfEGyWN+CNNgsv7zAkdeb0cv8U2QVPDYs2z+JtiN+rFJK6MA== X-Received: by 2002:a05:600c:190f:b0:47a:8154:33e3 with SMTP id 5b1f17b1804b1-47a83810f33mr30398065e9.28.1765384864172; Wed, 10 Dec 2025 08:41:04 -0800 (PST) Received: from davidp-pi5.pitowers.org ([2a00:1098:3142:1f:88ea:c658:5b20:5e46]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47a88371e13sm1270415e9.11.2025.12.10.08.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Dec 2025 08:41:03 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH 07/11] pipeline: rpi: Allow generation of raw input configurations Date: Wed, 10 Dec 2025 16:15:22 +0000 Message-ID: <20251210164055.17856-8-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251210164055.17856-1-david.plowman@raspberrypi.com> References: <20251210164055.17856-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Support the RawInput stream role, which makes a raw stream that is marked as an input (for example, for Bayer re-processing). Signed-off-by: David Plowman --- .../pipeline/rpi/common/pipeline_base.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 6878bdee..76bcb2a4 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -436,12 +436,23 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span colorSpace; + StreamDirection direction; if (roles.empty()) return config; - Size sensorSize = data->sensor_->resolution(); + /* + * When running memory to memory, without an actual sensor, we can't ask for its size. + * We'll make a CameraSensorMemory, to match the raw input stream configuration in due + * course, but for now use a placeholder size in this case. + */ + Size sensorSize = Size(640, 480); + if (data->sensor_) + sensorSize = data->sensor_->resolution(); + for (const StreamRole role : roles) { + direction = StreamDirection::Output; + switch (role) { case StreamRole::Raw: size = sensorSize; @@ -453,6 +464,15 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, SpanispFormats(); pixelFormat = formats::YUV420; @@ -538,6 +558,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, SpanaddConfiguration(cfg); }