mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 05:37:04 +00:00
img_format: add mp_regular_imgfmt.forced_csp field
As the code comment says, this is needed to disambiguate FFmpeg formats. This struct only describes the "physical" layout of a format, while FFmpeg also attaches part of the colorspace information to the format.
This commit is contained in:
parent
337ccc50dc
commit
bdd1e1e7ec
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user