|
From: Charles 'B. K. <kr...@ac...> - 2001-01-08 19:37:55
|
Thanks, I'll take a look. Since you seem to be interested in speeding up display, you might want to look into the source code for VirtualDub or FlaskMPEG. They are GPL. They both have x86 assembly and MMX tuned versions of YUV to RGB (16,24,and 32bpp). They look like the same code, but I'm not sure who wrote it originally. They're both windows programs, but it shouldn't be so hard to adapt to code to Linux. My experience in the past has been that RGB 16 is significantly faster than 24 or 32bpp. I bet that with carefull tuning, you could get performance close to Xv with those codes. The difference is that Xv gives access to HW scaling for free. Also, it might be worth looking into OpenGL textures, as there seems to be more work on HW drivers for Linux there (with NVidia and DRI). OpenGL might be another avenue to some HW scaling (probably not as nice as Xv though). -- Buck Arne Schirmacher <ar...@sc...> writes: > 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 |