-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In spng_decode_image, pow is used instead of powf, even though all operands are float, not double. This unnecessarily pulls the double exp/log LUTs (instead of the expf/logf LUTs), increasing binary sizes by almost 10KiB for a project already using powf.
exponent = 1.0f / exponent;
unsigned i;
for(i=0; i < lut_entries; i++)
{
float c = pow((float)i / max, exponent) * max;
if(c > max) c = max;
gamma_lut[i] = (uint16_t)c;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working