Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
10e7eb6b
Unverified
Commit
10e7eb6b
authored
Nov 05, 2021
by
Wolle
Committed by
GitHub
Nov 05, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #221 from FrankBoesing/master
use __builtin_clz()
parents
f799d82f
3c9577c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/mp3_decoder/mp3_decoder.h
src/mp3_decoder/mp3_decoder.h
+2
-1
No files found.
src/mp3_decoder/mp3_decoder.h
View file @
10e7eb6b
...
...
@@ -509,7 +509,8 @@ int HybridTransform(int *xCurr, int *xPrev, int y[m_BLOCK_SIZE][m_NBANDS], SideI
inline
uint64_t
SAR64
(
uint64_t
x
,
int
n
)
{
return
x
>>
n
;}
inline
int
MULSHIFT32
(
int
x
,
int
y
)
{
int
z
;
z
=
(
uint64_t
)
x
*
(
uint64_t
)
y
>>
32
;
return
z
;}
inline
uint64_t
MADD64
(
uint64_t
sum64
,
int
x
,
int
y
)
{
sum64
+=
(
uint64_t
)
x
*
(
uint64_t
)
y
;
return
sum64
;}
/* returns 64-bit value in [edx:eax] */
inline
int
CLZ
(
int
x
){
int
numZeros
;
if
(
!
x
)
return
(
sizeof
(
int
)
*
8
);
numZeros
=
0
;
while
(
!
(
x
&
0x80000000
)){
numZeros
++
;
x
<<=
1
;}
return
numZeros
;}
//inline int CLZ(int x){int numZeros; if (!x) return(sizeof(int) * 8); numZeros = 0; while (!(x & 0x80000000)){numZeros++; x <<= 1;} return numZeros;}
#define CLZ(x) __builtin_clz(x)
inline
uint64_t
xSAR64
(
uint64_t
x
,
int
n
){
return
x
>>
n
;}
inline
int
FASTABS
(
int
x
){
int
sign
;
sign
=
x
>>
(
sizeof
(
int
)
*
8
-
1
);
x
^=
sign
;
x
-=
sign
;
return
x
;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment