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
b73ec054
Commit
b73ec054
authored
Jan 03, 2012
by
Daniel Verkamp
Committed by
Janne Grunau
Jan 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add av_popcount64
Signed-off-by:
Janne Grunau
<
janne-libav@jannau.net
>
parent
418f066f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
common.h
libavutil/common.h
+13
-0
No files found.
libavutil/common.h
View file @
b73ec054
...
...
@@ -218,6 +218,16 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
return
(
x
+
(
x
>>
16
))
&
0x3F
;
}
/**
* Count number of bits set to one in x
* @param x value to count bits of
* @return the number of bits set to one in x
*/
static
av_always_inline
av_const
int
av_popcount64_c
(
uint64_t
x
)
{
return
av_popcount
(
x
)
+
av_popcount
(
x
>>
32
);
}
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
...
...
@@ -383,3 +393,6 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
#ifndef av_popcount
# define av_popcount av_popcount_c
#endif
#ifndef av_popcount64
# define av_popcount64 av_popcount64_c
#endif
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