[libcamera-devel,00/21] qcam: Bypass format conversion when not required
mbox series

Message ID 20200323142205.28342-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • qcam: Bypass format conversion when not required
Related show

Message

Laurent Pinchart March 23, 2020, 2:21 p.m. UTC
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