Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
55aa5282
Commit
55aa5282
authored
Oct 10, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ball filter: quick fix for static data
parent
29d1b42e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
31 deletions
+28
-31
modules/video_filter/ball.c
modules/video_filter/ball.c
+28
-31
No files found.
modules/video_filter/ball.c
View file @
55aa5282
...
...
@@ -45,34 +45,25 @@
enum
{
RED
,
GREEN
,
BLUE
,
WHITE
};
typedef
struct
{
uint8_t
comp1
;
uint8_t
comp2
;
uint8_t
comp3
;
}
COLOR
;
static
COLOR
colorList
[
4
];
#define COLORS_RGB \
colorList[RED].comp1 = 255;
colorList[RED].comp2 = 0; \
colorList[RED].comp3 = 0; \
colorList[GREEN].comp1 = 0;
colorList[GREEN].comp2 = 255; \
colorList[GREEN].comp3 = 0; \
colorList[BLUE].comp1 = 0;
colorList[BLUE].comp2 = 0; \
colorList[BLUE].comp3 = 255; \
colorList[WHITE].comp1 = 255;
colorList[WHITE].comp2 = 255; \
colorList[WHITE].comp3 = 255;
p_filter->p_sys->colorList[RED].comp1 = 255; p_filter->p_sys->
colorList[RED].comp2 = 0; \
p_filter->p_sys->
colorList[RED].comp3 = 0; \
p_filter->p_sys->colorList[GREEN].comp1 = 0; p_filter->p_sys->
colorList[GREEN].comp2 = 255; \
p_filter->p_sys->
colorList[GREEN].comp3 = 0; \
p_filter->p_sys->colorList[BLUE].comp1 = 0; p_filter->p_sys->
colorList[BLUE].comp2 = 0; \
p_filter->p_sys->
colorList[BLUE].comp3 = 255; \
p_filter->p_sys->colorList[WHITE].comp1 = 255; p_filter->p_sys->
colorList[WHITE].comp2 = 255; \
p_filter->p_sys->
colorList[WHITE].comp3 = 255;
#define COLORS_YUV \
colorList[RED].comp1 = 82;
colorList[RED].comp2 = 240; \
colorList[RED].comp3 = 90; \
colorList[GREEN].comp1 = 145;
colorList[GREEN].comp2 = 34; \
colorList[GREEN].comp3 = 54 ; \
colorList[BLUE].comp1 = 41;
colorList[BLUE].comp2 = 146; \
colorList[BLUE].comp3 = 240; \
colorList[WHITE].comp1 = 255;
colorList[WHITE].comp2 = 128; \
colorList[WHITE].comp3 = 128;
p_filter->p_sys->colorList[RED].comp1 = 82; p_filter->p_sys->
colorList[RED].comp2 = 240; \
p_filter->p_sys->
colorList[RED].comp3 = 90; \
p_filter->p_sys->colorList[GREEN].comp1 = 145; p_filter->p_sys->
colorList[GREEN].comp2 = 34; \
p_filter->p_sys->
colorList[GREEN].comp3 = 54 ; \
p_filter->p_sys->colorList[BLUE].comp1 = 41; p_filter->p_sys->
colorList[BLUE].comp2 = 146; \
p_filter->p_sys->
colorList[BLUE].comp3 = 240; \
p_filter->p_sys->colorList[WHITE].comp1 = 255; p_filter->p_sys->
colorList[WHITE].comp2 = 128; \
p_filter->p_sys->
colorList[WHITE].comp3 = 128;
/*****************************************************************************
...
...
@@ -214,6 +205,12 @@ struct filter_sys_t
void
(
*
drawingPixelFunction
)(
filter_sys_t
*
,
picture_t
*
,
uint8_t
,
uint8_t
,
uint8_t
,
int
,
int
,
bool
);
struct
{
uint8_t
comp1
;
uint8_t
comp2
;
uint8_t
comp3
;
}
colorList
[
4
];
};
...
...
@@ -397,9 +394,9 @@ static void drawBall( filter_sys_t *p_sys, picture_t *p_outpic )
&&
j
>=
0
&&
j
<
i_height
)
{
(
*
p_sys
->
drawingPixelFunction
)(
p_sys
,
p_outpic
,
colorList
[
p_sys
->
ballColor
].
comp1
,
colorList
[
p_sys
->
ballColor
].
comp2
,
colorList
[
p_sys
->
ballColor
].
comp3
,
p_sys
->
colorList
[
p_sys
->
ballColor
].
comp1
,
p_sys
->
colorList
[
p_sys
->
ballColor
].
comp2
,
p_sys
->
colorList
[
p_sys
->
ballColor
].
comp3
,
i
,
j
,
b_skip
);
}
b_skip
=
!
b_skip
;
...
...
@@ -646,9 +643,9 @@ static void FilterBall( filter_t *p_filter, picture_t *p_inpic,
>
p_sys
->
i_gradThresh
)
{
(
*
p_sys
->
drawingPixelFunction
)(
p_sys
,
p_outpic
,
colorList
[
WHITE
].
comp1
,
colorList
[
WHITE
].
comp2
,
colorList
[
WHITE
].
comp3
,
p_filter
->
p_sys
->
colorList
[
WHITE
].
comp1
,
p_filter
->
p_sys
->
colorList
[
WHITE
].
comp2
,
p_filter
->
p_sys
->
colorList
[
WHITE
].
comp3
,
x
,
y
,
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