This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10400 - Consolidate all fixed point math routines in one library
Attached to Project:
Rockbox
Opened by Jeffrey Goode (Blue_Dude) - Tuesday, 30 June 2009, 01:40 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Sunday, 05 July 2009, 20:06 GMT+2
Opened by Jeffrey Goode (Blue_Dude) - Tuesday, 30 June 2009, 01:40 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Sunday, 05 July 2009, 20:06 GMT+2
|
DetailsThis consolidates several duplicate routines from different places. Some new header files are created to make the new library available to plugins and codecs. This ought to cut down on compile size, reduce errors, and keep from reinventing the wheel.
I still need to add to the library from replaygain, but this is most of it. |
This task depends upon
Closed by Maurus Cuelenaere (mcuelenaere)
Sunday, 05 July 2009, 20:06 GMT+2
Reason for closing: Accepted
Additional comments about closing: In r21664.
Sunday, 05 July 2009, 20:06 GMT+2
Reason for closing: Accepted
Additional comments about closing: In r21664.
2 things: You need to bump the codec and plugin API (both the normal and min version for each) because the addresses of the api function changed (they're just function pointer). And I think the change to eq.h slipped in accidentally?
I'm not really trying to integrate with the API. What I am doing is making the correct header files available to plugins and codecs (total of three versions) so that they can use the main library in apps. With the appropriate changes to the SOURCES files, they get their own compiled versions, just as though they had their own copy of the library itself, so they're not using the version compiled in the main app. I suppose that there's a way to expose the main app's functions to the codecs and plugins, which would make them smaller after linking, but it would involve rewriting code for each codec or plugin that needed it. I was trying to consolidate the math functions where I could use them, not necessarily overhaul bits and pieces of scattered code. This way, nothing has to be rewritten, since the compiler does all the work in relocating the code. The compiled code itself should be exactly the same.
The change to eq.h had to be there, since for some reason it didn't recognize the bool type anymore at compile time without it. I think somehow it was riding on dsp.h's coattails before and slipped through. I'll try it without the change now, maybe it'll work.
This patch also splits off the FRACMUL macros into their own header file. They were only tangentially related to other math. They are easy to include as needed as it's just a header file.
I also did some small editing to change some function names to make them more easily identifiable as belonging to this library. These are cosmetic changes only, for readability.