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

deep colour support (10-bit colour) #909

Closed
totaam opened this issue Jul 7, 2015 · 21 comments
Closed

deep colour support (10-bit colour) #909

totaam opened this issue Jul 7, 2015 · 21 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 7, 2015

Issue migrated from trac ticket # 909

component: encodings | priority: trivial | resolution: fixed | keywords: color, 10bpc, 30bit, deep color

2015-07-07 15:57:31: lapsio created the issue


I'm not sure if it's difficult or just few lines of code but in case it's quick fix it'd be nice to have 40 bit color (for Quadro) support, doesn't matter png (which supports 10bpc) or raw, whatever just anything to transport deep color. I happen to work in environment supporting 10bpc. If you care, ATI FirePro support 12bpc? if i remember well. It's ofc supported by normal X server.

@totaam
Copy link
Collaborator Author

totaam commented Jul 7, 2015

Neither Xvfb nor Xdummy support bpp higher than 24/32 at present.
This is what you get with Xdummy:

[  8081.079] (EE) DUMMY(0): Given depth (30) is not supported by this driver

And in the code we see:

    if (!xf86SetDepthBpp(pScrn, 0, 0, 0,  Support24bppFb | Support32bppFb))

So this driver would require some work (not sure how much) to support anything other than 24 / 32.

Until then, we could support such modes by running against a real X11 server instead of a virtual one, but this would limit us to one session per GPU at best...

As for the xpra code itself, the pixel compression would not be too much of a problem (I think vp9 supports 10bpp and even alpha channels) - though the client would require some work to take advantage of the extra colours depth.

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

Maybe we can add support for this using desktop mode (#1247), this would at least ensure that we can handle those pixels formats in both server and client code before we add support for it in Xvfb or the dummy driver.

AFAICT, even though png supports 48-bit colour, there is no support for it in pillow, see: Creating a 48-bit TIFF file in Python with PIL, so we will need another encoder even the simplest case..

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 15:41:18: lapsio commented


30 bit support in Linux is still kind of poor, every app implementing it is small step forward. I still really hope this functionality can be implemented in xpra.

Also nVidia drivers support dithered 10bpc on 8bpc displays and it works really well so something like this would be extremely useful if implemented in xpra as it'd actually enable people without Quadro GPUs to display dithered 10bpc on any hardware, even Intel GPUs as long as host does have Quadro/FirePro to launch X server in 30bit mode.

So host launches X server in 30 bit color, then xpra captures it, possibly performs 10->8 bit dithering and displays on client PC which can have some crappy consumer GPU. It'd be really awesome feature saving money for a lot of people because many of 2d artists are getting cards like Quadro or FirePro just to get 30bit color and it's not cheap. In laptops Quadro cards are even more expensive as it's only offered in pure top-end mobile workstations.

Being able to get one professional card like this and then use its 30 bit capabilities on all PCs in home no matter what hardware they have would be simply killer feature for some artists.

@totaam
Copy link
Collaborator Author

totaam commented Jul 21, 2016

See #1260 and Anandtech: NVidia Pascal - Display Matters: New Display Controller, HDR, & HEVC: For Pascal, NVIDIA is opening things up a bit more, but they are still going to keep the most important aspect of that feature differentiation in place. 10bit color is being enabled for fullscreen exclusive OpenGL applications – so your typical OpenGL game would be able to tap into deeper colors and HDR – however 10bit OpenGL windowed support is still limited to the Quadro cards. So professional users will still need Quadro cards for 10bit support in their common applications.

For enabling 30-bit output: How to Enable 30-bit color on Linux
For verifying 30-bit output: 30-bit depth with Linux driver does not produce 30-bit output on monitor.

@totaam
Copy link
Collaborator Author

totaam commented Sep 15, 2016

Initial support for "r210" added in r13741, tested with a shadow server.
Works with all non-video encodings, including mmap.

Still TODO:

Later:

@totaam
Copy link
Collaborator Author

totaam commented Sep 16, 2016

2016-09-16 07:37:06: antoine uploaded file xorg-30bpp.diff (0.7 KiB)

changes needed to xorg.conf for running in 30bpp mode

@totaam
Copy link
Collaborator Author

totaam commented Sep 16, 2016

2016-09-16 07:37:32: antoine uploaded file dummy-30bpp.patch (0.7 KiB)

changes needed to dummy driver for supporting 30bpp mode

@totaam
Copy link
Collaborator Author

totaam commented Sep 16, 2016

Still TODO:

@totaam
Copy link
Collaborator Author

totaam commented Sep 16, 2016

2016-09-16 10:34:55: antoine uploaded file xorg.conf (0.8 KiB)

simplest test config for 30 bpp with Xdummy

@totaam
Copy link
Collaborator Author

totaam commented Sep 20, 2016

Running in 30-bit mode now only requires changing the DefaultDepth 30 in the xorg.conf, or adding -depth 30 to the xdummy command line.

@lapsio / rektide: does that work for you? (will continue improving this in future releases, see ticket links from comment:7)

@totaam
Copy link
Collaborator Author

totaam commented Sep 20, 2016

The patch in comment:8 was incomplete, updated version in r13785 also sent to the mailing list.

@totaam
Copy link
Collaborator Author

totaam commented Sep 25, 2016

@totaam
Copy link
Collaborator Author

totaam commented Sep 26, 2016

See also: #56#comment:22

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2016

Relevant talk: Linux and high dynamic range displays

@totaam
Copy link
Collaborator Author

totaam commented Oct 21, 2016

Not heard back, closing.

Will follow up in #1308, #1310 and #1309

@totaam totaam closed this as completed Oct 21, 2016
@totaam
Copy link
Collaborator Author

totaam commented Jan 26, 2017

Relevant X11 discussion: RFC: Visual Class for On-Screen HDR Drawables

@totaam
Copy link
Collaborator Author

totaam commented Feb 9, 2017

As of r15028, the display's bit depth will be shown in the server output (here with 30-bit):

xpra X11 version 2.0-[r15028](../commit/8099628e5f41ebc46d686c49eacdac7d241e425d) 64-bit
 uid=1000 (antoine), gid=1000 (antoine)
 running with pid 22114 on Linux Fedora 25 TwentyFive
 connected to X11 display :10 with 30 bit colors

The client bit depth is now also displayed, see #1309#comment:1

@totaam
Copy link
Collaborator Author

totaam commented Feb 15, 2017

r15072 makes it possible to use jpeg and png by downsampling the original 30-bit image. That's only used if we have no other choice.

@totaam
Copy link
Collaborator Author

totaam commented Feb 20, 2017

New wiki page and command line option to switch bit depth, see Image Depth

@totaam
Copy link
Collaborator Author

totaam commented Apr 13, 2017

Some minor fixes:

@totaam
Copy link
Collaborator Author

totaam commented Aug 28, 2017

The dummy patch has been merged: PATCH: support for 30 bit depth in dummy driver

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

No branches or pull requests

1 participant