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
ae52eb7f
Commit
ae52eb7f
authored
Oct 26, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu: add av_clip64()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5f0105b8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
common.h
libavutil/common.h
+17
-0
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/common.h
View file @
ae52eb7f
...
...
@@ -102,6 +102,20 @@ static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
else
return
a
;
}
/**
* Clip a signed 64bit integer value into the amin-amax range.
* @param a value to clip
* @param amin minimum value of the clip range
* @param amax maximum value of the clip range
* @return clipped value
*/
static
av_always_inline
av_const
int64_t
av_clip64_c
(
int64_t
a
,
int64_t
amin
,
int64_t
amax
)
{
if
(
a
<
amin
)
return
amin
;
else
if
(
a
>
amax
)
return
amax
;
else
return
a
;
}
/**
* Clip a signed integer value into the 0-255 range.
* @param a value to clip
...
...
@@ -375,6 +389,9 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
#ifndef av_clip
# define av_clip av_clip_c
#endif
#ifndef av_clip64
# define av_clip64 av_clip64_c
#endif
#ifndef av_clip_uint8
# define av_clip_uint8 av_clip_uint8_c
#endif
...
...
libavutil/version.h
View file @
ae52eb7f
...
...
@@ -75,7 +75,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR
0
#define LIBAVUTIL_VERSION_MINOR
1
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
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