Closed norinoriko closed 4 weeks ago
--d3d11-output-format
options doesn't really have control over libplacebo. Only supported value is --d3d11-output-format=rgba8
and still it is only a hint, to not use 10-bit for sdr.
I guess we can add a output depth check in libplacebo and prefer matching format.
Note that in many cases you will still get dithering in monitor, because while they can accept 8-bit signal, the actual output is another story. This we cannot do anything about.
I just assumed it's an issue because d3d11's behavior is inconsistent with vulkan, which does output rgba8 (which seems like the more "correct" thing to do but I dunno honestly).
I also tried opengl, but opengl seems to be broken in its own way, since the log doesn't show a selected format and the stats screen just shows "fbo".
Note that in many cases you will still get dithering in monitor, because while they can accept 8-bit signal, the actual output is another story. This we cannot do anything about.
Setting --d3d11-output-format=rgba8
causes banding on 16-bit color gradients if dither-depth
is disabled, so I'm just making the assumption that since rgba10_a2 has no banding, there's some kind of internal dithering being applied.
I also tried opengl, but opengl seems to be broken in its own way, since the log doesn't show a selected format and the stats screen just shows "fbo".
There is [vo/gpu-next/libplacebo] (Re)creating 1920x1080x0 texture with format ...
in the log showing the selected format. --fbo-format
has no control over the format selection logic in libplacebo.
There is [vo/gpu-next/libplacebo] (Re)creating 1920x1080x0 texture with format ... in the log showing the selected format.
This is unrelated to output format. This part of the log shows the depth for the file format and the subsequent fbo-format precision.
--fbo-format has no control over the format selection logic in libplacebo.
I didn't say that it did. I'm just saying that the stats screen fails to display a format and just says "fbo" in plaintext.
This is off-topic to this issue and would need to be its own separate issue. I just made an off-hand comment about how other APIs treat the output format for comparison.
I also tried opengl, but opengl seems to be broken in its own way, since the log doesn't show a selected format and the stats screen just shows "fbo".
not this sh*t again... AMDs driver temporal dithers (at all times) to what ever bit depth your display is set to in their driver UI Having MPV output 10bit or 8bit won't matter in that case.
not this sh*t again... AMDs driver temporal dithers (at all times) to what ever bit depth your display is set to in their driver UI Having MPV output 10bit or 8bit won't matter in that case.
Huh? I don't think it dithers if the output is already 10bit... If I don't set 10bit manually in MPV the image loses some detail compared to setting to 10bit and ordered in MPV (though it's been about 7 months since I last tested). I assume AMD is using a speed focused algorithm and the more expensive MPV options work out better quality.
I assume AMD is using a speed focused algorithm and the more expensive MPV options work out better quality.
That would be correct. Doesn't change the fact that AMDs dithering is always enabled (unless manually disabled with ColorControl)
@norinoriko Manually set MPVs dither-depth to whatever has no banding for you. There won't be a "catch-all" auto setting, especially not for Vulkan, which has no API support to read the current displays bit depth.
Manually set MPVs dither-depth to whatever has no banding for you.
No shit. This is not relevant to this issue. I'm not complaining about banding here, because there's no banding regardless of whether or not mpv selects rgba8 or rgb10_a2 (for all of the reasons I already reiterated, for the former case mpv is already dithering by default, and for the latter case both mpv and the GPU are dithering since the output has a higher bit-depth than the display).
I'm demonstrating a point that if you manually configure mpv to select the correct output format, you get less unnecessary filtering/noise which is always a net-positive. The core of the issue here is the output format selection does not match the device bit-depth.
I just assumed it's an issue because d3d11's behavior is inconsistent with vulkan, which does output rgba8 (which seems like the more "correct" thing to do but I dunno honestly).
Well, the funniest thing just happened actually. Ever since AMD 24.6.1, vulkan
has started offering the rgb10_a2 format, which gets autoselected by mpv now.
[ 0.098][v][vo/gpu-next/libplacebo] Picked surface configuration 2: VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
I can also confirm that selecting this output format enables built-in driver dithering, so now the behavior perfectly mirrors d3d11
on AMD systems, for better or worse.
Since vulkan
doesn't really have a way of preferring an output format, I guess it's fair to say that this issue is FUBAR.
Well, the funniest thing just happened actually. Ever since AMD 24.6.1,
vulkan
has started offering the rgb10_a2 format, which gets autoselected by mpv now.
Nice. Thanks for the info! AMD has indeed added 10 bit support for vulkan with their newest 24.6.1 WHQL drivers.
C:\Windows\System32\vulkaninfo.exe
shows a new entry for that under Presentable Surfaces
> FORMAT_A2B10G10R10_UNORM_PACK32
Too bad they didn't write that into their patch notes.
Only supported value is
--d3d11-output-format=rgba8
and still it is only a hint, to not use 10-bit for sdr.
Is this actually correct or is the current behavior for this option bugged?
Admittedly, I don't watch a lot of HDR content so I took this at face-value at the time, but it seems like if you pass Misunderstood the wording of the option.--d3d11-output-format=rgba8
then libplacebo will still utilize the R8G8B8A8_UNORM
swapchain even if the video is HDR, which seems to go against the expected behavior stated in https://github.com/mpv-player/mpv/pull/13210#issuecomment-1873515032
mpv Information
Other Information
Reproduction Steps
Expected Behavior
libplacebo selects rgba8 because that's the configured bit depth of the device.
Actual Behavior
libplacebo selects rgb10_a2 instead, which results in the driver having to apply its own dithering in addition to whatever mpv is doing.
--d3d11-output-format=rgba8
has to be stated explicitly.Log File
mpv.log
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.