96b00a50f1
struct fraction is slooooooooooow. This patch adds a simple 64-bit (32-bits integral, 32-bits fractional) fixed-point math API that is *much* faster (observed roughly 5x speed-up) when doing intensive graphics operations. It is optimized for speed over accuracy so some operations may lose a bit more precision than expected, but overall it's still plenty of bits for most use cases. Also includes support for basic trigonometric functions with a small lookup table. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Id0f9c23980e36ce0ac0b7c5cd0bc66153bca1fd0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42993 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Hung-Te Lin <hungte@chromium.org> |
||
---|---|---|
.. | ||
Makefile.inc | ||
args.c | ||
console.c | ||
coreboot.c | ||
ctype.c | ||
die.c | ||
exec.c | ||
fmap.c | ||
fpmath.c | ||
getopt_long.c | ||
hexdump.c | ||
ipchecksum.c | ||
lib.c | ||
libgcc.c | ||
malloc.c | ||
memory.c | ||
printf.c | ||
qsort.c | ||
rand.c | ||
readline.c | ||
string.c | ||
strlcpy.c | ||
sysinfo.c | ||
time.c |