summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/img_format.c25
-rw-r--r--video/img_format.h9
2 files changed, 34 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c
index ed194ef751..6379dd41d1 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -39,6 +39,14 @@ struct mp_imgfmt_entry {
enum mp_component_type ctype;
};
+#define FRINGE_GBRP(def, dname, bits) \
+ [def - IMGFMT_CUST_BASE] = { \
+ .name = dname, \
+ .reg_desc = { .component_type = MP_COMPONENT_TYPE_UINT, \
+ .component_size = 1, .component_pad = bits - 8, \
+ .num_planes = 3, .forced_csp = MP_CSP_RGB, \
+ .planes = { {1, {2}}, {1, {3}}, {1, {1}} }, }, }
+
static const struct mp_imgfmt_entry mp_imgfmt_list[] = {
// not in ffmpeg
[IMGFMT_VDPAU_OUTPUT - IMGFMT_CUST_BASE] = {
@@ -85,6 +93,23 @@ static const struct mp_imgfmt_entry mp_imgfmt_list[] = {
.planes = { {1, {1}}, {1, {4}} },
},
},
+ [IMGFMT_Y1 - IMGFMT_CUST_BASE] = {
+ .name = "y1",
+ .reg_desc = {
+ .component_type = MP_COMPONENT_TYPE_UINT,
+ .component_size = 1,
+ .component_pad = -7,
+ .num_planes = 1,
+ .forced_csp = MP_CSP_RGB,
+ .planes = { {1, {1}} },
+ },
+ },
+ FRINGE_GBRP(IMGFMT_GBRP1, "gbrp1", 1),
+ FRINGE_GBRP(IMGFMT_GBRP2, "gbrp2", 2),
+ FRINGE_GBRP(IMGFMT_GBRP3, "gbrp3", 3),
+ FRINGE_GBRP(IMGFMT_GBRP4, "gbrp4", 4),
+ FRINGE_GBRP(IMGFMT_GBRP5, "gbrp5", 5),
+ FRINGE_GBRP(IMGFMT_GBRP6, "gbrp6", 6),
// in FFmpeg, but FFmpeg names have an annoying "_vld" suffix
[IMGFMT_VIDEOTOOLBOX - IMGFMT_CUST_BASE] = {
.name = "videotoolbox",
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,