MCPcopy Create free account
hub / github.com/DentonW/DevIL / Mul8Bit

Function Mul8Bit

DevIL/src-IL/src/il_dds-save.cpp:370–374  ·  view source on GitHub ↗

Added the next two functions based on Charles Bloom's rant at http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html. This code is by ryg and from the Molly Rocket forums: https://mollyrocket.com/forums/viewtopic.php?t=392.

Source from the content-addressed store, hash-verified

368// This code is by ryg and from the Molly Rocket forums:
369// https://mollyrocket.com/forums/viewtopic.php?t=392.
370static ILint Mul8Bit(ILint a, ILint b)
371{
372 ILint t = a*b + 128;
373 return (t + (t >> 8)) >> 8;
374}
375
376ILushort As16Bit(ILint r, ILint g, ILint b)
377{

Callers 1

As16BitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected