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
3c84f6b5
Commit
3c84f6b5
authored
Mar 03, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resample: reindent
parent
f20892eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
resample_template.c
libavresample/resample_template.c
+20
-21
No files found.
libavresample/resample_template.c
View file @
3c84f6b5
...
...
@@ -67,30 +67,29 @@ static void SET_TYPE(resample_one)(ResampleContext *c,
{
FELEM
*
dst
=
dst0
;
const
FELEM
*
src
=
src0
;
int
i
;
int
sample_index
=
index
>>
c
->
phase_shift
;
FELEM2
val
=
0
;
FELEM
*
filter
=
((
FELEM
*
)
c
->
filter_bank
)
+
c
->
filter_length
*
(
index
&
c
->
phase_mask
);
int
i
;
int
sample_index
=
index
>>
c
->
phase_shift
;
FELEM2
val
=
0
;
FELEM
*
filter
=
((
FELEM
*
)
c
->
filter_bank
)
+
c
->
filter_length
*
(
index
&
c
->
phase_mask
);
if
(
sample_index
<
0
)
{
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
val
+=
src
[
FFABS
(
sample_index
+
i
)
%
src_size
]
*
(
FELEM2
)
filter
[
i
];
}
else
if
(
c
->
linear
)
{
FELEM2
v2
=
0
;
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
{
val
+=
src
[
abs
(
sample_index
+
i
)]
*
(
FELEM2
)
filter
[
i
];
v2
+=
src
[
abs
(
sample_index
+
i
)]
*
(
FELEM2
)
filter
[
i
+
c
->
filter_length
];
}
val
+=
(
v2
-
val
)
*
(
FELEML
)
frac
/
c
->
src_incr
;
}
else
{
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
val
+=
src
[
sample_index
+
i
]
*
(
FELEM2
)
filter
[
i
];
if
(
sample_index
<
0
)
{
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
val
+=
src
[
FFABS
(
sample_index
+
i
)
%
src_size
]
*
(
FELEM2
)
filter
[
i
];
}
else
if
(
c
->
linear
)
{
FELEM2
v2
=
0
;
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
{
val
+=
src
[
abs
(
sample_index
+
i
)]
*
(
FELEM2
)
filter
[
i
];
v2
+=
src
[
abs
(
sample_index
+
i
)]
*
(
FELEM2
)
filter
[
i
+
c
->
filter_length
];
}
val
+=
(
v2
-
val
)
*
(
FELEML
)
frac
/
c
->
src_incr
;
}
else
{
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
)
val
+=
src
[
sample_index
+
i
]
*
(
FELEM2
)
filter
[
i
];
}
OUT
(
dst
[
dst_index
],
val
);
OUT
(
dst
[
dst_index
],
val
);
}
static
void
SET_TYPE
(
set_filter
)(
void
*
filter0
,
double
*
tab
,
int
phase
,
...
...
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