xpra icon
Bug tracker and wiki

Opened 21 months ago

Closed 5 months ago

Last modified 5 weeks ago

#909 closed enhancement (fixed)

deep colour support (10-bit colour)

Reported by: lapsio Owned by: lapsio
Priority: trivial Milestone: 1.0
Component: encodings Version: trunk
Keywords: color, 10bpc, 30bit, deep color Cc: rektide@…

Description (last modified by Antoine Martin)

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.

Attachments (3)

xorg-30bpp.diff (682 bytes) - added by Antoine Martin 6 months ago.
changes needed to xorg.conf for running in 30bpp mode
dummy-30bpp.patch (766 bytes) - added by Antoine Martin 6 months ago.
changes needed to dummy driver for supporting 30bpp mode
xorg.conf (866 bytes) - added by Antoine Martin 6 months ago.
simplest test config for 30 bpp with Xdummy

Download all attachments as: .zip

Change History (20)

comment:1 Changed 21 months ago by Antoine Martin

Description: modified (diff)
Milestone: 0.16future
Status: newassigned
Version: 0.15.xtrunk

Neither Xvfb nor wiki/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.

comment:2 Changed 21 months ago by rektide

Cc: rektide@… added

comment:3 Changed 9 months ago by Antoine Martin

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..

Last edited 9 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 9 months ago by lapsio

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.

comment:5 Changed 8 months ago by Antoine Martin

See ticket:1260#comment:1 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.

Last edited 6 months ago by Antoine Martin (previous) (diff)

comment:6 Changed 6 months ago by Antoine Martin

Summary: 10bpc support (40 bit color)10bpc support (30 / 40 bit color)

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

Still TODO:

Later:

Last edited 6 months ago by Antoine Martin (previous) (diff)

Changed 6 months ago by Antoine Martin

Attachment: xorg-30bpp.diff added

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

Changed 6 months ago by Antoine Martin

Attachment: dummy-30bpp.patch added

changes needed to dummy driver for supporting 30bpp mode

comment:7 Changed 6 months ago by Antoine Martin

Milestone: future1.0
  • big performance improvement in r13751 (12 times faster, yet still 12 times slower than xxhash!)
  • r13752 adds r210 support to csc_cython (now included again by default in rpm and deb builds) so we have video support (downsampled to 8-bit)
  • with the 2 patches above, dummy can be used in 30bpp mode as long as we also set resize-display=no (randr is broken with this change and causes Xorg to crash hard)
  • nvenc support for HEVC 10-bit modes moved to #1308, vpx in #1310, could also be done in libva (#451)
  • opengl client support for 30-bit colour moved to #1309
  • related: lower bit depth support in #1315

Still TODO:

Last edited 6 months ago by Antoine Martin (previous) (diff)

Changed 6 months ago by Antoine Martin

Attachment: xorg.conf added

simplest test config for 30 bpp with Xdummy

comment:8 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to lapsio
Status: assignednew

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)

Last edited 6 months ago by Antoine Martin (previous) (diff)

comment:9 Changed 6 months ago by Antoine Martin

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

comment:11 Changed 6 months ago by Antoine Martin

comment:12 Changed 6 months ago by Antoine Martin

Summary: 10bpc support (30 / 40 bit color)deep colour support (10-bit colour)

comment:13 Changed 5 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Not heard back, closing.

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

comment:14 Changed 2 months ago by Antoine Martin

comment:15 Changed 7 weeks ago by Antoine Martin

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 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 ticket:1309#comment:1

comment:16 Changed 6 weeks ago by Antoine Martin

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.

comment:17 Changed 5 weeks ago by Antoine Martin

New wiki page and command line option to switch bit depth, see wiki/ImageDepth

Note: See TracTickets for help on using tickets.