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
7a62e94a
Commit
7a62e94a
authored
Jan 24, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization
Originally committed as revision 2720 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
83f8c0c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
common.h
libavcodec/common.h
+22
-14
No files found.
libavcodec/common.h
View file @
7a62e94a
...
...
@@ -1012,23 +1012,31 @@ static inline int av_log2_16bit(unsigned int v)
return
n
;
}
/* median of 3 */
static
inline
int
mid_pred
(
int
a
,
int
b
,
int
c
)
{
int
vmin
,
vmax
;
vmax
=
vmin
=
a
;
if
(
b
<
vmin
)
vmin
=
b
;
else
vmax
=
b
;
if
(
c
<
vmin
)
vmin
=
c
;
else
if
(
c
>
vmax
)
vmax
=
c
;
return
a
+
b
+
c
-
vmin
-
vmax
;
#if 0
int t= (a-b)&((a-b)>>31);
a-=t;
b+=t;
b-= (b-c)&((b-c)>>31);
b+= (a-b)&((a-b)>>31);
return b;
#else
if
(
a
>
b
){
if
(
c
>
b
){
if
(
c
>
a
)
b
=
a
;
else
b
=
c
;
}
}
else
{
if
(
b
>
c
){
if
(
c
>
a
)
b
=
c
;
else
b
=
a
;
}
}
return
b
;
#endif
}
static
inline
int
clip
(
int
a
,
int
amin
,
int
amax
)
...
...
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