aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2017-09-15 15:39:04 +0200
committerHans Verkuil <hansverk@cisco.com>2017-09-15 15:39:04 +0200
commita24c62368a9b0939e13835af13b8e571aa4632d0 (patch)
tree67656a42f293d3b218d3b6462a71969b607f9734
parent40eda4c9c8598e48a7b263e38e34504f229286ba (diff)
16 bitnew-fmts
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
-rw-r--r--utils/qv4l2/capture-win-gl.cpp4
-rw-r--r--utils/qv4l2/capture-win-gl.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/utils/qv4l2/capture-win-gl.cpp b/utils/qv4l2/capture-win-gl.cpp
index 0d1617ff..93b37929 100644
--- a/utils/qv4l2/capture-win-gl.cpp
+++ b/utils/qv4l2/capture-win-gl.cpp
@@ -287,7 +287,9 @@ void CaptureWinGLEngine::initializeGL()
glEnable(GL_FRAMEBUFFER_SRGB);
m_hasGLRed = glGetString(GL_VERSION)[0] >= '3';
m_glRed = m_hasGLRed ? GL_RED : GL_LUMINANCE;
+ m_glRed16 = m_hasGLRed ? GL_R16 : GL_LUMINANCE;
m_glRedGreen = m_hasGLRed ? GL_RG : GL_LUMINANCE_ALPHA;
+ m_glRedGreen16 = m_hasGLRed ? GL_RG16 : GL_LUMINANCE_ALPHA;
glClearColor(1.0f, 1.0f, 1.0f, 0.0f);
glBlendFunc(GL_ONE, GL_ZERO);
@@ -1632,7 +1634,7 @@ void CaptureWinGLEngine::shader_RGB(__u32 format)
case V4L2_PIX_FMT_Y12:
case V4L2_PIX_FMT_Y16:
case V4L2_PIX_FMT_Y16_BE:
- glTexImage2D(GL_TEXTURE_2D, 0, m_glRed, m_frameWidth, m_frameHeight, 0,
+ glTexImage2D(GL_TEXTURE_2D, 0, m_glRed16, m_frameWidth, m_frameHeight, 0,
m_glRed, GL_UNSIGNED_SHORT, NULL);
break;
case V4L2_PIX_FMT_RGB24:
diff --git a/utils/qv4l2/capture-win-gl.h b/utils/qv4l2/capture-win-gl.h
index 53747673..6bec9f4a 100644
--- a/utils/qv4l2/capture-win-gl.h
+++ b/utils/qv4l2/capture-win-gl.h
@@ -125,6 +125,8 @@ private:
bool m_hasGLRed;
unsigned m_glRed;
unsigned m_glRedGreen;
+ unsigned m_glRed16;
+ unsigned m_glRedGreen16;
bool m_blending;
GLint m_mag_filter;
GLint m_min_filter;

Privacy Policy