Skip to content
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

tone-mapping=linear has different behavior between --vo=gpu and --vo=gpu-next #11923

Closed
Zemax27 opened this issue Jul 13, 2023 · 6 comments
Closed
Labels

Comments

@Zemax27
Copy link

Zemax27 commented Jul 13, 2023

Information:

mpv version : Git master at 2023-07-09
Windows Version : Windows 10 or 11
Source of the mpv binary : https://sourceforge.net/projects/mpv-player-windows/files/64bit/
If known which version of mpv introduced the problem : Release 0.35.1 has also the same issue

Reproduction steps:

Playback any 10-bit video with the following configuration:
vo=gpu-next
hwdec=auto-safe
gpu-api=d3d11
gpu-context=d3d11
priority=high
target-colorspace-hint=yes
target-prim=auto
target-trc=bt.1886
tone-mapping=linear

Then change configuration as the following:
vo=gpu
hwdec=auto-safe
gpu-api=d3d11
gpu-context=d3d11
priority=high
target-prim=auto
target-trc=bt.1886
tone-mapping=linear

Expected behavior
Video playback with linear tone-mapping to be equal in both cases

Actual behavior
Video playback doesn't look to be linearly tone-mapped with vo=gpu-next but it seems to follow the bt2446a tone-mapping

Sample files

image

You can notice higher contrast in tone-mapping=linear with vo=gpu and this is what I would expect when linearly rescaling 10-bit video into 8-bit. So, I wonder, how the linear tone-mapping is applied and why it is different with vo=gpu-next (brighter video with less contrast) ?

@Zemax27 Zemax27 added the os:win label Jul 13, 2023
@hooke007
Copy link
Contributor

Video playback with linear tone-mapping to be equal in both cases

Of couse not.
--tone-mapping=linear: is now perceptually linear instead of linear light
https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU

@Zemax27
Copy link
Author

Zemax27 commented Jul 13, 2023

I see, thank you for sharing the wiki link. However this difference is not clear in the reference manual. Gpu-next also applies black point compensation but it would be nice to be able to enable or disable this option. As for the linear tone mapping case, depending on user cases, it would be necessary to have liner light tone mapping instead of perceptual. For example the linear light better preserves contrast and colors when tone mapping from 10bits to 8bits

@haasn
Copy link
Member

haasn commented Jul 13, 2023

I think you are confused. There is no tone-mapping from 10 bits to 8 bits. But without a log nor sample file (as asked) I have no idea what's going on.

@Zemax27
Copy link
Author

Zemax27 commented Jul 14, 2023

I apologize, my description was misleading. I was referring to 10 bits video encoded in PQ or HLG when playback is displayed on 8 bits monitor (not HDR compatible). The screenshot attached above comes from this video sample: https://img.photographyblog.com/reviews/apple_iphone_13_pro/sample_images/4K60p.mov
The best playback pipeline for any HDR video would be on compatible 10bits monitors with peak brightness >= 1000nits. I usually apply the following configuration for mpv:

vo=gpu-next
hwdec=auto-safe
gpu-api=d3d11
gpu-context=d3d11
d3d11-output-csp=pq
priority=high
target-colorspace-hint=yes
target-prim=auto
target-trc=auto

If I would like to playback the same video on 8bits monitor and I want to preserve as much as possible the same perception of contrast that I had on HDR monitor, I would apply a linear light tone-mapping. Unfortunately this is not possible with vo=gpu-next and I have to switch to vo=gpu as mentioned in my first comment.
@hooke007 provided me the explanation about gpu-next using a perceptual linear tone mapping with black point compensation. However I think that this is very very similar to what is already provided by bt2446a tone-mapping and there was no need to change the tone-mapping=linear from linear light to perceptual linear. Moreover I also have the feeling that linear light tone mapping better preserves the perception of colors that I see on HDR monitor playback (without tone-mapping).

I hope it is clear,
Thanks

@haasn
Copy link
Member

haasn commented Jul 31, 2023

@Zemax27 any ideas on what this 'linear light linear' tone mapping function should be called? Given that linear is already reserved for PQ linear, and it's too late to re-name it pqlinear..

Maybe just linearlight?

@Zemax27
Copy link
Author

Zemax27 commented Jul 31, 2023

@Zemax27 any ideas on what this 'linear light linear' tone mapping function should be called? Given that linear is already reserved for PQ linear, and it's too late to re-name it pqlinear..

Maybe just linearlight?

Yep, I think linearlight could be self-explanatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants