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
0c3481b4
Commit
0c3481b4
authored
Dec 23, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_sofalizer: pick IR length after loading sofa
Instead of picking it in preloading stage.
parent
b13fe647
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
af_sofalizer.c
libavfilter/af_sofalizer.c
+5
-3
No files found.
libavfilter/af_sofalizer.c
View file @
0c3481b4
...
...
@@ -113,7 +113,6 @@ static int close_sofa(struct MySofa *sofa)
static
int
preload_sofa
(
AVFilterContext
*
ctx
,
char
*
filename
,
int
*
samplingrate
)
{
struct
SOFAlizerContext
*
s
=
ctx
->
priv
;
struct
MYSOFA_HRTF
*
mysofa
;
char
*
license
;
int
ret
;
...
...
@@ -126,9 +125,8 @@ static int preload_sofa(AVFilterContext *ctx, char *filename, int *samplingrate)
if
(
mysofa
->
DataSamplingRate
.
elements
!=
1
)
return
AVERROR
(
EINVAL
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"Original IR length: %d.
\n
"
,
mysofa
->
N
);
*
samplingrate
=
mysofa
->
DataSamplingRate
.
values
[
0
];
s
->
sofa
.
ir_samples
=
mysofa
->
N
;
s
->
sofa
.
n_samples
=
1
<<
(
32
-
ff_clz
(
s
->
sofa
.
ir_samples
));
license
=
mysofa_getAttribute
(
mysofa
->
attributes
,
(
char
*
)
"License"
);
if
(
license
)
av_log
(
ctx
,
AV_LOG_INFO
,
"SOFA license: %s
\n
"
,
license
);
...
...
@@ -591,6 +589,10 @@ static int load_data(AVFilterContext *ctx, int azim, int elev, float radius, int
return
AVERROR_INVALIDDATA
;
}
av_log
(
ctx
,
AV_LOG_DEBUG
,
"IR length: %d.
\n
"
,
s
->
sofa
.
easy
->
hrtf
->
N
);
s
->
sofa
.
ir_samples
=
s
->
sofa
.
easy
->
hrtf
->
N
;
s
->
sofa
.
n_samples
=
1
<<
(
32
-
ff_clz
(
s
->
sofa
.
ir_samples
));
n_samples
=
s
->
sofa
.
n_samples
;
ir_samples
=
s
->
sofa
.
ir_samples
;
...
...
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