diff options
author | der richter <der.richter@gmx.de> | 2024-04-28 19:21:01 +0200 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-05-05 19:02:50 +0200 |
commit | 8a61929eb8e62097cf8ef0764dba233000fd1e5f (patch) | |
tree | 6d32a34e7ce5d2cb0c4b02b830823e2d3c093d44 /osdep/mac/app_bridge.m | |
parent | cb75ecf19f28cfa00ecd348da13bca2550e85963 (diff) | |
download | mpv-8a61929eb8e62097cf8ef0764dba233000fd1e5f.tar.bz2 mpv-8a61929eb8e62097cf8ef0764dba233000fd1e5f.tar.xz |
cocoa-cb: add support for macOS color space transformation (EDR/HDR)
by default utilises the color space of the screen on which the window is
located. if a specific value is defined, it will instead be utilised.
depending on the chosen color space the macOS EDR (HDR) support is
activated and that OS's transformation (tone mapping) is used.
Fixes #7341
Diffstat (limited to 'osdep/mac/app_bridge.m')
-rw-r--r-- | osdep/mac/app_bridge.m | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/osdep/mac/app_bridge.m b/osdep/mac/app_bridge.m index bf39efe603..c61ba3b6cb 100644 --- a/osdep/mac/app_bridge.m +++ b/osdep/mac/app_bridge.m @@ -55,6 +55,22 @@ const struct m_sub_options macos_conf = { {"cocoa-cb-sw-renderer", OPT_CHOICE(cocoa_cb_sw_renderer, {"auto", -1}, {"no", 0}, {"yes", 1})}, {"cocoa-cb-10bit-context", OPT_BOOL(cocoa_cb_10bit_context)}, + {"cocoa-cb-output-csp", OPT_CHOICE(cocoa_cb_output_csp, + {"auto", MAC_CSP_AUTO}, + {"display-p3", MAC_CSP_DISPLAY_P3}, + {"display-p3-hlg", MAC_CSP_DISPLAY_P3_HLG}, + {"display-p3-pq", MAC_CSP_DISPLAY_P3_PQ}, + {"display-p3-linear", MAC_CSP_DISPLAY_P3_LINEAR}, + {"dci-p3", MAC_CSP_DCI_P3}, + {"bt.2020", MAC_CSP_BT_2020}, + {"bt.2020-linear", MAC_CSP_BT_2020_LINEAR}, + {"bt.2100-hlg", MAC_CSP_BT_2100_HLG}, + {"bt.2100-pq", MAC_CSP_BT_2100_PQ}, + {"bt.709", MAC_CSP_BT_709}, + {"srgb", MAC_CSP_SRGB}, + {"srgb-linear", MAC_CSP_SRGB_LINEAR}, + {"rgb-linear", MAC_CSP_RGB_LINEAR}, + {"adobe", MAC_CSP_ADOBE})}, {0} }, .size = sizeof(struct macos_opts), @@ -63,7 +79,8 @@ const struct m_sub_options macos_conf = { .macos_fs_animation_duration = -1, .macos_render_timer = RENDER_TIMER_CALLBACK, .cocoa_cb_sw_renderer = -1, - .cocoa_cb_10bit_context = true + .cocoa_cb_10bit_context = true, + .cocoa_cb_output_csp = MAC_CSP_AUTO, }, }; |