|
From: Arne S. <ar...@sc...> - 2001-01-08 10:13:27
|
I did some performance measurements using several kinds of X display methods. Using the hardware supported Xv mode is of course the fastest (but could be made even faster by using XvShmPutImage, as a developer pointed out on the Xpert mailing list. I will implement that later). When the depth of the display is 24 bit and 4 bytes per pixel, then using gdk_put_image is faster (17.5 fps on my system) than using gdk_put_rgb (13 fps on my system). Unfortunately, it needs a byte order of blue, green, red and an unused value so I have to rearrange the bytes delivered from libdv, which uses up most of the performance gain. I have added a few routines to rgb.c and dv.c which implement this new byte ordering. It is simply duplicated code with the only difference being the *p++ = r; *p++ = g; etc. reordered to match the bgr0 order requirement. I don't really like duplicated code but I did not wanted to put if statements in those tight loops, but maybe you have an idea how to solve this both elegant and efficient. The modified libdv code is under http://www.schirmacher.de/tmp/libdv-2001-01-07.patched.tar.gz . Arne |