As of r3943 this is integrated in Xpra. Needed:
r3932 added hardcoded paths, r3961 replaces this with a call to pkgconfig, just place your machine/distro specific paths in that file instead, here is mine for CUDA 5.5 on x86_64 with an install prefix of /opt/cuda
(symlinked from /opt/cuda-5.5
):
prefix=/opt exec_prefix=${prefix} libdir=/opt/cuda/lib64 includedir=/opt/cuda/include Name: cuda Description: CUDA Version: 1.0 Requires: Conflicts: Libs: -L${libdir} -L/usr/lib64/nvidia/ -lcuda -lnppc -lnppi -lnpps -lcudart Cflags: -I${includedir}
Looks to me like this another module that should probably use an existing glue layer (NPP and OpenCV webcam app in Python
work in progress pycuda code: done rgb to yuv
works both ways now
pycuda version replaces this code in r4269, adding benchmark data to wiki/CSC
use code similar to #370 (custom kernels) instead of the useless nvidia npp
Note: this is broken at present, but can be made to work using similar code to the one used in #370 - see patch above. The common cuda/kernel bits should be moved to a cuda support module.
r4429 uses pycuda and custom kernels.
This isn't very fast and I'm not sure it even converts properly (mostly untested), but at least it runs and can be fixed, unlike the NPP version.
It is much slower than the opencl version (#422) - see wiki/CSC:
init_cuda(0) compiling kernel RGB_to_YUV444P convert_image(<class 'xpra.codecs.image_wrapper.ImageWrapper'>\ (RGBX:(0, 0, 2560, 1600, 32):PACKED)) planes=0, pixels=<type 'bytearray'>, size=16384000 allocation and upload took 6.9ms RGB_to_YUV444P took 14.9ms read back took 9.6ms, total time: 31.8 convert_image(<class 'xpra.codecs.image_wrapper.ImageWrapper'>\ (RGBX:(0, 0, 2560, 1600, 32):PACKED)) planes=0, pixels=<type 'bytearray'>, size=16384000 allocation and upload took 5.9ms RGB_to_YUV444P took 14.7ms read back took 11.1ms, total time: 32.2 RGBX to YUV444P at 2560x1600 : 22 MPixels/s
For TLS issues (if any), see ticket:422#comment:12.
Updated pkgconfig file (we no longer need npp - if someone needs it, it should probably go in its own pkgconfig file):
prefix=/opt exec_prefix=${prefix} libdir=/opt/cuda/lib64 includedir=/opt/cuda/include Name: cuda Description: CUDA Version: 1.0 Requires: Conflicts: Libs: -L${libdir} -L/usr/lib64/nvidia/ -lcuda -lcudart Cflags: -I${includedir}
Minor fix in r4910.
Just like #422: looks good to me and the documentation is here: wiki/CSC
Any feedback or updated performance data?
Does this work if you suspend-resume the PC? (see ticket:422#comment:18)
Works good for me closing the ticket for now.
This module never worked properly (I get far too much corruption and random junk) and has now been removed in r6114.
I should probably try to get some fame and post an exploit showing how to use CUDA to read the browser's currently rendered page data as pixels (works with google chrome!)
Is it feasible to wait until there's a contest, or something, with prizes to go with the posting? Might as well get a little fortune as well, no?
Not a bad idea. Sadly, nvidia (see bug bounty program.
If I have time, I'll send a quick post to the new full disclosure list instead.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/384