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
9f9ebe63
Commit
9f9ebe63
authored
Sep 18, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libpostproc/postprocess: avoid some if()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
074eef56
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
postprocess.c
libpostproc/postprocess.c
+15
-15
No files found.
libpostproc/postprocess.c
View file @
9f9ebe63
...
...
@@ -209,13 +209,13 @@ static inline int isHorizDC_C(const uint8_t src[], int stride, const PPContext *
const
int
dcThreshold
=
dcOffset
*
2
+
1
;
for
(
y
=
0
;
y
<
BLOCK_SIZE
;
y
++
){
if
(((
unsigned
)(
src
[
0
]
-
src
[
1
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
1
]
-
src
[
2
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
2
]
-
src
[
3
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
3
]
-
src
[
4
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
4
]
-
src
[
5
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
5
]
-
src
[
6
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
6
]
-
src
[
7
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
numEq
+=
((
unsigned
)(
src
[
0
]
-
src
[
1
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
1
]
-
src
[
2
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
2
]
-
src
[
3
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
3
]
-
src
[
4
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
4
]
-
src
[
5
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
5
]
-
src
[
6
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
6
]
-
src
[
7
]
+
dcOffset
))
<
dcThreshold
;
src
+=
stride
;
}
return
numEq
>
c
->
ppMode
.
flatnessThreshold
;
...
...
@@ -233,14 +233,14 @@ static inline int isVertDC_C(const uint8_t src[], int stride, const PPContext *c
src
+=
stride
*
4
;
// src points to begin of the 8x8 Block
for
(
y
=
0
;
y
<
BLOCK_SIZE
-
1
;
y
++
){
if
(((
unsigned
)(
src
[
0
]
-
src
[
0
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
1
]
-
src
[
1
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
2
]
-
src
[
2
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
3
]
-
src
[
3
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
4
]
-
src
[
4
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
5
]
-
src
[
5
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
6
]
-
src
[
6
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
if
(((
unsigned
)(
src
[
7
]
-
src
[
7
+
stride
]
+
dcOffset
))
<
dcThreshold
)
numEq
++
;
numEq
+=
((
unsigned
)(
src
[
0
]
-
src
[
0
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
1
]
-
src
[
1
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
2
]
-
src
[
2
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
3
]
-
src
[
3
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
4
]
-
src
[
4
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
5
]
-
src
[
5
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
6
]
-
src
[
6
+
stride
]
+
dcOffset
))
<
dcThreshold
;
numEq
+=
((
unsigned
)(
src
[
7
]
-
src
[
7
+
stride
]
+
dcOffset
))
<
dcThreshold
;
src
+=
stride
;
}
return
numEq
>
c
->
ppMode
.
flatnessThreshold
;
...
...
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