mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-19 01:52:35 -05:00
Further optimised (vs. libgcc) unsigned 32 bit division for ARMv4 (based on the ARMv5(+) version from libgcc), in IRAM on PP for better performance on PP5002, and put into the codeclib for possible reuse. APE -c1000 is now usable on both PP502x and PP5002 (~138% realtime, they're on par now). Gigabeat F/X should also see an APE speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19009 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7a835ee0c6
commit
fe04e40be7
4 changed files with 137 additions and 3 deletions
|
|
@ -49,6 +49,14 @@ removing the rc parameter from each function (and the RNGC macro)).
|
|||
|
||||
*/
|
||||
|
||||
#ifdef ROCKBOX
|
||||
#include "../lib/codeclib.h"
|
||||
/* for UDIV32() */
|
||||
#endif
|
||||
|
||||
#ifndef UDIV32
|
||||
#define UDIV32(a, b) (a / b)
|
||||
#endif
|
||||
|
||||
/* BITSTREAM READING FUNCTIONS */
|
||||
|
||||
|
|
@ -121,15 +129,15 @@ static inline void range_dec_normalize(void)
|
|||
static inline int range_decode_culfreq(int tot_f)
|
||||
{
|
||||
range_dec_normalize();
|
||||
rc.help = rc.range / tot_f;
|
||||
return rc.low / rc.help;
|
||||
rc.help = UDIV32(rc.range, tot_f);
|
||||
return UDIV32(rc.low, rc.help);
|
||||
}
|
||||
|
||||
static inline int range_decode_culshift(int shift)
|
||||
{
|
||||
range_dec_normalize();
|
||||
rc.help = rc.range >> shift;
|
||||
return rc.low / rc.help;
|
||||
return UDIV32(rc.low, rc.help);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue