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
29cddc99
Commit
29cddc99
authored
Jun 15, 2018
by
Pavel Koshevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/atempo: raise max tempo limit (v2)
parent
78298bce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
filters.texi
doc/filters.texi
+14
-3
af_atempo.c
libavfilter/af_atempo.c
+3
-3
No files found.
doc/filters.texi
View file @
29cddc99
...
@@ -1986,7 +1986,12 @@ Adjust audio tempo.
...
@@ -1986,7 +1986,12 @@ Adjust audio tempo.
The filter accepts exactly one parameter, the audio tempo. If not
The filter accepts exactly one parameter, the audio tempo. If not
specified then the filter will assume nominal 1.0 tempo. Tempo must
specified then the filter will assume nominal 1.0 tempo. Tempo must
be in the [0.5, 2.0] range.
be in the [0.5, 100.0] range.
Note that tempo greater than 2 will skip some samples rather than
blend them in. If for any reason this is a concern it is always
possible to daisy-chain several instances of atempo to achieve the
desired product tempo.
@subsection Examples
@subsection Examples
...
@@ -1998,9 +2003,15 @@ atempo=0.8
...
@@ -1998,9 +2003,15 @@ atempo=0.8
@end example
@end example
@item
@item
To speed up audio to 125% tempo:
To speed up audio to 300% tempo:
@example
atempo=3
@end example
@item
To speed up audio to 300% tempo by daisy-chaining two atempo instances:
@example
@example
atempo=
1.25
atempo=
sqrt(3),atempo=sqrt(3)
@end example
@end example
@end itemize
@end itemize
...
...
libavfilter/af_atempo.c
View file @
29cddc99
...
@@ -153,7 +153,7 @@ typedef struct ATempoContext {
...
@@ -153,7 +153,7 @@ typedef struct ATempoContext {
static
const
AVOption
atempo_options
[]
=
{
static
const
AVOption
atempo_options
[]
=
{
{
"tempo"
,
"set tempo scale factor"
,
{
"tempo"
,
"set tempo scale factor"
,
OFFSET
(
tempo
),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
1
.
0
},
0
.
5
,
2
.
0
,
OFFSET
(
tempo
),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
1
.
0
},
0
.
5
,
100
.
0
,
AV_OPT_FLAG_AUDIO_PARAM
|
AV_OPT_FLAG_FILTERING_PARAM
},
AV_OPT_FLAG_AUDIO_PARAM
|
AV_OPT_FLAG_FILTERING_PARAM
},
{
NULL
}
{
NULL
}
};
};
...
@@ -439,8 +439,8 @@ static int yae_load_data(ATempoContext *atempo,
...
@@ -439,8 +439,8 @@ static int yae_load_data(ATempoContext *atempo,
return
0
;
return
0
;
}
}
// samples are not expected to be skipped:
// samples are not expected to be skipped
, unless tempo is greater than 2
:
av_assert0
(
read_size
<=
atempo
->
ring
);
av_assert0
(
read_size
<=
atempo
->
ring
||
atempo
->
tempo
>
2
.
0
);
while
(
atempo
->
position
[
0
]
<
stop_here
&&
src
<
src_end
)
{
while
(
atempo
->
position
[
0
]
<
stop_here
&&
src
<
src_end
)
{
int
src_samples
=
(
src_end
-
src
)
/
atempo
->
stride
;
int
src_samples
=
(
src_end
-
src
)
/
atempo
->
stride
;
...
...
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