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
95183d25
Commit
95183d25
authored
Jan 21, 2021
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_atadenoise: add sigma options
parent
ee1d1c4b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
162 additions
and
23 deletions
+162
-23
filters.texi
doc/filters.texi
+9
-0
atadenoise.h
libavfilter/atadenoise.h
+5
-5
vf_atadenoise.c
libavfilter/vf_atadenoise.c
+138
-10
vf_atadenoise_init.c
libavfilter/x86/vf_atadenoise_init.c
+10
-8
No files found.
doc/filters.texi
View file @
95183d25
...
@@ -7096,6 +7096,15 @@ Alternatively can be set to @code{s} serial.
...
@@ -7096,6 +7096,15 @@ Alternatively can be set to @code{s} serial.
Parallel can be faster then serial, while other way around is never true.
Parallel can be faster then serial, while other way around is never true.
Parallel will abort early on first change being greater then thresholds, while serial
Parallel will abort early on first change being greater then thresholds, while serial
will continue processing other side of frames if they are equal or below thresholds.
will continue processing other side of frames if they are equal or below thresholds.
@item 0s
@item 1s
@item 2s
Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
Valid range is from 0 to 32767.
This options controls weight for each pixel in radius defined by size.
Default value means every pixel have same weight.
Setting this option to 0 effectively disables filtering.
@end table
@end table
@subsection Commands
@subsection Commands
...
...
libavfilter/atadenoise.h
View file @
95183d25
...
@@ -31,12 +31,12 @@ enum ATAAlgorithm {
...
@@ -31,12 +31,12 @@ enum ATAAlgorithm {
};
};
typedef
struct
ATADenoiseDSPContext
{
typedef
struct
ATADenoiseDSPContext
{
void
(
*
filter_row
)(
const
uint8_t
*
src
,
uint8_t
*
dst
,
void
(
*
filter_row
[
4
]
)(
const
uint8_t
*
src
,
uint8_t
*
dst
,
const
uint8_t
**
srcf
,
const
uint8_t
**
srcf
,
int
w
,
int
mid
,
int
size
,
int
w
,
int
mid
,
int
size
,
int
thra
,
int
thrb
);
int
thra
,
int
thrb
,
const
float
*
weight
);
}
ATADenoiseDSPContext
;
}
ATADenoiseDSPContext
;
void
ff_atadenoise_init_x86
(
ATADenoiseDSPContext
*
dsp
,
int
depth
,
int
algorithm
);
void
ff_atadenoise_init_x86
(
ATADenoiseDSPContext
*
dsp
,
int
depth
,
int
algorithm
,
const
float
*
sigma
);
#endif
/* AVFILTER_ATADENOISE_H */
#endif
/* AVFILTER_ATADENOISE_H */
libavfilter/vf_atadenoise.c
View file @
95183d25
This diff is collapsed.
Click to expand it.
libavfilter/x86/vf_atadenoise_init.c
View file @
95183d25
...
@@ -28,22 +28,24 @@
...
@@ -28,22 +28,24 @@
void
ff_atadenoise_filter_row8_sse4
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
void
ff_atadenoise_filter_row8_sse4
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
const
uint8_t
**
srcf
,
const
uint8_t
**
srcf
,
int
w
,
int
mid
,
int
size
,
int
w
,
int
mid
,
int
size
,
int
thra
,
int
thrb
);
int
thra
,
int
thrb
,
const
float
*
weights
);
void
ff_atadenoise_filter_row8_serial_sse4
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
void
ff_atadenoise_filter_row8_serial_sse4
(
const
uint8_t
*
src
,
uint8_t
*
dst
,
const
uint8_t
**
srcf
,
const
uint8_t
**
srcf
,
int
w
,
int
mid
,
int
size
,
int
w
,
int
mid
,
int
size
,
int
thra
,
int
thrb
);
int
thra
,
int
thrb
,
const
float
*
weights
);
av_cold
void
ff_atadenoise_init_x86
(
ATADenoiseDSPContext
*
dsp
,
int
depth
,
int
algorithm
)
av_cold
void
ff_atadenoise_init_x86
(
ATADenoiseDSPContext
*
dsp
,
int
depth
,
int
algorithm
,
const
float
*
sigma
)
{
{
int
cpu_flags
=
av_get_cpu_flags
();
int
cpu_flags
=
av_get_cpu_flags
();
if
(
ARCH_X86_64
&&
EXTERNAL_SSE4
(
cpu_flags
)
&&
depth
<=
8
&&
algorithm
==
PARALLEL
)
{
for
(
int
p
=
0
;
p
<
4
;
p
++
)
{
dsp
->
filter_row
=
ff_atadenoise_filter_row8_sse4
;
if
(
ARCH_X86_64
&&
EXTERNAL_SSE4
(
cpu_flags
)
&&
depth
<=
8
&&
algorithm
==
PARALLEL
&&
sigma
[
p
]
==
INT16_MAX
)
{
}
dsp
->
filter_row
[
p
]
=
ff_atadenoise_filter_row8_sse4
;
}
if
(
ARCH_X86_64
&&
EXTERNAL_SSE4
(
cpu_flags
)
&&
depth
<=
8
&&
algorithm
==
SERIAL
)
{
if
(
ARCH_X86_64
&&
EXTERNAL_SSE4
(
cpu_flags
)
&&
depth
<=
8
&&
algorithm
==
SERIAL
&&
sigma
[
p
]
==
INT16_MAX
)
{
dsp
->
filter_row
=
ff_atadenoise_filter_row8_serial_sse4
;
dsp
->
filter_row
[
p
]
=
ff_atadenoise_filter_row8_serial_sse4
;
}
}
}
}
}
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