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 - sdlgenblit.pl / SDL_blit_auto.c only supports a handful of formats
Summary: sdlgenblit.pl / SDL_blit_auto.c only supports a handful of formats
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.12
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-10 10:52 UTC by bugmenot_0
Modified: 2020-06-10 15:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.