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

support 16-bit depth #1315

Closed
totaam opened this issue Sep 20, 2016 · 5 comments
Closed

support 16-bit depth #1315

totaam opened this issue Sep 20, 2016 · 5 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Sep 20, 2016

Issue migrated from trac ticket # 1315

component: server | priority: minor | resolution: fixed

2016-09-20 08:05:54: antoine created the issue


Similar to #909 but using less bits per pixel.

Not much to be gained from using 16-bit colour instead of 24 bits per pixel.
Most libraries will convert to 24-bit internally and very few encoders support 16-bit - apparently, libvpx does.
I guess some very specific applications might benefit on very bandwidth constrained links. Or some application may just require those modes?

We could at least handle this a little bit more gracefully than we do now and convert to 24-bit rather than just failing:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/x11/gtk2/window_damage.py", line 171, in get_image
    shm_image = shm.get_image(handle.get_pixmap(), x, y, width, height)
  File "xpra/x11/bindings/ximage.pyx", line 561, in xpra.x11.bindings.ximage.XShmWrapper.get_image (xpra/x11/bindings/ximage.c:7071)
    imageWrapper.set_image(self.image)
  File "xpra/x11/bindings/ximage.pyx", line 267, in xpra.x11.bindings.ximage.XImageWrapper.set_image (xpra/x11/bindings/ximage.c:2404)
    raise Exception("invalid image depth: %i bpp" % self.depth)
Exception: invalid image depth: 16 bpp

Note: we cannot support 8-bit colour depth (or less) in seamless mode as the X11 server then disables compositing.

@totaam
Copy link
Collaborator Author

totaam commented Feb 19, 2017

2017-02-19 16:03:03: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Feb 19, 2017

2017-02-19 16:03:03: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Feb 19, 2017

2017-02-19 16:03:03: antoine changed title from support lower bit depths to support 16-bit depth

@totaam
Copy link
Collaborator Author

totaam commented Feb 19, 2017

2017-02-19 16:03:03: antoine commented


r15120 adds support for 16-bit display servers, we convert the pixels to RGB(X) before encoding, only png and rgb encodings are supported in this mode. (and scrolling detection).

8-bit depth (#1445) would be more interesting to support, but it is also harder to implement.

@totaam totaam closed this as completed Feb 19, 2017
@totaam
Copy link
Collaborator Author

totaam commented Feb 20, 2017

2017-02-20 09:08:48: antoine commented


Testing different bit depths is now much easier in r15124, see [r15124](.. commit d013136), see [ImageDepth](r15124](..-commit-d013136fcbd922903e05aa2c2c8e7a615843e8d9), see [../wiki/ImageDepth).

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