Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7bfda7d1
Commit
7bfda7d1
authored
Feb 22, 2017
by
Ganesh Ajjanagadde
Committed by
Vittorio Giovara
Mar 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
intmath: add faster clz support
parent
5ff3b5ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
intmath.h
libavutil/intmath.h
+19
-0
No files found.
libavutil/intmath.h
View file @
7bfda7d1
...
...
@@ -44,6 +44,10 @@
# endif
#endif
/* ff_log2 */
#ifndef ff_clz
# define ff_clz(v) __builtin_clz(v)
#endif
/* ff_clz */
#endif
/* AV_GCC_VERSION_AT_LEAST(3,4) */
extern
const
uint8_t
ff_log2_tab
[
256
];
...
...
@@ -132,6 +136,21 @@ static av_always_inline av_const int ff_ctz_c(int v)
}
#endif
#ifndef ff_clz
#define ff_clz ff_clz_c
static
av_always_inline
av_const
unsigned
ff_clz_c
(
unsigned
x
)
{
unsigned
i
=
sizeof
(
x
)
*
8
;
while
(
x
)
{
x
>>=
1
;
i
--
;
}
return
i
;
}
#endif
/**
* Trailing zero bit count.
*
...
...
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