Well, I actually tested for the right color space back then when I did the video files but I don't remember much as it's been a while
The shader to look for is the yuv.frag in the shader folder.
Actually I found two of these in my old folder so you could try both (should do the same, perhaps performance differences):
#version 110
uniform sampler2D y_tex;
uniform sampler2D u_tex;
uniform sampler2D v_tex;
uniform bool full_range;
const mat3 mpeg_rgb_transform = mat3(
1.164, 1.164, 1.164,
0.0, -0.392, 2.017,
1.596, -0.813, 0.0
);
const mat3 jpeg_rgb_transform = mat3(
1.0, 1.0, 1.0,
0.0, -0.343, 1.765,
1.4, -0.711, 0.0
);
void main()
{
float y = texture2D(y_tex, gl_TexCoord[0].st).x;
float u = texture2D(u_tex, gl_TexCoord[0].st).x - 0.5;
float v = texture2D(v_tex, gl_TexCoord[0].st).x - 0.5;
vec3 yuv_color = vec3(y, u, v);
vec4 rgba_color;
if(full_range) rgba_color = vec4(jpeg_rgb_transform * yuv_color, 1.0);
else rgba_color = vec4(mpeg_rgb_transform * yuv_color, 1.0);
gl_FragColor = rgba_color;
}
#version 110
uniform sampler2D y_tex;
uniform sampler2D u_tex;
uniform sampler2D v_tex;
uniform bool full_range;
const mat3 rgb_transform = mat3(
1.0, 1.0, 1.0,
0.0, -0.344, 1.77,
1.403, -0.714, 0.0
);
void main()
{
float y = texture2D(y_tex, gl_TexCoord[0].st).x;
float u = texture2D(u_tex, gl_TexCoord[0].st).x - 0.5;
float v = texture2D(v_tex, gl_TexCoord[0].st).x - 0.5;
if(!full_range) y = (y - (1.0 / 255.0) * 16.0) * (255.0 / (255.0 - 16.0));
vec3 yuv_color = vec3(y, u, v);
vec4 rgba_color = vec4(rgb_transform * yuv_color, 1.0);
gl_FragColor = rgba_color;
}
If both do not work because either ffmpeg does get the info wrong or the videos are not correctly signaled then one could hardcode the correct one in the shader.
And it depends on Aali's driver version, I think earlier ones always assumed full range, then it changed to (buggy?) detection.