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
06784b73
Commit
06784b73
authored
Mar 24, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/smartblur: use standard options parsing.
parent
15878b2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
vf_smartblur.c
libavfilter/vf_smartblur.c
+7
-13
No files found.
libavfilter/vf_smartblur.c
View file @
06784b73
...
@@ -85,18 +85,6 @@ AVFILTER_DEFINE_CLASS(smartblur);
...
@@ -85,18 +85,6 @@ AVFILTER_DEFINE_CLASS(smartblur);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
SmartblurContext
*
sblur
=
ctx
->
priv
;
SmartblurContext
*
sblur
=
ctx
->
priv
;
int
ret
;
static
const
char
*
shorthand
[]
=
{
"luma_radius"
,
"luma_strength"
,
"luma_threshold"
,
"chroma_radius"
,
"chroma_strength"
,
"chroma_threshold"
,
NULL
};
sblur
->
class
=
&
smartblur_class
;
av_opt_set_defaults
(
sblur
);
if
((
ret
=
av_opt_set_from_string
(
sblur
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
/* make chroma default to luma values, if not explicitly set */
/* make chroma default to luma values, if not explicitly set */
if
(
sblur
->
chroma
.
radius
<
RADIUS_MIN
)
if
(
sblur
->
chroma
.
radius
<
RADIUS_MIN
)
...
@@ -124,7 +112,6 @@ static av_cold void uninit(AVFilterContext *ctx)
...
@@ -124,7 +112,6 @@ static av_cold void uninit(AVFilterContext *ctx)
sws_freeContext
(
sblur
->
luma
.
filter_context
);
sws_freeContext
(
sblur
->
luma
.
filter_context
);
sws_freeContext
(
sblur
->
chroma
.
filter_context
);
sws_freeContext
(
sblur
->
chroma
.
filter_context
);
av_opt_free
(
sblur
);
}
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
@@ -302,6 +289,12 @@ static const AVFilterPad smartblur_outputs[] = {
...
@@ -302,6 +289,12 @@ static const AVFilterPad smartblur_outputs[] = {
{
NULL
}
{
NULL
}
};
};
static
const
char
*
const
shorthand
[]
=
{
"luma_radius"
,
"luma_strength"
,
"luma_threshold"
,
"chroma_radius"
,
"chroma_strength"
,
"chroma_threshold"
,
NULL
};
AVFilter
avfilter_vf_smartblur
=
{
AVFilter
avfilter_vf_smartblur
=
{
.
name
=
"smartblur"
,
.
name
=
"smartblur"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Blur the input video without impacting the outlines."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Blur the input video without impacting the outlines."
),
...
@@ -314,4 +307,5 @@ AVFilter avfilter_vf_smartblur = {
...
@@ -314,4 +307,5 @@ AVFilter avfilter_vf_smartblur = {
.
inputs
=
smartblur_inputs
,
.
inputs
=
smartblur_inputs
,
.
outputs
=
smartblur_outputs
,
.
outputs
=
smartblur_outputs
,
.
priv_class
=
&
smartblur_class
,
.
priv_class
=
&
smartblur_class
,
.
shorthand
=
shorthand
,
};
};
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