opengl: interop sw: support packed VUYA format

This commit is contained in:
Pierre Lamot 2023-01-26 16:21:11 +01:00 committed by Jean-Baptiste Kempf
parent ef0b62ff46
commit 11f910853a
1 changed files with 15 additions and 0 deletions

View File

@ -451,6 +451,21 @@ interop_yuv_base_init(struct vlc_gl_interop *interop, GLenum tex_target,
if (desc->plane_count == 1)
{
if (chroma == VLC_CODEC_VUYA)
{
interop->tex_count = 2;
interop->texs[0] = (struct vlc_gl_tex_cfg) {
{ 1, 1 }, { 1, 1 },
GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE
};
return VLC_SUCCESS;
}
else if (desc->pixel_size != 2)
{
msg_Warn(interop->gl, "unsupported chroma %.4s", (char*)&chroma);
return VLC_EGENERIC;
}
/* Only YUV 4:2:2 formats */
/* The pictures have only 1 plane, but it is uploaded twice, once to
* access the Y components, once to access the UV components. See