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
6e225de2
Commit
6e225de2
authored
Oct 21, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user selectble cutoff frequency
Originally committed as revision 3619 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4e255822
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
avcodec.h
libavcodec/avcodec.h
+2
-2
resample.c
libavcodec/resample.c
+1
-1
resample2.c
libavcodec/resample2.c
+2
-2
No files found.
libavcodec/avcodec.h
View file @
6e225de2
...
...
@@ -17,7 +17,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000409
#define FFMPEG_VERSION "0.4.9-pre1"
#define LIBAVCODEC_BUILD 472
6
#define LIBAVCODEC_BUILD 472
7
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
...
...
@@ -1942,7 +1942,7 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels,
int
audio_resample
(
ReSampleContext
*
s
,
short
*
output
,
short
*
input
,
int
nb_samples
);
void
audio_resample_close
(
ReSampleContext
*
s
);
struct
AVResampleContext
*
av_resample_init
(
int
out_rate
,
int
in_rate
,
int
filter_length
,
int
log2_phase_count
,
int
linear
);
struct
AVResampleContext
*
av_resample_init
(
int
out_rate
,
int
in_rate
,
int
filter_length
,
int
log2_phase_count
,
int
linear
,
double
cutoff
);
int
av_resample
(
struct
AVResampleContext
*
c
,
short
*
dst
,
short
*
src
,
int
*
consumed
,
int
src_size
,
int
dst_size
,
int
update_ctx
);
void
av_resample_compensate
(
struct
AVResampleContext
*
c
,
int
sample_delta
,
int
compensation_distance
);
void
av_resample_close
(
struct
AVResampleContext
*
c
);
...
...
libavcodec/resample.c
View file @
6e225de2
...
...
@@ -160,7 +160,7 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels,
if
(
s
->
filter_channels
>
2
)
s
->
filter_channels
=
2
;
s
->
resample_context
=
av_resample_init
(
output_rate
,
input_rate
,
16
,
10
,
0
);
s
->
resample_context
=
av_resample_init
(
output_rate
,
input_rate
,
16
,
10
,
0
,
1
.
0
);
return
s
;
}
...
...
libavcodec/resample2.c
View file @
6e225de2
...
...
@@ -130,9 +130,9 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun
* initalizes a audio resampler.
* note, if either rate is not a integer then simply scale both rates up so they are
*/
AVResampleContext
*
av_resample_init
(
int
out_rate
,
int
in_rate
,
int
filter_size
,
int
phase_shift
,
int
linear
){
AVResampleContext
*
av_resample_init
(
int
out_rate
,
int
in_rate
,
int
filter_size
,
int
phase_shift
,
int
linear
,
double
cutoff
){
AVResampleContext
*
c
=
av_mallocz
(
sizeof
(
AVResampleContext
));
double
factor
=
FFMIN
(
out_rate
/
(
double
)
in_rate
,
1
.
0
);
double
factor
=
FFMIN
(
out_rate
*
cutoff
/
in_rate
,
1
.
0
);
int
phase_count
=
1
<<
phase_shift
;
memset
(
c
,
0
,
sizeof
(
AVResampleContext
));
...
...
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