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
ade3ec84
Commit
ade3ec84
authored
Oct 10, 2011
by
Clément Bœsch
Committed by
Clément Bœsch
Oct 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swresample: fix another broken indent chunk.
Also use a consistent style inside that block.
parent
b2f88ce2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
resample2.c
libswresample/resample2.c
+18
-19
No files found.
libswresample/resample2.c
View file @
ade3ec84
...
...
@@ -203,19 +203,18 @@ AVResampleContext *swr_resample_init(AVResampleContext *c, int out_rate, int in_
double
factor
=
FFMIN
(
out_rate
*
cutoff
/
in_rate
,
1
.
0
);
int
phase_count
=
1
<<
phase_shift
;
if
(
!
c
||
c
->
phase_shift
!=
phase_shift
||
c
->
linear
!=
linear
||
c
->
factor
!=
factor
||
c
->
filter_length
!=
FFMAX
((
int
)
ceil
(
filter_size
/
factor
),
1
))
{
c
=
av_mallocz
(
sizeof
(
AVResampleContext
));
if
(
!
c
||
c
->
phase_shift
!=
phase_shift
||
c
->
linear
!=
linear
||
c
->
factor
!=
factor
||
c
->
filter_length
!=
FFMAX
((
int
)
ceil
(
filter_size
/
factor
),
1
))
{
c
=
av_mallocz
(
sizeof
(
AVResampleContext
));
if
(
!
c
)
return
NULL
;
c
->
phase_shift
=
phase_shift
;
c
->
phase_mask
=
phase_count
-
1
;
c
->
linear
=
linear
;
c
->
factor
=
factor
;
c
->
filter_length
=
FFMAX
((
int
)
ceil
(
filter_size
/
factor
),
1
);
c
->
filter_bank
=
av_mallocz
(
c
->
filter_length
*
(
phase_count
+
1
)
*
sizeof
(
FELEM
));
c
->
phase_shift
=
phase_shift
;
c
->
phase_mask
=
phase_count
-
1
;
c
->
linear
=
linear
;
c
->
factor
=
factor
;
c
->
filter_length
=
FFMAX
((
int
)
ceil
(
filter_size
/
factor
),
1
);
c
->
filter_bank
=
av_mallocz
(
c
->
filter_length
*
(
phase_count
+
1
)
*
sizeof
(
FELEM
));
if
(
!
c
->
filter_bank
)
goto
error
;
if
(
build_filter
(
c
->
filter_bank
,
factor
,
c
->
filter_length
,
phase_count
,
1
<<
FILTER_SHIFT
,
WINDOW_TYPE
))
...
...
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