Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
351e625d
Commit
351e625d
authored
Nov 11, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swresample/resample: increase precision for compensation
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
6770a9d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
resample.c
libswresample/resample.c
+4
-0
libswresample.mak
tests/fate/libswresample.mak
+4
-4
No files found.
libswresample/resample.c
View file @
351e625d
...
...
@@ -355,6 +355,10 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r
c
->
compensation_distance
=
0
;
if
(
!
av_reduce
(
&
c
->
src_incr
,
&
c
->
dst_incr
,
out_rate
,
in_rate
*
(
int64_t
)
phase_count
,
INT32_MAX
/
2
))
goto
error
;
while
(
c
->
dst_incr
<
(
1
<<
20
)
&&
c
->
src_incr
<
(
1
<<
20
))
{
c
->
dst_incr
*=
2
;
c
->
src_incr
*=
2
;
}
c
->
ideal_dst_incr
=
c
->
dst_incr
;
c
->
dst_incr_div
=
c
->
dst_incr
/
c
->
src_incr
;
c
->
dst_incr_mod
=
c
->
dst_incr
%
c
->
src_incr
;
...
...
tests/fate/libswresample.mak
View file @
351e625d
...
...
@@ -366,16 +366,16 @@ fate-swr-resample_async-$(3)-$(1)-$(2): FUZZ = 0.1
fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
endef
fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 40
31.48
fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 40
20.62
fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20310
fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 1118
5.34
fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 1118
6.69
fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20344
fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 40
31.59
fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 40
20.73
fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 1118
5.65
fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 1118
7.01
fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
$(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
...
...
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