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
67771ac4
Commit
67771ac4
authored
Dec 28, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: add rscroll sliding mode
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
b9c46b52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
filters.texi
doc/filters.texi
+2
-0
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+12
-2
No files found.
doc/filters.texi
View file @
67771ac4
...
...
@@ -14585,6 +14585,8 @@ It accepts the following values:
the samples start again on the left when they reach the right
@item scroll
the samples scroll from right to left
@item rscroll
the samples scroll from left to right
@item fullframe
frames are only produced when the samples reach the right
@end table
...
...
libavfilter/avf_showspectrum.c
View file @
67771ac4
...
...
@@ -38,7 +38,7 @@ enum DisplayMode { COMBINED, SEPARATE, NB_MODES };
enum
DisplayScale
{
LINEAR
,
SQRT
,
CBRT
,
LOG
,
NB_SCALES
};
enum
ColorMode
{
CHANNEL
,
INTENSITY
,
NB_CLMODES
};
enum
WindowFunc
{
WFUNC_NONE
,
WFUNC_HANN
,
WFUNC_HAMMING
,
WFUNC_BLACKMAN
,
NB_WFUNC
};
enum
SlideMode
{
REPLACE
,
SCROLL
,
FULLFRAME
,
NB_SLIDES
};
enum
SlideMode
{
REPLACE
,
SCROLL
,
FULLFRAME
,
RSCROLL
,
NB_SLIDES
};
typedef
struct
{
const
AVClass
*
class
;
...
...
@@ -66,9 +66,10 @@ typedef struct {
static
const
AVOption
showspectrum_options
[]
=
{
{
"size"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"640x512"
},
0
,
0
,
FLAGS
},
{
"s"
,
"set video size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"640x512"
},
0
,
0
,
FLAGS
},
{
"slide"
,
"set sliding mode"
,
OFFSET
(
sliding
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
NB_SLIDES
,
FLAGS
,
"slide"
},
{
"slide"
,
"set sliding mode"
,
OFFSET
(
sliding
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
NB_SLIDES
-
1
,
FLAGS
,
"slide"
},
{
"replace"
,
"replace old columns with new"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
REPLACE
},
0
,
0
,
FLAGS
,
"slide"
},
{
"scroll"
,
"scroll from right to left"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
SCROLL
},
0
,
0
,
FLAGS
,
"slide"
},
{
"rscroll"
,
"scroll from left to right"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
RSCROLL
},
0
,
0
,
FLAGS
,
"slide"
},
{
"fullframe"
,
"return full frames"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
FULLFRAME
},
0
,
0
,
FLAGS
,
"slide"
},
{
"mode"
,
"set channel display mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
COMBINED
},
COMBINED
,
NB_MODES
-
1
,
FLAGS
,
"mode"
},
{
"combined"
,
"combined mode"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
COMBINED
},
0
,
0
,
FLAGS
,
"mode"
},
...
...
@@ -442,6 +443,15 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
}
}
s
->
xpos
=
outlink
->
w
-
1
;
}
else
if
(
s
->
sliding
==
RSCROLL
)
{
for
(
plane
=
0
;
plane
<
3
;
plane
++
)
{
for
(
y
=
0
;
y
<
outlink
->
h
;
y
++
)
{
uint8_t
*
p
=
outpicref
->
data
[
plane
]
+
y
*
outpicref
->
linesize
[
plane
];
memmove
(
p
+
1
,
p
,
outlink
->
w
-
1
);
}
}
s
->
xpos
=
0
;
}
for
(
plane
=
0
;
plane
<
3
;
plane
++
)
{
uint8_t
*
p
=
outpicref
->
data
[
plane
]
+
...
...
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