We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5183

Summary: sdlgenblit.pl / SDL_blit_auto.c only supports a handful of formats
Product: SDL Reporter: bugmenot_0 <kajema2739>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.12   
Hardware: All   
OS: All   

Description bugmenot_0 2020-06-10 10:52:25 UTC
sdlgenblit.pl / SDL_blit_auto.c is currently used for only a handful of 32-bit formats.

The header in sdlgenblit.pl suggests that it could be used for 16-bit formats and many other formats.

With an optimizing compiler that follows movements of the bits, this could potentially improve many conversions and blending operations.

Doing this appears to be trivial. Why wasn't this added?
Comment 1 Sam Lantinga 2020-06-10 15:51:40 UTC
We used to include many more formats, but it led to huge code size bloat and wasn't used by many people. The common cases are intended to be hand optimized in SDL_blit_*, with the sdlgenblit.pl covering some other less common but important cases, followed by the slow blitter as fallback for rare format conversions.