From patchwork Thu Oct 23 14:48:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24736 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 4F52DC3336 for ; Thu, 23 Oct 2025 14:49:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C51DA607FF; Thu, 23 Oct 2025 16:49:11 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TZU89tRo"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 524AC607F3 for ; Thu, 23 Oct 2025 16:49:10 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7328:357b:4ce1:72b6]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 50EC919E5; Thu, 23 Oct 2025 16:47:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761230845; bh=mMVNHkgEIJLKeXte+Y3d0TMfOmEz54a8GFjmuD3f6Ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TZU89tRoMYMQeyrGvt9plyyIpgbs86DEwvIYV+nNysjLCqItAzzjk83QDBNsDbGB5 2a5neG7/bfuqIAxZNK1dv9W50r92a9BD90mahHLaJY61SqZeUWJOw1ItzEfWUEsED4 D3imIytq7OVcX7rto1sVHoKGhqB6wg05swCgJU/U= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Kieran Bingham Subject: [PATCH v2 08/35] libcamera: converter_v4l2_m2m: Always set stride Date: Thu, 23 Oct 2025 16:48:09 +0200 Message-ID: <20251023144841.403689-9-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251023144841.403689-1-stefan.klug@ideasonboard.com> References: <20251023144841.403689-1-stefan.klug@ideasonboard.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" Ensure the stride is properly set after a call to validateOutput(). Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham Reviewed-by: Isaac Scott --- Changes in v2: - Collected tag --- src/libcamera/converter/converter_v4l2_m2m.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp index c6153d728c9a..e57db8a438ab 100644 --- a/src/libcamera/converter/converter_v4l2_m2m.cpp +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp @@ -680,6 +680,7 @@ int V4L2M2MConverter::validateOutput(StreamConfiguration *cfg, bool *adjusted, const Size cfgSize = cfg->size; cfg->size = adjustSizes(cfgSize, it->second, align); + cfg->stride = PixelFormatInfo::info(cfg->pixelFormat).stride(cfg->size.width, 0); if (cfg->size.isNull()) return -EINVAL;