[libcamera-devel] [PATCH v5 0/4] qcam: accelerate format conversion by OpenGL shader

Show Liu show.liu at linaro.org
Fri Sep 4 10:43:11 CEST 2020


This is patch set v5 for qcam accelerated format conversion by OpenGL shader.
It's based on viewfinderGL(patch set v3), please skip the v4.

In this version, I changed the original viewfinder hierarchy including created
viewfinder base and move the original viewfinder as default Qt rendering and
created new viewfinderGL to handle OpenGL stuff and also move the OpenGL shader
code as Qt resource. All the changes are according to the previous review comments.

Known issue:
* It's running well at start time, but when the stop button is pressed and
  starts again, there is no more capture event being triggered.

Todo:
* Show the No camera icon when the capture stops being pressed.


BR,
Show

Show Liu (4):
  qcam: add OpenGL shader code as Qt resource
  qcam: new viewfinder hierarchy
  qcam: add viewfinderGL class to accelerate the format convert
  qcam: add additional command line option to select the render type

 src/qcam/assets/shader/NV_2_planes_UV_f.glsl  |  32 ++
 src/qcam/assets/shader/NV_2_planes_VU_f.glsl  |  32 ++
 src/qcam/assets/shader/NV_3_planes_UV_f.glsl  |  33 ++
 src/qcam/assets/shader/NV_3_planes_VU_f.glsl  |  33 ++
 src/qcam/assets/shader/NV_vertex_shader.glsl  |  16 +
 src/qcam/assets/shader/shaders.qrc            |  10 +
 src/qcam/main.cpp                             |   3 +
 src/qcam/main_window.cpp                      |  29 +-
 src/qcam/main_window.h                        |   6 +
 src/qcam/meson.build                          |   7 +-
 src/qcam/viewfinder.h                         |  60 +--
 src/qcam/viewfinder_gl.cpp                    | 441 ++++++++++++++++++
 src/qcam/viewfinder_gl.h                      |  97 ++++
 .../{viewfinder.cpp => viewfinder_qt.cpp}     |  24 +-
 src/qcam/viewfinder_qt.h                      |  67 +++
 15 files changed, 824 insertions(+), 66 deletions(-)
 create mode 100644 src/qcam/assets/shader/NV_2_planes_UV_f.glsl
 create mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl
 create mode 100644 src/qcam/assets/shader/NV_3_planes_UV_f.glsl
 create mode 100644 src/qcam/assets/shader/NV_3_planes_VU_f.glsl
 create mode 100644 src/qcam/assets/shader/NV_vertex_shader.glsl
 create mode 100644 src/qcam/assets/shader/shaders.qrc
 create mode 100644 src/qcam/viewfinder_gl.cpp
 create mode 100644 src/qcam/viewfinder_gl.h
 rename src/qcam/{viewfinder.cpp => viewfinder_qt.cpp} (86%)
 create mode 100644 src/qcam/viewfinder_qt.h

-- 
2.20.1



More information about the libcamera-devel mailing list