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
f25ba8b3
Commit
f25ba8b3
authored
Oct 20, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization
Originally committed as revision 3616 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
51a88020
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
resample2.c
libavcodec/resample2.c
+4
-4
No files found.
libavcodec/resample2.c
View file @
f25ba8b3
...
...
@@ -42,7 +42,7 @@
#define FELEM_MAX INT16_MAX
#define FELEM_MIN INT16_MIN
#else
#define FILTER_SHIFT 2
4
#define FILTER_SHIFT 2
2
#define FELEM int32_t
#define FELEM2 int64_t
...
...
@@ -193,12 +193,12 @@ int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int
}
else
{
#ifdef LINEAR
int64_t
v
=
0
;
int
sub_phase
=
(
frac
<<
12
)
/
c
->
src_incr
;
int
sub_phase
=
(
frac
<<
8
)
/
c
->
src_incr
;
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
){
int64_t
coeff
=
filter
[
i
]
*
(
FELEM2
)(
4096
-
sub_phase
)
+
filter
[
i
+
c
->
filter_length
]
*
(
FELEM2
)
sub_phase
;
int64_t
coeff
=
filter
[
i
]
*
(
256
-
sub_phase
)
+
filter
[
i
+
c
->
filter_length
]
*
sub_phase
;
v
+=
src
[
sample_index
+
i
]
*
coeff
;
}
val
=
v
>>
12
;
val
=
v
>>
8
;
#else
for
(
i
=
0
;
i
<
c
->
filter_length
;
i
++
){
val
+=
src
[
sample_index
+
i
]
*
(
FELEM2
)
filter
[
i
];
...
...
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