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
19d57ca6
Commit
19d57ca6
authored
Feb 22, 2017
by
James Almer
Committed by
Vittorio Giovara
Mar 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavutil: add av_mod_uintp2
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
7bfda7d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
common.h
libavutil/common.h
+14
-0
No files found.
libavutil/common.h
View file @
19d57ca6
...
...
@@ -182,6 +182,17 @@ static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
else
return
a
;
}
/**
* Clear high bits from an unsigned integer starting with specific bit position
* @param a value to clip
* @param p bit position to clip at
* @return clipped value
*/
static
av_always_inline
av_const
unsigned
av_mod_uintp2_c
(
unsigned
a
,
unsigned
p
)
{
return
a
&
((
1
<<
p
)
-
1
);
}
/**
* Add two signed 32-bit values with saturation.
*
...
...
@@ -410,6 +421,9 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
#ifndef av_clip_uintp2
# define av_clip_uintp2 av_clip_uintp2_c
#endif
#ifndef av_mod_uintp2
# define av_mod_uintp2 av_mod_uintp2_c
#endif
#ifndef av_sat_add32
# define av_sat_add32 av_sat_add32_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