From patchwork Mon Mar 23 14:21:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3243 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7B9B16041A for ; Mon, 23 Mar 2020 15:22:18 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 06917308 for ; Mon, 23 Mar 2020 15:22:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584973338; bh=oJTvhzRZk2EMJ/GcM3KBGUExcnaJnGquZFAfmfA5cDk=; h=From:To:Subject:Date:From; b=fMm/I5oU0a8mz0xjJuNlDSWGKsOh+1RpzBTlyGe55XTxCjiadGdSLivne0v9erqiX yelPCDklgwLB4Y/ZmgBL9Ae9NDCUSOKg/+Z7b3uy7gTCjadvD1nfupLhAPW1DPv6aT /rjKXuYHCCiIdmMCZuxkZX9782+ggtViOWWswMBg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 23 Mar 2020 16:21:44 +0200 Message-Id: <20200323142205.28342-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/21] qcam: Bypass format conversion when not required 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-List-Received-Date: Mon, 23 Mar 2020 14:22:18 -0000 Hello, This small patch series improves performances in qcam when the captured format matches one of the formats natively supported by the viewfinder. It allows skipping conversion and using zero-copy in that case. The series includes a few miscellaneous drive-by fixes and improvements that are documented in individual patches from 01/21 to 12/21. From 13/21 onwards the viewfinder code is refactored, and patch 19/21 adds zero-copy support. Patch 20/21 fixes an isse where the last buffer isn't released when stopping capture (it could be squashed with 19/21, but I decided to submit it separately for now to ease review). Patch 21/21 finally adds support for more native RGB formats in the viewfinder, and in particular for DRM_FORMAT_BGR888 that the VIMC pipeline handler defaults to. BGR888 however requires Qt 5.14, which isn't widely shipped by distros, so it's disabled if the Qt version is too old. Laurent Pinchart (21): qcam: Remove custom event dispatcher qcam: Ensure headers are self-contained qcam: Use QSize through the code base qcam: main_window: Move request queuing to a separate function qcam: main_window: Move capture event processing to main thread qcam: main_window: Replace start and stop actions with a toggle action qcam: main_window: Use icons from system icon theme qcam: main_window: Add shortcuts for toolbar actions qcam: main_window: Don't print message when saving a picture qcam: main_window: Document functions and reorganize member data qcam: main_window: Remove unneeded debug message qcam: Use Qt qInfo() and qWarning() logging facilities qcam: viewfinder: Add MappedBuffer to store memory mapping information qcam: viewfinder: Move multi-planar check into viewfinder qcam: viewfinder: Make the viewfinder hold a reference to a buffer qcam: viewfinder: Embed QImage in ViewFinder qcam: viewfinder: Use PixelFormat default constructor qcam: viewfinder: Reorder methods to match header file qcam: viewfinder: Avoid memory copy when conversion isn't needed qcam: viewfinder: Display icon when stopping capture qcam: viewfinder: Add support for more native formats src/qcam/assets/feathericons/feathericons.qrc | 1 + src/qcam/format_converter.cpp | 10 +- src/qcam/format_converter.h | 5 +- src/qcam/main.cpp | 11 +- src/qcam/main_window.cpp | 272 +++++++++++++----- src/qcam/main_window.h | 38 ++- src/qcam/meson.build | 2 +- src/qcam/qt_event_dispatcher.cpp | 152 ---------- src/qcam/qt_event_dispatcher.h | 62 ---- src/qcam/viewfinder.cpp | 140 +++++++-- src/qcam/viewfinder.h | 36 ++- 11 files changed, 377 insertions(+), 352 deletions(-) delete mode 100644 src/qcam/qt_event_dispatcher.cpp delete mode 100644 src/qcam/qt_event_dispatcher.h