forked from len0rd/rockbox
Improved bitrev12, using a larger LUT to save one lookup, speeds up vorbis about 2% on beast, about 0.5% on h300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23973 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
66776bc479
commit
b2a27b4280
1 changed files with 8 additions and 4 deletions
|
@ -243,12 +243,16 @@ static inline void mdct_butterflies(int32_t *x,int points,int shift) {
|
|||
mdct_butterfly_32(x+j);
|
||||
}
|
||||
|
||||
|
||||
static const unsigned char bitrev[16] ICONST_ATTR =
|
||||
{0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
|
||||
static const unsigned char bitrev[] ICONST_ATTR =
|
||||
{
|
||||
0, 32, 16, 48, 8, 40, 24, 56, 4, 36, 20, 52, 12, 44, 28, 60,
|
||||
2, 34, 18, 50, 10, 42, 26, 58, 6, 38, 22, 54, 14, 46, 30, 62,
|
||||
1, 33, 17, 49, 9, 41, 25, 57, 5, 37, 21, 53, 13, 45, 29, 61,
|
||||
3, 35, 19, 51, 11, 43, 27, 59, 7, 39, 23, 55, 15, 47, 31, 63
|
||||
};
|
||||
|
||||
static inline int bitrev12(int x){
|
||||
return bitrev[x>>8]|(bitrev[(x&0x0f0)>>4]<<4)|(((int)bitrev[x&0x00f])<<8);
|
||||
return bitrev[x>>6]|((bitrev[x&0x03f])<<6);
|
||||
}
|
||||
|
||||
static inline void mdct_bitreverse(int32_t *x,int n,int step,int shift) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue