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
b2c6a11f
Commit
b2c6a11f
authored
Aug 27, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_atadenoise: add planes option
Make possible filtering only some planes.
parent
69abf4f9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
filters.texi
doc/filters.texi
+3
-0
vf_atadenoise.c
libavfilter/vf_atadenoise.c
+15
-0
No files found.
doc/filters.texi
View file @
b2c6a11f
...
...
@@ -4397,6 +4397,9 @@ threshold B is designed to react on continuous changes in the input signal.
@item s
Set number of frames filter will use for averaging. Default is 33. Must be odd
number in range [5, 129].
@item p
Set what planes of frame filter will use for averaging. Default is all.
@end table
@section bbox
...
...
libavfilter/vf_atadenoise.c
View file @
b2c6a11f
...
...
@@ -25,6 +25,7 @@
* David Bartovčak and Miroslav Vrankić
*/
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
...
...
@@ -44,6 +45,7 @@ typedef struct ATADenoiseContext {
float
fthra
[
4
],
fthrb
[
4
];
int
thra
[
4
],
thrb
[
4
];
int
planes
;
int
nb_planes
;
int
planewidth
[
4
];
int
planeheight
[
4
];
...
...
@@ -68,6 +70,7 @@ static const AVOption atadenoise_options[] = {
{
"2a"
,
"set threshold A for 3rd plane"
,
OFFSET
(
fthra
[
2
]),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
02
},
0
,
0
.
3
,
FLAGS
},
{
"2b"
,
"set threshold B for 3rd plane"
,
OFFSET
(
fthrb
[
2
]),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
04
},
0
,
5
.
0
,
FLAGS
},
{
"s"
,
"set how many frames to use"
,
OFFSET
(
size
),
AV_OPT_TYPE_INT
,
{.
i64
=
9
},
5
,
SIZE
,
FLAGS
},
{
"p"
,
"set what planes to filter"
,
OFFSET
(
planes
),
AV_OPT_TYPE_FLAGS
,
{.
i64
=
7
},
0
,
15
,
FLAGS
},
{
NULL
}
};
...
...
@@ -141,6 +144,12 @@ static int filter_slice8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs
const
int
*
linesize
=
(
const
int
*
)
s
->
linesize
[
p
];
const
uint8_t
*
srcf
[
SIZE
];
if
(
!
((
1
<<
p
)
&
s
->
planes
))
{
av_image_copy_plane
(
dst
,
out
->
linesize
[
p
],
src
,
in
->
linesize
[
p
],
w
,
slice_end
-
slice_start
);
continue
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
srcf
[
i
]
=
data
[
i
]
+
slice_start
*
linesize
[
i
];
...
...
@@ -212,6 +221,12 @@ static int filter_slice16(AVFilterContext *ctx, void *arg, int jobnr, int nb_job
const
int
*
linesize
=
(
const
int
*
)
s
->
linesize
[
p
];
const
uint16_t
*
srcf
[
SIZE
];
if
(
!
((
1
<<
p
)
&
s
->
planes
))
{
av_image_copy_plane
((
uint8_t
*
)
dst
,
out
->
linesize
[
p
],
(
uint8_t
*
)
src
,
in
->
linesize
[
p
],
w
*
2
,
slice_end
-
slice_start
);
continue
;
}
for
(
i
=
0
;
i
<
s
->
size
;
i
++
)
srcf
[
i
]
=
(
const
uint16_t
*
)(
data
[
i
]
+
slice_start
*
linesize
[
i
]);
...
...
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