Commit cd7de429 authored by Thomas Guillem's avatar Thomas Guillem

gl: fix VLC_CODEC_CVPX_UYVY fragment shader

parent 3ce0aa03
......@@ -194,12 +194,19 @@ opengl_tex_converter_cvpx_init(opengl_tex_converter_t *tc)
switch (tc->fmt.i_chroma)
{
case VLC_CODEC_CVPX_UYVY:
/* Generate a VLC_CODEC_VYUY shader in order to use the "gbr"
* swizzling. Indeed, the Y, Cb and Cr color channels within the
* GL_RGB_422_APPLE format are mapped into the existing green, blue
* and red color channels, respectively. cf. APPLE_rgb_422 khronos
* extenstion. */
fragment_shader =
opengl_fragment_shader_init(tc, tex_target, VLC_CODEC_UYVY,
opengl_fragment_shader_init(tc, tex_target, VLC_CODEC_VYUY,
COLOR_SPACE_UNDEF);
tc->texs[0].internal = GL_RGB;
tc->texs[0].format = GL_RGB_422_APPLE;
tc->texs[0].type = GL_UNSIGNED_SHORT_8_8_APPLE;
tc->texs[0].w = tc->texs[0].h = (vlc_rational_t) { 1, 1 };
break;
case VLC_CODEC_CVPX_NV12:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment