diff options
-rw-r--r-- | src/qcam/assets/shader/YUV.vert (renamed from src/qcam/assets/shader/NV_vertex_shader.glsl) | 2 | ||||
-rw-r--r-- | src/qcam/assets/shader/YUV_2_planes_UV.frag (renamed from src/qcam/assets/shader/NV_2_planes_UV_f.glsl) | 2 | ||||
-rw-r--r-- | src/qcam/assets/shader/YUV_2_planes_VU.frag (renamed from src/qcam/assets/shader/NV_2_planes_VU_f.glsl) | 2 | ||||
-rw-r--r-- | src/qcam/assets/shader/YUV_3_planes.frag (renamed from src/qcam/assets/shader/NV_3_planes_f.glsl) | 2 | ||||
-rw-r--r-- | src/qcam/assets/shader/shaders.qrc | 8 | ||||
-rw-r--r-- | src/qcam/viewfinder_gl.cpp | 18 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/qcam/assets/shader/NV_vertex_shader.glsl b/src/qcam/assets/shader/YUV.vert index 12e791e3..f38e8045 100644 --- a/src/qcam/assets/shader/NV_vertex_shader.glsl +++ b/src/qcam/assets/shader/YUV.vert @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Linaro * - * NV_vertex_shader.glsl - Vertex shader code for NV family + * YUV.vert - Vertex shader for YUV to RGB conversion */ attribute vec4 vertexIn; diff --git a/src/qcam/assets/shader/NV_2_planes_UV_f.glsl b/src/qcam/assets/shader/YUV_2_planes_UV.frag index 67633a11..081caea9 100644 --- a/src/qcam/assets/shader/NV_2_planes_UV_f.glsl +++ b/src/qcam/assets/shader/YUV_2_planes_UV.frag @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Linaro * - * NV_2_planes_UV_f.glsl - Fragment shader code for NV12, NV16 and NV24 formats + * YUV_2_planes_UV.frag - Fragment shader code for NV12, NV16 and NV24 formats */ #ifdef GL_ES diff --git a/src/qcam/assets/shader/NV_2_planes_VU_f.glsl b/src/qcam/assets/shader/YUV_2_planes_VU.frag index 086c5b6d..f4a5a5ac 100644 --- a/src/qcam/assets/shader/NV_2_planes_VU_f.glsl +++ b/src/qcam/assets/shader/YUV_2_planes_VU.frag @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Linaro * - * NV_2_planes_VU_f.glsl - Fragment shader code for NV21, NV61 and NV42 formats + * YUV_2_planes_VU.frag - Fragment shader code for NV21, NV61 and NV42 formats */ #ifdef GL_ES diff --git a/src/qcam/assets/shader/NV_3_planes_f.glsl b/src/qcam/assets/shader/YUV_3_planes.frag index 4bc94184..2be74b5d 100644 --- a/src/qcam/assets/shader/NV_3_planes_f.glsl +++ b/src/qcam/assets/shader/YUV_3_planes.frag @@ -2,7 +2,7 @@ /* * Copyright (C) 2020, Linaro * - * NV_3_planes_UV_f.glsl - Fragment shader code for YUV420 format + * YUV_3_planes_UV.frag - Fragment shader code for YUV420 format */ #ifdef GL_ES diff --git a/src/qcam/assets/shader/shaders.qrc b/src/qcam/assets/shader/shaders.qrc index 9ae35c9f..533396d1 100644 --- a/src/qcam/assets/shader/shaders.qrc +++ b/src/qcam/assets/shader/shaders.qrc @@ -1,9 +1,9 @@ <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> <!DOCTYPE RCC><RCC version="1.0"> <qresource> - <file>NV_vertex_shader.glsl</file> - <file>NV_2_planes_UV_f.glsl</file> - <file>NV_2_planes_VU_f.glsl</file> - <file>NV_3_planes_f.glsl</file> + <file>YUV.vert</file> + <file>YUV_2_planes_UV.frag</file> + <file>YUV_2_planes_VU.frag</file> + <file>YUV_3_planes.frag</file> </qresource> </RCC> diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp index 76e4a900..0fa06a29 100644 --- a/src/qcam/viewfinder_gl.cpp +++ b/src/qcam/viewfinder_gl.cpp @@ -101,42 +101,42 @@ bool ViewFinderGL::selectFormat(const libcamera::PixelFormat &format) case libcamera::formats::NV12: horzSubSample_ = 2; vertSubSample_ = 2; - fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_UV.frag"; break; case libcamera::formats::NV21: horzSubSample_ = 2; vertSubSample_ = 2; - fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_VU.frag"; break; case libcamera::formats::NV16: horzSubSample_ = 2; vertSubSample_ = 1; - fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_UV.frag"; break; case libcamera::formats::NV61: horzSubSample_ = 2; vertSubSample_ = 1; - fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_VU.frag"; break; case libcamera::formats::NV24: horzSubSample_ = 1; vertSubSample_ = 1; - fragmentShaderSrc_ = ":NV_2_planes_UV_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_UV.frag"; break; case libcamera::formats::NV42: horzSubSample_ = 1; vertSubSample_ = 1; - fragmentShaderSrc_ = ":NV_2_planes_VU_f.glsl"; + fragmentShaderSrc_ = ":YUV_2_planes_VU.frag"; break; case libcamera::formats::YUV420: horzSubSample_ = 2; vertSubSample_ = 2; - fragmentShaderSrc_ = ":NV_3_planes_f.glsl"; + fragmentShaderSrc_ = ":YUV_3_planes.frag"; break; case libcamera::formats::YVU420: horzSubSample_ = 2; vertSubSample_ = 2; - fragmentShaderSrc_ = ":NV_3_planes_f.glsl"; + fragmentShaderSrc_ = ":YUV_3_planes.frag"; break; default: ret = false; @@ -154,7 +154,7 @@ bool ViewFinderGL::createVertexShader() vertexShader_ = new QOpenGLShader(QOpenGLShader::Vertex, this); /* Compile the vertex shader */ - if (!vertexShader_->compileSourceFile(":NV_vertex_shader.glsl")) { + if (!vertexShader_->compileSourceFile(":YUV.vert")) { qWarning() << "[ViewFinderGL]:" << vertexShader_->log(); return false; } |