Browse Source

gl: fix VLC_CODEC_CVPX_UYVY fragment shader

pull/56/head
Thomas Guillem 9 years ago
parent
commit
cd7de4295f
  1. 9
      modules/video_output/opengl/converter_cvpx.c

9
modules/video_output/opengl/converter_cvpx.c

@ -194,12 +194,19 @@ opengl_tex_converter_cvpx_init(opengl_tex_converter_t *tc)
switch (tc->fmt.i_chroma) switch (tc->fmt.i_chroma)
{ {
case VLC_CODEC_CVPX_UYVY: 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 = 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); COLOR_SPACE_UNDEF);
tc->texs[0].internal = GL_RGB; tc->texs[0].internal = GL_RGB;
tc->texs[0].format = GL_RGB_422_APPLE; tc->texs[0].format = GL_RGB_422_APPLE;
tc->texs[0].type = GL_UNSIGNED_SHORT_8_8_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; break;
case VLC_CODEC_CVPX_NV12: case VLC_CODEC_CVPX_NV12:
{ {

Loading…
Cancel
Save