YUView icon indicating copy to clipboard operation
YUView copied to clipboard

10 bit playback support for capable devices

Open ChristianFeldmann opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. Currently, all content in YUV is converted to RGB 8bit (maybe with 8 bit alpha channel) for playback. However, it should be possible to playback 10 bit content using openGL somehow. I did not do any tests on this yet though.

Describe the solution you'd like Switch the central widget to an openGL enabled widget and enable 10 bit playback using native openGL.

Describe alternatives you've considered There are no alternatives as far as I know. Qt does not support this natively in the software based rasterization.

ChristianFeldmann avatar Jan 04 '22 15:01 ChristianFeldmann

I did some experiments for OpenGL based playback in #282 (way out of date now). Just getting qt based opengl widget to display something is a bit tricky and required quite some experimentation, so it might still be helpful. If I have some time I can try to update it to the current yuview version. don't think I can do the actual 10bit playback implementation though, I don't think my screen supports it. neither my graphics card I suspect, but didn't check. but i don't have a dedicated one, don't expect the integrated one can do this. A major change for having this playback would be required in how different formats are converted to RGB. I think the raw data would have to be given to the graphics card and the conversion should then take place in a shader on the GPU. The shader would need to be able to handle different formats or different shaders for different formats could be used.

nolyn avatar Jan 06 '22 10:01 nolyn

Hi. All help here is much appreciated! So as I understood it, openGL supports some 10 bit RGB formats. That way, we would not have to handle any shaders or other special rendeting stuff. But you are right that we would need more functions to do the conversion from 10 bit YUV to 10 bit RGB.

ChristianFeldmann avatar Jan 07 '22 10:01 ChristianFeldmann

Photoshop here works with 10 bit (just switch 30 bit color on in Photoshop settings), I use nvidia drivers that are the only that support that in windowed opengl and AFAIK only works with RGB in nvidia control panel. I use pretty reference LG C9 as my display.

ValZapod avatar Jan 23 '22 03:01 ValZapod

Thanks for the insight. I also see one of the biggest problems that I don't have equipment to display 10 bit content.

ChristianFeldmann avatar Jan 23 '22 15:01 ChristianFeldmann

I just tested, it works in mpv. See issue referenced above. Looks like Vulkan and OpenGL do work.

ValZapod avatar Jan 24 '22 16:01 ValZapod

Slightly related, my awful experience with BB/RH in https://bugzilla.redhat.com/show_bug.cgi?id=1435968

At least you can check X server configuration details for 30 bpp.

BTW 30 bpp mode works even w/ 8 bpc panels using dithering. Check nVIDIA Control Panel.

1div0 avatar Feb 22 '23 10:02 1div0