mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.31k stars 2.9k forks source link

[question] Decoded format and 16bit texture #8068

Closed age1988 closed 3 years ago

age1988 commented 4 years ago

Looking at the log file mpv use 8bit texture for 8bit decoded yuv format [vo/gpu/d3d11] yuv420p => 3 planes 2x2 8/0 [r8/r8/r8] (r/g/b) [unorm]

and 16bit texture for >8bit decoded yuv format [vo/gpu/d3d11] yuv420p10 => 3 planes 2x2 16/-6 [r16/r16/r16] (r/g/b) [unorm]

Is it possible to force 16bit texture for 8bit yuv? Example [vo/gpu/d3d11] yuv420p => 3 planes 2x2 16/-6 [r16/r16/r16] (r/g/b) [unorm]

There would be any benefits? Maybe slighty better chroma upscaling?

Log file logmpv.log

Traneptora commented 4 years ago

Does setting --fbo-format work for you?

age1988 commented 4 years ago

You could read my log file.

Another way to see my question is this: If i use fbo-format rgba16 why yuv420p is stored in a r8,r8,r8 texture? The rgba16 is then used only after the conversion yuv->RGB? Wouldn't be better to store yuv420p in a r16,r16,r16 texture?

Hrxn commented 4 years ago

Wouldn't be better to store yuv420p in a r16,r16,r16 texture?

But why? If you originally have 8 bits per component, what are you gonna use the rest for? In other words, what are you trying to achieve?

haasn commented 4 years ago

You can use vf=format=yuvp10 or similar to force a CPU conversion before upload to the GPU. This comes with no benefits because you aren't gaining any data in the extra bits, but may be useful for testing. It's also wasteful and slow.

You can use fbo-format to affect the precision with which postprocessing steps are rounded between passes. This does affect quality (assuming you have any postprocessing shaders enabled), but any gains past 16 bits (the default for modern systems) are negligible.

On Tue, 08 Sep 2020 07:36:09 -0700, age1988 notifications@github.com wrote:

Looking at the log file mpv use 8bit texture for 8bit decoded yuv format [vo/gpu/d3d11] yuv420p => 3 planes 2x2 8/0 [r8/r8/r8] (r/g/b) [unorm]

and 16bit texture for >8bit decoded yuv format [vo/gpu/d3d11] yuv420p10 => 3 planes 2x2 16/-6 [r16/r16/r16] (r/g/b) [unorm]

Is it possible to force 16bit texture for 8bit yuv? Example [vo/gpu/d3d11] yuv420p => 3 planes 2x2 16/-6 [r16/r16/r16] (r/g/b) [unorm]

There would be any benefits? Maybe slighty better chroma upscaling?

Log file logmpv.log

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mpv-player/mpv/issues/8068Non-text part: text/html

Akemi commented 3 years ago

the questions has been discussed and answered, so closing.