SDL_BlitSurface takes longer on 16 Bpp?

Why is that? Same resolution and less bytes per pixel are taking longer
to blit. Like 7ms on 32 bpp and 15ms on 16bpp…

An x86 processor takes longer if you force it to 16 bit accesses instead of
the native 32 bits. For your case, it might be semi-forced to do that if the
surfaces are misaligned. That said, the only info you gave is the target
format, what is still missing is the source format and instructionset your
CPU is using.

UliOn Saturday 05 May 2007 06:15:01 Manuel Garc?a Cabrera wrote:

Why is that? Same resolution and less bytes per pixel are taking longer
to blit. Like 7ms on 32 bpp and 15ms on 16bpp…

Ulrich Eckhardt escribi?:> On Saturday 05 May 2007 06:15:01 Manuel Garc?a Cabrera wrote:

Why is that? Same resolution and less bytes per pixel are taking longer
to blit. Like 7ms on 32 bpp and 15ms on 16bpp…

An x86 processor takes longer if you force it to 16 bit accesses instead of
the native 32 bits. For your case, it might be semi-forced to do that if the
surfaces are misaligned. That said, the only info you gave is the target
format, what is still missing is the source format and instructionset your
CPU is using.

Uli


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I receive pixel data of a 16bpp pixel and use SDL_CreateRGBSurfaceFrom.
That would be the source. I blit it to a surface I setted the video mode
to 32 bits, but tried setting it to 16bits too… I have a C2D E6600

Manuel Garc?a Cabrera wrote:

Ulrich Eckhardt escribi?:

Why is that? Same resolution and less bytes per pixel are taking longer
to blit. Like 7ms on 32 bpp and 15ms on 16bpp…

An x86 processor takes longer if you force it to 16 bit accesses instead of
the native 32 bits. For your case, it might be semi-forced to do that if the
surfaces are misaligned. That said, the only info you gave is the target
format, what is still missing is the source format and instructionset your
CPU is using.

Uli


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I receive pixel data of a 16bpp pixel and use SDL_CreateRGBSurfaceFrom.
That would be the source. I blit it to a surface I setted the video mode
to 32 bits, but tried setting it to 16bits too… I have a C2D E6600

Use SDL_DisplayFormat, luke.

Stephane>> On Saturday 05 May 2007 06:15:01 Manuel Garc?a Cabrera wrote: