From patchwork Mon Dec 11 17:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Vinnicombe X-Patchwork-Id: 19304 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 20274BD87C for ; Mon, 11 Dec 2023 17:14:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7139262B2A; Mon, 11 Dec 2023 18:14:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1702314867; bh=+EBsamaw/joOkMgwWbw8Rmw0LFMQjaWFhc+qeouOQDw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lFoU2jZyzr14QgU2NM2uZWh2Y5IIhaIRWxQM4Ks2CXJAmCZkUhnXo7J9cc13t3JH3 45g8mzDX5QRnH5Q+5OgqXPZScn+f8LTTkm0oI9Lrh3bXbdgVolwjVZAr0IoHamXiAm wayYDvJ3WV0QZPeAD9Qf3oae7cAM0FuPrBvHLn/wZ2KPqIIMFvhuxi5yYQDsBFTkrK VSIAHGN1GYy24whXFLvxARwh+H0BW/IBggSVX2/We5AJDiVKDNe3ptplunClESZ7r5 PO1VtYZqXEApvqj+zUug+4uOQhjqcocnxJn38yA1So6BFdndnTienTmPKbGN4GnHfX YShwB5uK9SgQg== 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 92ABF629CE for ; Mon, 11 Dec 2023 18:14:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Uur9SaJ2"; dkim-atps=neutral Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40c2c5a8150so43814955e9.2 for ; Mon, 11 Dec 2023 09:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1702314864; x=1702919664; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=n7R2MKwEJCPhiT0Bcq1CbBCQAmkvt521prXmy8sIsII=; b=Uur9SaJ2P2GStk4iZWrb7P+NVsrkYHBvRy2U5qnaDt0QTUFLRJPtCkUSRfKDTmuuPg yjdV4pNV101ZQlW9VpODB8W9FsZanoS755BK1cqpX78isaBab0XKOjyWSONiQqCSyDo+ 8B9eUoN+FS/vUPKfrE7He/TIDPBQsHihq4VrTxr0BsDge6XJRPdV5xgPraxIbTVwbrIW EfTP8OgVDqSdsFFuZ2oe+SKtwMe409/65GSblPfQjFgKzVJX2sNGpc3wHxw+IuGQTQ7E i5VzEi4nlTVm25GplCLu3jalN1JT62YxcSVHTJi7DOJHvPp4P5HSHXhwrzEMDopYD8On 4fOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702314864; x=1702919664; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=n7R2MKwEJCPhiT0Bcq1CbBCQAmkvt521prXmy8sIsII=; b=TKamUucT9nsR/bNx8yTMpPCSKB8fnPbByLR0Syi2Yd+gRZV3LtO793yKL2vKD0VoPV WVZC7lRVxEgT2jbmcZVfC6rY0cram0wg1OcL4N5qeYkAfEdvb7Mm/Odumq5/wMiH049e OW0ai0Gi0EbtAjZ0kJip720Po8KHl4XWIFZi5hkXflB2Hkw3tW7dvLas2Yr+r2ohVIVb NQWE0M0kHN7R/+S5COsszQmd0cA9KWCKfWvpkCdydWaykIWGL27wMSu3qZbES3YS29RO grL7P3rMSBIXaEAQdmWm80tx4WuRr76F3hIfNusnmGprF1ZlYZcNLjvQsnPuLH0hBJzB 1gxQ== X-Gm-Message-State: AOJu0YzzdPcpshigut3ceGhw8AaYqzJ+lLVYyGwtzWrNQgWElOJfAjnp jv9HIbQmRpNTo/4CUBrqisiGZbRCTJiG41xFIH4= X-Google-Smtp-Source: AGHT+IGuwRhm+x1sUo/rvRJg0Mrwoq2AMU3ZN1kBLSXv101lzJ4P2wWdsgh+CzURqrKhLUtGowuRKA== X-Received: by 2002:a05:600c:204b:b0:40b:5e59:e9f3 with SMTP id p11-20020a05600c204b00b0040b5e59e9f3mr2386611wmg.146.1702314864338; Mon, 11 Dec 2023 09:14:24 -0800 (PST) Received: from willpi5.pitowers.org ([2001:4d4e:300:c2:a91d:d7fe:1e68:e2fe]) by smtp.gmail.com with ESMTPSA id w14-20020a5d608e000000b003333c2c313bsm9004646wrt.100.2023.12.11.09.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 09:14:23 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Mon, 11 Dec 2023 17:14:06 +0000 Message-Id: <20231211171406.37827-1-william.vinnicombe@raspberrypi.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] pipeline: rpi: Respect provided stride 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: , X-Patchwork-Original-From: William Vinnicombe via libcamera-devel From: William Vinnicombe Reply-To: William Vinnicombe Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When converting from StreamConfiguration to V4L2DeviceFormat, the stride was being dropped. Set the stride in the V4L2DeviceFormat to prevent this happening. Signed-off-by: William Vinnicombe Reviewed-by: Naushir Patuck Reviewed-by: David Plowman --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 9f788c9d..5afa8dbb 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -367,6 +367,7 @@ V4L2DeviceFormat PipelineHandlerBase::toV4L2DeviceFormat(const V4L2VideoDevice * deviceFormat.planesCount = info.numPlanes(); deviceFormat.fourcc = dev->toV4L2PixelFormat(stream->pixelFormat); deviceFormat.size = stream->size; + deviceFormat.planes[0].bpl = stream->stride; deviceFormat.colorSpace = stream->colorSpace; return deviceFormat;