I had set flag= SDL_FULLSCREEN, and not do stretch, but the performance also not improve.
After I check my code detailed, I mark the code
# SDL_DisplayYUVOverlay(overlay, &rect);
this line, then at the console and xwindows the cpu use rate will almost similar 10% only.
I found that at console mode, please set the MTRR will improve your performance.
How to set the MTRR, please see the url below:
http://www.mplayerhq.hu/DOCS/HTML/zh/video.html
cpu%
xwindow flag = SDL_SWSURFACE 10%
console flag = SDL_SWSURFACE 55% After set MTRR 30%
xwindow flag = SDL_HWSURFACE 20%
console flag = SDL_HWSURFACE 99% After set MTRR 20%
I found that at console mode may be use directfb will imporve performance too, but I still no how to use that, have any people can help me? Thanks.
I just know set the environment for directfb like this:
putenv("SDL_VIDEODRIVER=directfb");
and I had install directfb, but when I run it, had error like this:
Couldn't initialize SDL: No available video device