Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
4c55144e
Commit
4c55144e
authored
May 15, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_deflicker: add bypass option
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
9bebad86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
filters.texi
doc/filters.texi
+3
-0
vf_deflicker.c
libavfilter/vf_deflicker.c
+6
-3
No files found.
doc/filters.texi
View file @
4c55144e
...
...
@@ -6394,6 +6394,9 @@ Power mean
@item median
Median
@end table
@item bypass
Do not actually modify frame. Useful when one only wants metadata.
@end table
@section dejudder
...
...
libavfilter/vf_deflicker.c
View file @
4c55144e
...
...
@@ -49,6 +49,7 @@ typedef struct DeflickerContext {
int
size
;
int
mode
;
int
bypass
;
int
eof
;
int
depth
;
...
...
@@ -84,6 +85,7 @@ static const AVOption deflicker_options[] = {
{
"cm"
,
"cubic mean"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
CUBIC_MEAN
},
0
,
0
,
FLAGS
,
"mode"
},
{
"pm"
,
"power mean"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
POWER_MEAN
},
0
,
0
,
FLAGS
,
"mode"
},
{
"median"
,
"median"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MEDIAN
},
0
,
0
,
FLAGS
,
"mode"
},
{
"bypass"
,
"leave frames unchanged"
,
OFFSET
(
bypass
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
FLAGS
},
{
NULL
}
};
...
...
@@ -377,9 +379,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
}
s
->
get_factor
(
ctx
,
&
f
);
s
->
deflicker
(
ctx
,
in
->
data
[
0
],
in
->
linesize
[
0
],
out
->
data
[
0
],
out
->
linesize
[
0
],
outlink
->
w
,
outlink
->
h
,
f
);
for
(
y
=
1
;
y
<
s
->
nb_planes
;
y
++
)
{
if
(
!
s
->
bypass
)
s
->
deflicker
(
ctx
,
in
->
data
[
0
],
in
->
linesize
[
0
],
out
->
data
[
0
],
out
->
linesize
[
0
],
outlink
->
w
,
outlink
->
h
,
f
);
for
(
y
=
1
-
s
->
bypass
;
y
<
s
->
nb_planes
;
y
++
)
{
av_image_copy_plane
(
out
->
data
[
y
],
out
->
linesize
[
y
],
in
->
data
[
y
],
in
->
linesize
[
y
],
s
->
planewidth
[
y
]
*
(
1
+
(
s
->
depth
>
8
)),
s
->
planeheight
[
y
]);
...
...
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