From patchwork Mon Sep 6 23:04:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13698 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 25191BDC71 for ; Mon, 6 Sep 2021 23:05:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 738C56917A; Tue, 7 Sep 2021 01:05:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CCC5Cwf7"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 36BBA60253 for ; Tue, 7 Sep 2021 01:04:58 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AB3AE891 for ; Tue, 7 Sep 2021 01:04:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1630969497; bh=bK/Rq2Ciw/nMNkJWvIjBjUeaPnplvMWktId3j2IDuQQ=; h=From:To:Subject:Date:From; b=CCC5Cwf7+FXekHj1QtuKmVQl+UpbsT3xNYYFA87B5fszYTxAaKDse45wEpWh2OrPe inZ0OTMvUQbl+5OJfQSJofmswS8MoPLokh8fc9Aht8+hOjoClmw3jh3wHZL+YlwQCX Wt+qhhK2Bf0scvSnZka6fEh+6vyRS0A9cQwmEOLE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Sep 2021 02:04:31 +0300 Message-Id: <20210906230436.17106-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/5] qcam: Fix stride handling 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" Hello, I came to realize that stride support was broken in qcam when testing [1] on Raspberry Pi with the YUV420 format. This patch series fixes it for all RGB and YUV formats, and also adds YUV420 support to the software converter. The patches apply on top of [1]. I've tested ARGB8888, YUYV, NV12 and YUV420, with both viewfinders. Only YUV420 had padding at the end of lines, so other formats may not work properly when padding is present, but there should at least be no regression. [1] https://lists.libcamera.org/pipermail/libcamera-devel/2021-September/024477.html Laurent Pinchart (5): qcam: viewfinder: Pass stride value to viewfinder qcam: format_converter: Add configurable stride support qcam: format_converter: Rename YUV and NV to YUVPacked and YUVSemiPlanar qcam: format_converter: Add fully-planar YUV formats support qcam: viewfinder_gl: Support configurable stride in shaders src/qcam/assets/shader/identity.vert | 4 +- src/qcam/format_converter.cpp | 187 ++++++++++++++++++--------- src/qcam/format_converter.h | 14 +- src/qcam/main_window.cpp | 3 +- src/qcam/viewfinder.h | 3 +- src/qcam/viewfinder_gl.cpp | 61 ++++++--- src/qcam/viewfinder_gl.h | 4 +- src/qcam/viewfinder_qt.cpp | 4 +- src/qcam/viewfinder_qt.h | 3 +- 9 files changed, 195 insertions(+), 88 deletions(-)