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
1309f148
Commit
1309f148
authored
Mar 31, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to change the extracted color once the module is launched.
parent
71a183b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
3 deletions
+33
-3
modules/video_filter/extract.c
modules/video_filter/extract.c
+33
-3
No files found.
modules/video_filter/extract.c
View file @
1309f148
...
...
@@ -39,6 +39,8 @@ static int Create ( vlc_object_t * );
static
void
Destroy
(
vlc_object_t
*
);
static
picture_t
*
Filter
(
filter_t
*
,
picture_t
*
);
static
int
ExtractCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
void
get_red_from_yuv420
(
picture_t
*
,
picture_t
*
,
int
,
int
,
int
);
static
void
get_green_from_yuv420
(
picture_t
*
,
picture_t
*
,
int
,
int
,
int
);
...
...
@@ -112,10 +114,10 @@ static int Create( vlc_object_t *p_this )
config_ChainParse
(
p_filter
,
FILTER_PREFIX
,
ppsz_filter_options
,
p_filter
->
p_cfg
);
var_Create
(
p_filter
,
FILTER_PREFIX
"component"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_filter
->
p_sys
->
i_color
=
var_GetInteger
(
p_filter
,
p_filter
->
p_sys
->
i_color
=
var_CreateGetIntegerCommand
(
p_filter
,
FILTER_PREFIX
"component"
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"component"
,
ExtractCallback
,
p_filter
->
p_sys
);
switch
(
p_filter
->
p_sys
->
i_color
)
{
case
RED
:
...
...
@@ -685,3 +687,31 @@ static void get_blue_from_yuv422( picture_t *p_inpic, picture_t *p_outpic,
vout
+=
i_uv_pitch
-
i_uv_visible_pitch
;
}
}
static
int
ExtractCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
filter_sys_t
*
p_sys
=
(
filter_sys_t
*
)
p_data
;
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"component"
)
)
{
p_sys
->
i_color
=
newval
.
i_int
;
switch
(
p_sys
->
i_color
)
{
case
RED
:
case
GREEN
:
case
BLUE
:
break
;
default:
make_projection_matrix
(
p_sys
->
i_color
,
p_sys
->
projection_matrix
);
break
;
}
}
else
{
msg_Warn
(
p_this
,
"Unknown callback command."
);
}
return
VLC_SUCCESS
;
}
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