summaryrefslogtreecommitdiffstats
path: root/video/img_format.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-04-23 12:47:13 +0200
committerwm4 <wm4@nowhere>2020-04-23 13:24:35 +0200
commit8767c468735f64cdbd4bbbbe83121c2b068255e7 (patch)
treed3a0867487b285bba400aba563e53368dbf5c6aa /video/img_format.h
parent3e84b48a6fb08065d2d880d83938227d5f8ebadd (diff)
downloadmpv-8767c468735f64cdbd4bbbbe83121c2b068255e7.tar.bz2
mpv-8767c468735f64cdbd4bbbbe83121c2b068255e7.tar.xz
img_format: add some mpv-only helper formats
Utterly useless, but the intention is to make dealing with corner case pixel formats (forced upon us by FFmpeg, very rarely) less of a pain. The zimg wrapper will use them. (It already supports these formats automatically, but it will help with its internals.) Y1 is considered RGB, even though gray formats are generally treated as YUV for various reasons. mpv will default all YUV formats to limited range internally, which makes no sense for a 1 bit format, so this is a problem. I wanted to avoid that mp_image_params_guess_csp() (which applies the default) explicitly checks for an image format, so although a bit janky, this seems to be a good solution, especially because I really don't give a shit about these formats, other than having to handle them. It's notable that AV_PIX_FMT_MONOBLACK (also 1 bit gray, just packed) already explicitly marked itself as RGB.
Diffstat (limited to 'video/img_format.h')
-rw-r--r--video/img_format.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/img_format.h b/video/img_format.h
index 2bd448899b..f422019dec 100644
--- a/video/img_format.h
+++ b/video/img_format.h
@@ -214,6 +214,15 @@ enum mp_imgfmt {
// Accessed with bit-shifts, uint32_t units.
IMGFMT_RGB30, // 2pad 10r 10g 10b (MSG to LSB)
+ // Fringe formats for fringe RGB format repacking.
+ IMGFMT_Y1, // gray with 1 bit per pixel
+ IMGFMT_GBRP1, // planar RGB with N bits per color component
+ IMGFMT_GBRP2,
+ IMGFMT_GBRP3,
+ IMGFMT_GBRP4,
+ IMGFMT_GBRP5,
+ IMGFMT_GBRP6,
+
// Hardware accelerated formats (again).
IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface
IMGFMT_VAAPI,