summaryrefslogtreecommitdiffstats
path: root/lib/fixedpoint
AgeCommit message (Collapse)AuthorFilesLines
2017-11-21Undo hacks to meant to get around string formatting limitationsMichael Sevakis3-3/+31
The new vuprintf makes unnecessary workarounds due to formatting limitations. I checked grep output for whatever appeared to fit but it's possible I missed some instances because they weren't so obvious. Also, this means sound settings can dynamically work with any number of decimals rather than the current assumption of one or two. Add an ipow() function to help and take advantage of dynamic field width and precision. Consolidate string formatting of sound settings. Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
2017-10-01Need limits.h for hosted buildsMichael Sevakis1-0/+1
Change-Id: Iac1433957de80ad5db51396f74acf1f4f8d45bf3
2017-10-01Replace fp_sqrt function with one that only uses shift, or and sub.Michael Sevakis2-51/+51
Simply extends the current isqrt() to be able to do fractional bits and improves the initial estimate using clz(). iqrt() itself is no more and is equivalent to fp_sqrt(x, 0). The original also had a small bug where the guess comparision should have been >=, not >. Uses no large integer math or division and is very accurate (simply returns a truncated fraction). Change-Id: I2ae26e6505df1770dc01e56220f7385369f90ae9
2013-05-04Revert "Don't set CORE_GCSECTIONS in fixedpoint.make."Dominik Riebeling1-0/+1
While it made the mini2g not crash during startup anymore further tests showed that other mini2g devices still exhibit the crash, or end up with a "No partition found" error; furthermore the device tested first still crashes on USB disconnect. Therefore the change doesn't really help with the problem, and at the expense of increasing binary size for all other targets there is no point in keeping it for now. This reverts commit 850491a043a9341ef31ffb8c02eedd2ae7b2c53e.
2013-04-28Don't set CORE_GCSECTIONS in fixedpoint.make.Dominik Riebeling1-1/+0
fixedpoint.make is not a subdir Makefile but a lib Makefile. Setting CORE_GCSECTIONS in it will affect the final link and make it always use --gc-sections (for SWCODEC Rockbox), since libfixedpoint is always needed (bootloader and HWCODEC don't use libfixedpoint). Fixes FS#12857. Change-Id: Ib30bd03cbcea9c339a73daf7b673868aa3cc7a88
2013-04-25Add $(SHARED_CFLAGS) to fixedpoint.make to quash amd64 errors in 95e23de.Michael Sevakis1-1/+1
Thanks to Frank Gevaerts. Change-Id: I6ca1d0258bfc70950d0ad5c2975d2bd88060b8a3
2013-04-26Make fixepoint.c as a shared library (libfixedpoint.a).Michael Sevakis3-0/+618
Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d Reviewed-on: http://gerrit.rockbox.org/456 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>