-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description improvement and some behavior change for sdr-adjust-gamma #17007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@kasper93 Do you think this is ok? |
DOCS/man/options.rst
Outdated
| both source and target metadata is correct. | ||
| both source and target metadata is correct. If you are using macOS, Windows | ||
| with ACM enabled, or Wayland that compositor has color management protocol | ||
| support, metadata should be always correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does color management have to do with source metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata is provided by compositor's color management API, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option requires that both source and target metadata is correct. The compositor has nothing to do with the source, it doesn't even know anything about the source file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option requires that both source and target metadata is correct. The compositor has nothing to do with the source, it doesn't even know anything about the source file.
Then my opinion is to change this part to “output metadata should be always correct”, is this ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer saying "On color managed platforms, the output metadata will most likely be correct" instead of the current way of listing gpu-apis and platforms with their settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated description, what's your opinion?
6b1a431 to
bdbb1d5
Compare
|
Also |
What do you mean? icc-profile takes precedence over any other target options. |
So |
Yes. Is there evidence that would say otherwise? |
When I'm testing under windows+ACM off and set |
bdbb1d5 to
fa4801a
Compare
fa4801a to
6c4c803
Compare
|
Download the artifacts for this pull request: Windows |
DOCS/man/options.rst
Outdated
|
|
||
| However, your render API should also support passing output metadata to MPV. | ||
| Setting ``--gpu-api`` to ``d3d11`` or ``vulkan`` (``opengl`` won't work) | ||
| would allow this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, it is recommended to enable this option, if you can ensure that both source and target metadata is correct. On color managed platforms, the output metadata will most likely be correct. Such platforms include macOS, Windows with ACM and Wayland compositors with color management protocol support.
The part about render API is not necessary or even correct because Vulkan doesn't tell us anything about the target metadata. On Windows, we get it via D3D11 and on Wayland we get it via the protocol. This information is completely agnostic of the rendering API used, opengl just won't do any hinting unless we use the wayland protocol for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emmm you don't treat VK_COLOR_SPACE as metadata source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the description here again, do you think this is ok?
It doesn't matter. named transfer function is not used when icc profile is applied or any other lut. |
6c4c803 to
d202cb3
Compare
Add some description about output metadata. Signed-off-by: Shengyu Qu <[email protected]>
d202cb3 to
f24dec3
Compare
f24dec3 to
ee1184b
Compare
|
I added another commit to partially revert #17008 |
Forget about this. My mind wasn't clear. This extra commit is not needed, I've reverted it. |
8a36849 to
ee1184b
Compare
|
@kasper93 anything is blocking it from getting merged? |
| case PL_COLOR_TRC_GAMMA22: | ||
| case PL_COLOR_TRC_SRGB: | ||
| #ifdef __APPLE__ | ||
| if (opts->sdr_adjust_gamma == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't do that. the option is should be respected. You could set default value to yes for macos, but I'm not sure it's correct.
/cc @Akemi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using different default values on different OSes looks weird... I didn't see any existing options doing like this, is there any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
historical we never set different default values for different platforms, or at least not via a conditional preprocessor or similar. not sure if we have such cases now?
if we needed a different behaviour or default we usual let the context/backend/platform specific code decide such things, for example with a callback or similar (like these
Lines 73 to 92 in 7482608
| struct ra_ctx_params { | |
| // For special contexts (i.e. wayland) that want to check visibility | |
| // before drawing a frame. | |
| bool (*check_visible)(struct ra_ctx *ctx); | |
| // See ra_swapchain_fns.color_depth. | |
| int (*color_depth)(struct ra_ctx *ctx); | |
| // Preferred device color space. Optional. | |
| pl_color_space_t (*preferred_csp)(struct ra_ctx *ctx); | |
| // See ra_swapchain_fns.get_vsync. | |
| void (*get_vsync)(struct ra_ctx *ctx, struct vo_vsync_info *info); | |
| // Set to the platform-specific function to swap buffers, like | |
| // glXSwapBuffers, eglSwapBuffers etc. This will be called by | |
| // ra_gl_ctx_swap_buffers. Required unless you either never call that | |
| // function or if you override it yourself. | |
| void (*swap_buffers)(struct ra_ctx *ctx); | |
| }; |
i am also not sure of the necessity of this change, but admittedly this might be a bit over my head atm. it would probably be a good idea to properly describe the problem, how this fixes the problem and what the difference are (before/after).
maybe in the end it would just be okay to document that setting it to yes is preferred on macOS and leave it up to the user to se it. we have quite a few cases (in the past) where the default are not optimal for every platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am also not sure of the necessity of this change
I also don't see why it's needed and how does this differ from other platforms.
…no" on macOS On macOS, global color management is always enabled, so there's no need to make "auto" behave like "no". Signed-off-by: Shengyu Qu <[email protected]>
ee1184b to
77476a9
Compare
No description provided.