Commit graph

6 commits

Author SHA1 Message Date
cinap_lenrek e0cf0261d0 resample: improve performance (thanks José Miguel Sánchez García)
Resample is well known for taking a long time to resize an image. This
patch brings an important performance boost (in my test image, time
was reduced from ~2850ms to ~500ms). It does that by extracting FP
multiplication and division out of the innermost loop of
resamplex/resampley.

The results differ slightly from the current implementation: in my
test: ~0.3% of the bytes had a ±2 difference in their value, which I
attribute to rounding errors. I'm personally not concerned with that
deviation, given the performance gains. However, I recommend testing
it just to be sure I didn't overlook anything.

José Miguel Sánchez García
2021-04-25 12:16:40 +02:00
cinap_lenrek 402741bc01 resample: simplify getint() 2015-08-03 18:30:02 +02:00
cinap_lenrek df9597ecde resample: fix XRGB32 color channel handling 2013-08-12 19:28:10 +02:00
cinap_lenrek 558b9558d4 more generic way to deal with image chan conversion for resize/resample/rotate
this is to catch crazy color channels like k8a8 and the 15/16 bit
ones and CMAP. basically, just convert to RGBA32 or RGB24 depending
on if it has an alpha channel.
2012-10-18 20:17:12 +02:00
Taru Karttunen a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00