YUVOverlay

Here’s how I’m using the yuv overlay:
//-----------------------------------------
capture from v4l capture card

SDL_Overlay *overlay;
SDL_Rect rect;

SDL_LockYUVOverlay(overlay);
memcpy into overlay->pixels[] //copy data from v4l
card
SDL_UnlockYUVOverlay(overlay);
SDL_DisplayYUVOverlay(overlay,&rect);
//-----------------------------------------

But here i have something i cant understand.
1.
The method of yuvoverlay announces it will adopt DMA
which can reduce the overhead of cpu.However in above
code,memcpy still will consume most cpu time .
then does it mean SDL yuvoverlay is not a true
hardware overlay?
2.
SDL announces it support the hardware overlay .
why do i need memcpy in the above code ?
it seems the copy function should be implement by
hardware just like " overlay->pixels =
hardware_data_Y_pointer
why ? who can give me a answer ?
Any help will be nice ,thanks in advance!__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world’s greatest free email!
http://mail.yahoo.com/

Has you tried to use the starting address in mmap()
referencing the pointer to the YUV overlay? That
would
reduce the memcpy but it would cause a problem if you
are dealing with more than one buffer from the V4L
device. I am going to try this same thing.

Regards,
Shane

— tony Tong wrote:> Here’s how I’m using the yuv overlay:

//-----------------------------------------
capture from v4l capture card

SDL_Overlay *overlay;
SDL_Rect rect;

SDL_LockYUVOverlay(overlay);
memcpy into overlay->pixels[] //copy data from v4l
card
SDL_UnlockYUVOverlay(overlay);
SDL_DisplayYUVOverlay(overlay,&rect);
//-----------------------------------------

But here i have something i cant understand.
1.
The method of yuvoverlay announces it will adopt DMA
which can reduce the overhead of cpu.However in
above
code,memcpy still will consume most cpu time .
then does it mean SDL yuvoverlay is not a true
hardware overlay?
2.
SDL announces it support the hardware overlay .
why do i need memcpy in the above code ?
it seems the copy function should be implement by
hardware just like " overlay->pixels =
hardware_data_Y_pointer
why ? who can give me a answer ?
Any help will be nice ,thanks in advance!


Do You Yahoo!?
Try FREE Yahoo! Mail - the world’s greatest free
email!
http://mail.yahoo.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

=====
Shane M. Walton, Software Engineer
Digital System Resources, Inc.
swalton at dsrnet.com
703.234.1674


Do You Yahoo!?
Try FREE Yahoo! Mail - the world’s greatest free email!
http://mail.yahoo.com/