summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/img_format.c2
-rw-r--r--video/img_format.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c
index e224a4b7d4..524fc4eea3 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -454,6 +454,8 @@ bool mp_get_regular_imgfmt(struct mp_regular_imgfmt *dst, int imgfmt)
return false; // it's satan himself
#endif
+ res.forced_csp = mp_imgfmt_get_forced_csp(imgfmt);
+
if (!validate_regular_imgfmt(&res))
return false;
diff --git a/video/img_format.h b/video/img_format.h
index 39d0a4bdad..5f097d43ff 100644
--- a/video/img_format.h
+++ b/video/img_format.h
@@ -125,6 +125,11 @@ struct mp_regular_imgfmt {
// Type of each component.
enum mp_component_type component_type;
+ // See mp_imgfmt_get_forced_csp(). Normally code should use
+ // mp_image_params.colors. This field is only needed to map the format
+ // unambiguously to FFmpeg formats.
+ enum mp_csp forced_csp;
+
// Size of each component in bytes.
uint8_t component_size;