Hi Adrian Thanks for you great help for me to understand the relations between Xvideo and UVC devices. I did some tests and comments below.
2010/6/9 Adrian Sergiu DARABANT <aser...@yahoo.co.uk> > Hello > > Luvcview uses SDL if I remember well since a few months when I looked > into the sources. As I know there is no direct support or control in SDL > over which rendering engine is used behind the scenes. With XVideo you > normally get yuv formats and sometimes and for some video drivers/cards you > also get RGB. > Besides luvcview, I also tested the mplayer/vlc to capture/playback the video frames from webcam. Video output were set to Xvideo mode and frame size were 640x480/YUV format. The CPU usages were low to 20~30%, so I think the bottleneck is not uvc devices. > Mpeg2 is a compressed format that is decompressed most of the times into an > accelerated YUV format. YUV formats can be directly sent to the video card > using XVideo – if that's available. > Thanks for the explanation of video extraction flow. I searched the wiki page of Xvideo(http://en.wikipedia.org/wiki/X_video_extension) , it mentions "The feature is known as *hardware scaling andYUV </wiki/YUV> acceleration* or sometimes as *2D hardware acceleration*." As the explanation tells, I think the XVideo is work because the video frame I got is pure YUV format. > > > You should look in your case what part: mpeg2 decompression or display > takes up the CPU time. > > > > Now on the other side if your card uses the vesa drivers to display to the > screen XVideo extension is never available for that driver. > > UVC does provide 2D accelerated formats (it mostly provides only those and > MJPEG) > > > > 1) Take a look into Xorg.0.log and check the video used driver. > The video driver is openchrome and xvinfo shows X-Video Extension version 2.2 screen #0 Adaptor #0: "XV_SWOV" number of ports: 1 port base: 68 operations supported: PutImage supported visuals: depth 24, visualID 0x22 depth 24, visualID 0x23 depth 24, visualID 0x24 depth 24, visualID 0x25 depth 24, visualID 0x26 depth 24, visualID 0x27 depth 24, visualID 0x28 depth 24, visualID 0x29 depth 24, visualID 0x2a depth 24, visualID 0x2b depth 24, visualID 0x2c depth 24, visualID 0x2d number of attributes: 6 "XV_COLORKEY" (range 0 to 16777215) client settable attribute client gettable attribute (current value is 2081) "XV_BRIGHTNESS" (range 0 to 10000) client settable attribute client gettable attribute (current value is 5000) "XV_CONTRAST" (range 0 to 20000) client settable attribute client gettable attribute (current value is 10000) "XV_SATURATION" (range 0 to 20000) client settable attribute client gettable attribute (current value is 10000) "XV_HUE" (range -180 to 180) client settable attribute client gettable attribute (current value is 0) "XV_AUTOPAINT_COLORKEY" (range 0 to 1) client settable attribute client gettable attribute (current value is 1) maximum XvImage size: 1920 x 1200 Number of image formats: 6 id: 0x32595559 (YUY2) guid: 59555932-0000-0010-8000-00aa00389b71 bits per pixel: 16 number of planes: 1 type: YUV (packed) id: 0x32315659 (YV12) guid: 59563132-0000-0010-8000-00aa00389b71 bits per pixel: 12 number of planes: 3 type: YUV (planar) id: 0x434d5658 (XVMC) guid: 56494100-0000-0010-8000-00aa00389b71 bits per pixel: 12 number of planes: 1 type: YUV (planar) id: 0x35315652 (RV15) guid: 52563135-0000-0000-0000-000000000000 bits per pixel: 16 number of planes: 1 type: RGB (packed) 2) Check the times spent by the mpeg decompression task. > > 3) xvinfo – should help you see if XVideo can be used at all and > what formats are available. > > > > XVideo is just a way to pass let's say a video format encoded on (for > example) 2 bytes/pixels YUV instead of 4 (RGBA) – to the video card. The > video card then knows to display those video formats and knows how to scale > them as well (eating only GPU processing time and not CPU). Usually this > means passing just pointers to the video frame (as got from the video > capture device) to the video card for display. > > As a conclusion, I think the bottleneck is skype, thought I don't know how to improve it. Asho
_______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel