Hi developers,
Somebody may have an interest in this: I made a highly experimental but working Cuda accelerated plugin for Cinepaint , the movie frame editing program, from the ‘recursive gaussian’ example from the NVidia SDK and the gaussian blur plugin from the Cinepaint sources. The plugin
In the spirit of the open source (Hail hail free cuda!) here are the relevant files for those who want to try, and maybe the whole cinepaint can be revived a bit through some good motivation…
The relevant files are :
[url=“http://www.theover.org/Diary/Ldi63/recursiveGaussian.cu”]http://www.theover.org/Diary/Ldi63/recursiveGaussian.cu[/url] → The one-fileplugin + cuda code
[url=“http://www.theover.org/Diary/Ldi63/lt-gauss_test”]http://www.theover.org/Diary/Ldi63/lt-gauss_test[/url] → The resulting executable
[url=“http://www.theover.org/Diary/Ldi63/gauss_test”]http://www.theover.org/Diary/Ldi63/gauss_test[/url] → slightly adapted startup script
It appears possible to after putting the gauss_test script with the other plugins and changing the first page of it to something sensible for your system here and there and putting the plugin in a dir pointed to, with a .libs subir with ltgaus _test and a copy of it named gauss_test, and newer (date-wise) gauss_test script than that, to use an existing compiled (yumed for instance) with it. General usability I certainly don’t suggest.
I’ve put the gauss plugin from cinepaint in one file with the recursiveGaussian NVidia example, because I couln’t quickly figure out how to compile seperate source files and link them together sucessfully with nvcc. I did get nvcc to wirk with gtk and other libraries, like this:
nvcc -DHAVE_CONFIG_H -I. -I. -I…/…/lib -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -INONE/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I…/… -I/usr/local/include -I ~/NVIDIA_CUDA_SDK/common/inc recursiveGaussian.cu -L ~/NVIDIA_CUDA_SDK/lib/ -L ~/NVIDIA_CUDA_SDK/common/lib/ -L /usr/lib64/ ~theo/NVIDIA_CUDA_SDK/common/lib/linux/libGLEW_x86_64.a -lcutil -lglut -L/usr/lib64 …/…/lib/.libs/libcinepaint.so /home/theo/Cinepaint/cinepaint-0.22-1/libhalf/.libs/libcinepaintHalf.so -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lc
Make sure the .libs subdir contains a copy of a.out as:
$ ll .libs/
total 452
-rwxrwxr-x 1 theo theo 456001 2009-01-03 02:41 lt-gauss_test
lrwxrwxrwx 1 theo theo 5 2009-01-02 00:34 gauss_test → a.out
Make sure the .libs subdir contains a copy of the just compiled a.out, and the a.out in the current dir I symbolically linked to .libs/gauss_test (so I di this after each compile):
$ cp a.out .libs/lt-gauss_test
$ touch gauss_test
When the right plugin is selected from a started cinepaint, a dialog will show as normal, and then a cuda application starts with in it’s openGL window the current drawing from cinepaint. Use +/- to interactively select the amount of gaussian blur to apply (On my Pentium-D/GT9500LT the update rate is pretty high, even for HD-size frames) and when done finish the plugins work by pressing in the CUDA window, the last filter will be used on you drawing.
I require a 16 bit int RGB cinepaint picture, and the recursive gaussian data is upgraded to 16 bits but comes from the 8 bit buffer at the moment!
Theo.