summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-14 17:08:24 +0200
committerwm4 <wm4@nowhere>2020-05-14 17:23:48 +0200
commitedaefd6b47efc75d7af7670bded96df43b3bc75c (patch)
tree0bee09df91ca1f91ae78b488744849af912265cc
parent727b1bff57389774b067f0af662455e64d6109bb (diff)
downloadmpv-edaefd6b47efc75d7af7670bded96df43b3bc75c.tar.bz2
mpv-edaefd6b47efc75d7af7670bded96df43b3bc75c.tar.xz
vo_x11: add 10 bit support
Requires zimg.
-rw-r--r--video/out/vo_x11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 6c122d944b..dc2a2a0c8f 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -159,6 +159,8 @@ static void freeMyXImage(struct priv *p, int foo)
p->myximage[foo] = NULL;
}
+#define BM(first, count) (((1 << (count)) - 1) << (first))
+
const struct fmt_entry {
uint32_t mpfmt;
int depth;
@@ -176,6 +178,7 @@ const struct fmt_entry {
{IMGFMT_BGR0, 32, MSBFirst, 0x0000FF00, 0x00FF0000, 0xFF000000},
{IMGFMT_BGR0, 32, LSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF},
{IMGFMT_RGB565, 16, LSBFirst, 0x0000F800, 0x000007E0, 0x0000001F},
+ {IMGFMT_RGB30, 32, LSBFirst, BM(20, 10), BM(10, 10), BM(0, 10)},
{0}
};