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
7e7dc148
Commit
7e7dc148
authored
Apr 11, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/curves: make possible to customize presets.
parent
a1e798ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
filters.texi
doc/filters.texi
+3
-2
vf_curves.c
libavfilter/vf_curves.c
+3
-8
No files found.
doc/filters.texi
View file @
7e7dc148
...
@@ -2371,8 +2371,9 @@ The filter accepts the following options:
...
@@ -2371,8 +2371,9 @@ The filter accepts the following options:
@table @option
@table @option
@item preset
@item preset
Select one of the available color presets. This option can not be used in
Select one of the available color presets. This option can be used in addition
addition to the @option{r}, @option{g}, @option{b} parameters.
to the @option{r}, @option{g}, @option{b} parameters; in this case, the later
options takes priority on the preset values.
Available presets are:
Available presets are:
@table @samp
@table @samp
@item none
@item none
...
...
libavfilter/vf_curves.c
View file @
7e7dc148
...
@@ -333,14 +333,9 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -333,14 +333,9 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
}
}
if
(
curves
->
preset
!=
PRESET_NONE
)
{
if
(
curves
->
preset
!=
PRESET_NONE
)
{
if
(
pts
[
0
]
||
pts
[
1
]
||
pts
[
2
])
{
if
(
!
pts
[
0
])
pts
[
0
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
r
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"It is not possible to mix a preset "
if
(
!
pts
[
1
])
pts
[
1
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
g
);
"with explicit points placements
\n
"
);
if
(
!
pts
[
2
])
pts
[
2
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
b
);
return
AVERROR
(
EINVAL
);
}
pts
[
0
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
r
);
pts
[
1
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
g
);
pts
[
2
]
=
av_strdup
(
curves_presets
[
curves
->
preset
].
b
);
if
(
!
pts
[
0
]
||
!
pts
[
1
]
||
!
pts
[
2
])
if
(
!
pts
[
0
]
||
!
pts
[
1
]
||
!
pts
[
2
])
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
}
...
...
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