From 3e660f6164005d3a532abd76f5e7049c5c4323f9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 2 Nov 2019 17:46:46 +0100 Subject: vo_gpu: opengl: add support for IMGFMT_RGB30 This integrates it as "special" format, with no alpha component, as the equivalent IMGFMT_RGB30 isn't meant to contain any. Nothing can produce this format in the video chain yet, so the next commits are needed to make this actually work. --- video/out/opengl/ra_gl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'video/out') diff --git a/video/out/opengl/ra_gl.c b/video/out/opengl/ra_gl.c index 46caca1eea..9b409ccb71 100644 --- a/video/out/opengl/ra_gl.c +++ b/video/out/opengl/ra_gl.c @@ -182,6 +182,17 @@ static int ra_init_gl(struct ra *ra, GL *gl) desc->components[0][i] = i + 1; desc->chroma_w = desc->chroma_h = 1; } + if (strcmp(fmt->name, "rgb10_a2") == 0) { + fmt->special_imgfmt = IMGFMT_RGB30; + struct ra_imgfmt_desc *desc = talloc_zero(fmt, struct ra_imgfmt_desc); + fmt->special_imgfmt_desc = desc; + desc->component_bits = 10; + desc->num_planes = 1; + desc->planes[0] = fmt; + for (int i = 0; i < 3; i++) + desc->components[0][i] = i + 1; + desc->chroma_w = desc->chroma_h = 1; + } if (strcmp(fmt->name, "appleyp") == 0) { fmt->special_imgfmt = IMGFMT_UYVY; struct ra_imgfmt_desc *desc = talloc_zero(fmt, struct ra_imgfmt_desc); -- cgit v1.2.3