Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
d8e69495
Commit
d8e69495
authored
Mar 08, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't reinvent max/min for the nth time.
parent
33144db0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+6
-7
No files found.
modules/video_filter/motiondetect.c
View file @
d8e69495
...
...
@@ -390,14 +390,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_inpic )
{
if
(
colors
[
j
]
!=
j
)
continue
;
if
(
color_x_min
[
j
]
==
-
1
)
continue
;
#define max( a, b ) ( a > b ? a : b )
#define min( a, b ) ( a < b ? a : b )
if
(
max
(
color_x_min
[
i
],
color_x_min
[
j
]
)
<
min
(
color_x_max
[
i
],
color_x_max
[
j
]
)
&&
max
(
color_y_min
[
i
],
color_y_min
[
j
]
)
<
min
(
color_y_max
[
i
],
color_y_max
[
j
]
)
)
if
(
__MAX
(
color_x_min
[
i
],
color_x_min
[
j
]
)
<
__MIN
(
color_x_max
[
i
],
color_x_max
[
j
]
)
&&
__MAX
(
color_y_min
[
i
],
color_y_min
[
j
]
)
<
__MIN
(
color_y_max
[
i
],
color_y_max
[
j
]
)
)
{
color_x_min
[
i
]
=
min
(
color_x_min
[
i
],
color_x_min
[
j
]
);
color_x_max
[
i
]
=
max
(
color_x_max
[
i
],
color_x_max
[
j
]
);
color_y_min
[
i
]
=
min
(
color_y_min
[
i
],
color_y_min
[
j
]
);
color_y_max
[
i
]
=
max
(
color_y_max
[
i
],
color_y_max
[
j
]
);
color_x_min
[
i
]
=
__MIN
(
color_x_min
[
i
],
color_x_min
[
j
]
);
color_x_max
[
i
]
=
__MAX
(
color_x_max
[
i
],
color_x_max
[
j
]
);
color_y_min
[
i
]
=
__MIN
(
color_y_min
[
i
],
color_y_min
[
j
]
);
color_y_max
[
i
]
=
__MAX
(
color_y_max
[
i
],
color_y_max
[
j
]
);
color_x_min
[
j
]
=
-
1
;
j
=
0
;
}
...
...
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