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
0ea9e4b4
Commit
0ea9e4b4
authored
Mar 31, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gradient options are now commands.
parent
57e21062
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
11 deletions
+51
-11
modules/video_filter/gradient.c
modules/video_filter/gradient.c
+51
-11
No files found.
modules/video_filter/gradient.c
View file @
0ea9e4b4
...
@@ -45,6 +45,9 @@ static int Create ( vlc_object_t * );
...
@@ -45,6 +45,9 @@ static int Create ( vlc_object_t * );
static
void
Destroy
(
vlc_object_t
*
);
static
void
Destroy
(
vlc_object_t
*
);
static
picture_t
*
Filter
(
filter_t
*
,
picture_t
*
);
static
picture_t
*
Filter
(
filter_t
*
,
picture_t
*
);
static
int
GradientCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
void
FilterGradient
(
filter_t
*
,
picture_t
*
,
picture_t
*
);
static
void
FilterGradient
(
filter_t
*
,
picture_t
*
,
picture_t
*
);
static
void
FilterEdge
(
filter_t
*
,
picture_t
*
,
picture_t
*
);
static
void
FilterEdge
(
filter_t
*
,
picture_t
*
,
picture_t
*
);
...
@@ -140,14 +143,8 @@ static int Create( vlc_object_t *p_this )
...
@@ -140,14 +143,8 @@ static int Create( vlc_object_t *p_this )
config_ChainParse
(
p_filter
,
FILTER_PREFIX
,
ppsz_filter_options
,
config_ChainParse
(
p_filter
,
FILTER_PREFIX
,
ppsz_filter_options
,
p_filter
->
p_cfg
);
p_filter
->
p_cfg
);
var_Create
(
p_filter
,
FILTER_PREFIX
"mode"
,
if
(
!
(
psz_method
=
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_CreateGetNonEmptyStringCommand
(
p_filter
,
FILTER_PREFIX
"mode"
))
)
var_Create
(
p_filter
,
FILTER_PREFIX
"type"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_filter
,
FILTER_PREFIX
"cartoon"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
if
(
!
(
psz_method
=
var_GetString
(
p_filter
,
FILTER_PREFIX
"mode"
))
)
{
{
msg_Err
(
p_filter
,
"configuration variable "
msg_Err
(
p_filter
,
"configuration variable "
FILTER_PREFIX
"mode empty"
);
FILTER_PREFIX
"mode empty"
);
...
@@ -176,9 +173,16 @@ static int Create( vlc_object_t *p_this )
...
@@ -176,9 +173,16 @@ static int Create( vlc_object_t *p_this )
free
(
psz_method
);
free
(
psz_method
);
p_filter
->
p_sys
->
i_gradient_type
=
p_filter
->
p_sys
->
i_gradient_type
=
var_
GetInteger
(
p_filter
,
FILTER_PREFIX
"type"
);
var_
CreateGetIntegerCommand
(
p_filter
,
FILTER_PREFIX
"type"
);
p_filter
->
p_sys
->
b_cartoon
=
p_filter
->
p_sys
->
b_cartoon
=
var_GetInteger
(
p_filter
,
FILTER_PREFIX
"cartoon"
);
var_CreateGetBoolCommand
(
p_filter
,
FILTER_PREFIX
"cartoon"
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"mode"
,
GradientCallback
,
p_filter
->
p_sys
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"type"
,
GradientCallback
,
p_filter
->
p_sys
);
var_AddCallback
(
p_filter
,
FILTER_PREFIX
"cartoon"
,
GradientCallback
,
p_filter
->
p_sys
);
p_filter
->
p_sys
->
p_buf32
=
NULL
;
p_filter
->
p_sys
->
p_buf32
=
NULL
;
p_filter
->
p_sys
->
p_buf32_bis
=
NULL
;
p_filter
->
p_sys
->
p_buf32_bis
=
NULL
;
...
@@ -256,7 +260,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
...
@@ -256,7 +260,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
return
p_outpic
;
return
p_outpic
;
}
}
/*****************************************************************************
/*****************************************************************************
* Gaussian Convolution
* Gaussian Convolution
*****************************************************************************
*****************************************************************************
...
@@ -735,3 +738,40 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
...
@@ -735,3 +738,40 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
if
(
p_smooth
)
free
(
p_smooth
);
if
(
p_smooth
)
free
(
p_smooth
);
}
}
#undef p_pre_hough
#undef p_pre_hough
static
int
GradientCallback
(
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
"mode"
)
)
{
if
(
!
strcmp
(
newval
.
psz_string
,
"gradient"
)
)
{
p_sys
->
i_mode
=
GRADIENT
;
}
else
if
(
!
strcmp
(
newval
.
psz_string
,
"edge"
)
)
{
p_sys
->
i_mode
=
EDGE
;
}
else
if
(
!
strcmp
(
newval
.
psz_string
,
"hough"
)
)
{
p_sys
->
i_mode
=
HOUGH
;
}
else
{
msg_Err
(
p_this
,
"no valid gradient mode provided"
);
p_sys
->
i_mode
=
GRADIENT
;
}
}
else
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"type"
)
)
{
p_sys
->
i_gradient_type
=
newval
.
i_int
;
}
else
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"cartoon"
)
)
{
p_sys
->
b_cartoon
=
newval
.
b_bool
;
}
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