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
55886c67
Commit
55886c67
authored
Sep 04, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_waveform: change intensity to float
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
fda05554
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
filters.texi
doc/filters.texi
+1
-1
vf_waveform.c
libavfilter/vf_waveform.c
+4
-2
No files found.
doc/filters.texi
View file @
55886c67
...
...
@@ -11059,7 +11059,7 @@ color component value = 0 and bottom side represents value = 255.
@item intensity, i
Set intensity. Smaller values are useful to find out how many values of the same
luminance are distributed across input rows/columns.
Default value is @code{
10}. Allowed range is [1, 255
].
Default value is @code{
0.04}. Allowed range is [0, 1
].
@item mirror, r
Set mirroring mode. @code{0} means unmirrored, @code{1} means mirrored.
...
...
libavfilter/vf_waveform.c
View file @
55886c67
...
...
@@ -44,6 +44,7 @@ typedef struct WaveformContext {
int
ncomp
;
int
pcomp
;
const
uint8_t
*
bg_color
;
float
fintensity
;
int
intensity
;
int
mirror
;
int
display
;
...
...
@@ -69,8 +70,8 @@ static const AVOption waveform_options[] = {
{
"m"
,
"set mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
FLAGS
,
"mode"
},
{
"row"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"mode"
},
{
"column"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
FLAGS
,
"mode"
},
{
"intensity"
,
"set intensity"
,
OFFSET
(
intensity
),
AV_OPT_TYPE_INT
,
{.
i64
=
10
},
1
,
1023
,
FLAGS
},
{
"i"
,
"set intensity"
,
OFFSET
(
intensity
),
AV_OPT_TYPE_INT
,
{.
i64
=
10
},
1
,
1023
,
FLAGS
},
{
"intensity"
,
"set intensity"
,
OFFSET
(
fintensity
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
04
},
0
,
1
,
FLAGS
},
{
"i"
,
"set intensity"
,
OFFSET
(
fintensity
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
04
},
0
,
1
,
FLAGS
},
{
"mirror"
,
"set mirroring"
,
OFFSET
(
mirror
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
FLAGS
},
{
"r"
,
"set mirroring"
,
OFFSET
(
mirror
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
FLAGS
},
{
"display"
,
"set display mode"
,
OFFSET
(
display
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
FLAGS
,
"display"
},
...
...
@@ -1171,6 +1172,7 @@ static int config_input(AVFilterLink *inlink)
s
->
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
);
s
->
ncomp
=
s
->
desc
->
nb_components
;
s
->
bits
=
s
->
desc
->
comp
[
0
].
depth_minus1
+
1
;
s
->
intensity
=
s
->
fintensity
*
((
1
<<
s
->
bits
)
-
1
);
switch
(
s
->
filter
)
{
case
LOWPASS
:
...
...
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