Skip to content

Conversation

@Headcrabed
Copy link
Contributor

No description provided.

@Headcrabed
Copy link
Contributor Author

@kasper93 Do you think this is ok?

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

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?

@Headcrabed Headcrabed force-pushed the description_improvement branch from 6b1a431 to bdbb1d5 Compare November 4, 2025 18:07
@Headcrabed
Copy link
Contributor Author

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

@kasper93
Copy link
Member

kasper93 commented Nov 4, 2025

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

What do you mean? icc-profile takes precedence over any other target options.

@Headcrabed
Copy link
Contributor Author

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

What do you mean? icc-profile takes precedence over any other target options.

So icc-profile will be correctly working when sdr-adjust-gamma=auto?

@kasper93
Copy link
Member

kasper93 commented Nov 5, 2025

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

What do you mean? icc-profile takes precedence over any other target options.

So icc-profile will be correctly working when sdr-adjust-gamma=auto?

Yes. Is there evidence that would say otherwise?

@Headcrabed
Copy link
Contributor Author

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

What do you mean? icc-profile takes precedence over any other target options.

So icc-profile will be correctly working when sdr-adjust-gamma=auto?

Yes. Is there evidence that would say otherwise?

When I'm testing under windows+ACM off and set icc-profile, setting sdr-adjust-gamma=auto would result in shift+i shows srgb, while sdr-adjust-gamma=yes would result in shift+i shows bt.1886(same as previous version)

@Headcrabed Headcrabed force-pushed the description_improvement branch from bdbb1d5 to fa4801a Compare November 5, 2025 03:32
case PL_COLOR_TRC_BT_1886:
case PL_COLOR_TRC_GAMMA22:
case PL_COLOR_TRC_SRGB:
#ifdef __APPLE__
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color management is also always active on Wayland if the compositor gives us a preferred image description, as well as on Windows with ACM/HDR. This should do the same for all 3 platforms

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, but I'm not quite sure how to port my ACM detection code and wayland check code to MPV... Could you help?

Copy link
Contributor

@llyyr llyyr Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if we receive wp_image_description_info_v1::done and that it gives us an image description

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, which file should I put those new functions in, and which function should be used to call those new functions? 🤔

@Headcrabed Headcrabed force-pushed the description_improvement branch from fa4801a to 6c4c803 Compare November 5, 2025 08:29
@github-actions
Copy link

github-actions bot commented Nov 5, 2025


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.
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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?

@kasper93
Copy link
Member

kasper93 commented Nov 5, 2025

Also sdr-adjust-gamma=auto should be aware of icc-profile and icc-profile-auto, but I'm not sure how to do this. Any advice?

What do you mean? icc-profile takes precedence over any other target options.

So icc-profile will be correctly working when sdr-adjust-gamma=auto?

Yes. Is there evidence that would say otherwise?

When I'm testing under windows+ACM off and set icc-profile, setting sdr-adjust-gamma=auto would result in shift+i shows srgb, while sdr-adjust-gamma=yes would result in shift+i shows bt.1886(same as previous version)

It doesn't matter. named transfer function is not used when icc profile is applied or any other lut.

@Headcrabed Headcrabed force-pushed the description_improvement branch from 6c4c803 to d202cb3 Compare November 7, 2025 03:20
Add some description about output metadata.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
…no" on macOS

On macOS, global color management is always enabled, so there's no need to
make "auto" behaves like "no".

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
@Headcrabed Headcrabed force-pushed the description_improvement branch from d202cb3 to f24dec3 Compare November 7, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants