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
2ce29d17
Commit
2ce29d17
authored
Jan 03, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu: add ff_parity()
parent
d64fe951
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
configure
configure
+2
-0
intmath.h
libavutil/intmath.h
+12
-0
No files found.
configure
View file @
2ce29d17
...
...
@@ -1736,6 +1736,7 @@ BUILTIN_LIST="
machine_rw_barrier
MemoryBarrier
mm_empty
parity
rdtsc
sarestart
sync_val_compare_and_swap
...
...
@@ -5241,6 +5242,7 @@ check_builtin sarestart signal.h "SA_RESTART"
check_builtin sync_val_compare_and_swap
""
"int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
check_builtin gmtime_r time.h
"time_t *time; struct tm *tm; gmtime_r(time, tm)"
check_builtin localtime_r time.h
"time_t *time; struct tm *tm; localtime_r(time, tm)"
check_builtin parity
""
"__builtin_parity(123)"
case
"
$custom_allocator
"
in
jemalloc
)
...
...
libavutil/intmath.h
View file @
2ce29d17
...
...
@@ -153,6 +153,18 @@ static av_always_inline av_const unsigned ff_clz_c(unsigned x)
}
#endif
#ifndef ff_parity
#define ff_parity ff_parity_c
static
av_always_inline
av_const
int
ff_parity_c
(
uint32_t
v
)
{
#if HAVE_PARITY
return
__builtin_parity
(
v
);
#else
return
av_popcount
(
v
)
&
1
;
#endif
}
#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