[vlc-commits] opengl: only VLC_CODEC_P010 is aligned on MSB

Thomas Guillem git at videolan.org
Mon Mar 19 12:15:24 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 16 09:05:02 2018 +0100| [6b974cd81b87289b57b63f805749a708c7fd0a58] | committer: Thomas Guillem

opengl: only VLC_CODEC_P010 is aligned on MSB

(cherry picked from commit 215f3720f5990253869f19c74e57abf7a7eab8c6)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6b974cd81b87289b57b63f805749a708c7fd0a58
---

 modules/video_output/opengl/fragment_shaders.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index 3fc6886bec..a6cb68ddab 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -127,9 +127,7 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
             return VLC_EGENERIC;
 
         /* Do a bit shift if samples are stored on LSB */
-        /* This is a hackish way to detect endianness. FIXME: Add bit order
-         * in vlc_chroma_description_t */
-        if ((chroma >> 24) == 'L')
+        if (chroma != VLC_CODEC_P010)
             yuv_range_correction = (float)((1 << 16) - 1)
                                  / ((1 << desc->pixel_bits) - 1);
     }



More information about the vlc-commits mailing list