summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-02 17:46:46 +0100
committerwm4 <wm4@nowhere>2019-11-02 17:46:46 +0100
commit3e660f6164005d3a532abd76f5e7049c5c4323f9 (patch)
tree208717ee798eb5b4719c91413f8c4c5e5cd12852 /video
parentdfc060f0991255858d8286c3e77196b8762daf48 (diff)
downloadmpv-3e660f6164005d3a532abd76f5e7049c5c4323f9.tar.bz2
mpv-3e660f6164005d3a532abd76f5e7049c5c4323f9.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/ra_gl.c11
1 files changed, 11 insertions, 0 deletions
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);