[libcamera-devel] [PATCH 0/7] qcam: Accelerate packed YUV rendering with OpenGL
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Sep 16 16:52:47 CEST 2020
Hello,
This patch series adds a shader to convert packed YUV formats to RGB. It
has been developed as I reviewed Show's OpenGL support work, to help me
understand the OpenGL and GLSL code.
The series starts with a few cleanups in patches 1/7 to 3/7. It then
renames shader files in 4/7 to prepare for packed YUV support, and adds
support for preprocessor macros in the shaders in 5/7. Patch 6/7 uses
macros to select the YUV pattern in the semi-planar fragment shader,
instead of duplicating the shader code. Finally, patch 7/7 adds a
fragment shader for YUYV.
Laurent Pinchart (7):
qcam: Remove unneeded './' file prefix in *.qrc
qcam: viewfinder_gl: Don't store texture IDs in class members
qcam: viewfinder_gl: Hardcode the vertex shader file name
qcam: viewfinder_gl: Rename shader files
qcam: viewfinder_gl: Support #define in shaders
qcam: viewfinder_gl: Merge the semi-planar UV and VU shaders
qcam: viewfinder_gl: Add shader to render packed YUV formats
src/qcam/assets/feathericons/feathericons.qrc | 12 +-
src/qcam/assets/shader/NV_2_planes_VU_f.glsl | 32 ----
.../{NV_vertex_shader.glsl => YUV.vert} | 2 +-
...V_2_planes_UV_f.glsl => YUV_2_planes.frag} | 9 +-
.../{NV_3_planes_f.glsl => YUV_3_planes.frag} | 2 +-
src/qcam/assets/shader/YUV_packed.frag | 82 +++++++++++
src/qcam/assets/shader/shaders.qrc | 8 +-
src/qcam/viewfinder_gl.cpp | 137 +++++++++++++-----
src/qcam/viewfinder_gl.h | 18 +--
9 files changed, 212 insertions(+), 90 deletions(-)
delete mode 100644 src/qcam/assets/shader/NV_2_planes_VU_f.glsl
rename src/qcam/assets/shader/{NV_vertex_shader.glsl => YUV.vert} (79%)
rename src/qcam/assets/shader/{NV_2_planes_UV_f.glsl => YUV_2_planes.frag} (68%)
rename src/qcam/assets/shader/{NV_3_planes_f.glsl => YUV_3_planes.frag} (90%)
create mode 100644 src/qcam/assets/shader/YUV_packed.frag
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list