[FFmpeg-cvslog] swresample/swresample: do not reset tsf on swr_alloc_set_opts

Muhammad Faiz git at videolan.org
Sun Mar 12 22:07:37 EET 2017


ffmpeg | branch: master | Muhammad Faiz <mfcc64 at gmail.com> | Sun Mar 12 00:24:21 2017 +0700| [6c7a0876fefdd3c919afcabf493492cb4946ca6a] | committer: Muhammad Faiz

swresample/swresample: do not reset tsf on swr_alloc_set_opts

so tsf option in aresample will have effect
previously tsf/internal_sample_format had no effect

fate is updated
s32p previously used fltp internally
dblp previously used fltp/dblp internally

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c7a0876fefdd3c919afcabf493492cb4946ca6a
---

 libswresample/swresample.c   |  3 --
 tests/fate/libswresample.mak | 80 ++++++++++++++++++++++----------------------
 2 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index dea6139..f2e6600 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -84,9 +84,6 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
     if (av_opt_set_int(s, "isr", in_sample_rate,  0) < 0)
         goto fail;
 
-    if (av_opt_set_int(s, "tsf", AV_SAMPLE_FMT_NONE,   0) < 0)
-        goto fail;
-
     if (av_opt_set_int(s, "ich", av_get_channel_layout_nb_channels(s-> user_in_ch_layout), 0) < 0)
         goto fail;
 
diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak
index 78dbde7..d9e0fa9 100644
--- a/tests/fate/libswresample.mak
+++ b/tests/fate/libswresample.mak
@@ -218,28 +218,28 @@ fate-swr-resample-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
 fate-swr-resample-s32p-2626-96000: CMP_TARGET = 1393.00
 fate-swr-resample-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
 
-fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.82
+fate-swr-resample-s32p-44100-2626: CMP_TARGET = 185.81
 fate-swr-resample-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
 
-fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.69
+fate-swr-resample-s32p-44100-48000: CMP_TARGET = 9.70
 fate-swr-resample-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
 
 fate-swr-resample-s32p-44100-8000: CMP_TARGET = 75.45
 fate-swr-resample-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
 
-fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.46
+fate-swr-resample-s32p-44100-96000: CMP_TARGET = 11.47
 fate-swr-resample-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
 
-fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.51
+fate-swr-resample-s32p-48000-2626: CMP_TARGET = 456.49
 fate-swr-resample-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
 
-fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.00
+fate-swr-resample-s32p-48000-44100: CMP_TARGET = 1.12
 fate-swr-resample-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
 
-fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.38
+fate-swr-resample-s32p-48000-8000: CMP_TARGET = 62.37
 fate-swr-resample-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
 
-fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.47
+fate-swr-resample-s32p-48000-96000: CMP_TARGET = 0.85
 fate-swr-resample-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
 
 fate-swr-resample-s32p-8000-2626: CMP_TARGET = 2503.33
@@ -248,22 +248,22 @@ fate-swr-resample-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
 fate-swr-resample-s32p-8000-44100: CMP_TARGET = 15.09
 fate-swr-resample-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.69
+fate-swr-resample-s32p-8000-48000: CMP_TARGET = 14.68
 fate-swr-resample-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
 
 fate-swr-resample-s32p-8000-96000: CMP_TARGET = 13.81
 fate-swr-resample-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.07
+fate-swr-resample-s32p-96000-2626: CMP_TARGET = 675.05
 fate-swr-resample-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
 
-fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.44
+fate-swr-resample-s32p-96000-44100: CMP_TARGET = 1.54
 fate-swr-resample-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
 
-fate-swr-resample-s32p-96000-48000: CMP_TARGET = 0.99
+fate-swr-resample-s32p-96000-48000: CMP_TARGET = 1.21
 fate-swr-resample-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
 
-fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.57
+fate-swr-resample-s32p-96000-8000: CMP_TARGET = 58.59
 fate-swr-resample-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
 
 
@@ -440,7 +440,7 @@ fate-swr-resample_exact-dblp-8000-96000: SIZE_TOLERANCE = 96000 - 20480
 fate-swr-resample_exact-dblp-96000-2626: CMP_TARGET = 675.07
 fate-swr-resample_exact-dblp-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
 
-fate-swr-resample_exact-dblp-96000-44100: CMP_TARGET = 1.23
+fate-swr-resample_exact-dblp-96000-44100: CMP_TARGET = 1.24
 fate-swr-resample_exact-dblp-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
 
 fate-swr-resample_exact-dblp-96000-48000: CMP_TARGET = 0.99
@@ -581,52 +581,52 @@ fate-swr-resample_exact-s32p-2626-8000: SIZE_TOLERANCE = 31512 - 20482
 fate-swr-resample_exact-s32p-2626-96000: CMP_TARGET = 1393.00
 fate-swr-resample_exact-s32p-2626-96000: SIZE_TOLERANCE = 31512 - 20480
 
-fate-swr-resample_exact-s32p-44100-2626: CMP_TARGET = 185.82
+fate-swr-resample_exact-s32p-44100-2626: CMP_TARGET = 185.81
 fate-swr-resample_exact-s32p-44100-2626: SIZE_TOLERANCE = 529200 - 20490
 
-fate-swr-resample_exact-s32p-44100-48000: CMP_TARGET = 9.64
+fate-swr-resample_exact-s32p-44100-48000: CMP_TARGET = 9.66
 fate-swr-resample_exact-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
 
-fate-swr-resample_exact-s32p-44100-8000: CMP_TARGET = 75.38
+fate-swr-resample_exact-s32p-44100-8000: CMP_TARGET = 75.37
 fate-swr-resample_exact-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
 
-fate-swr-resample_exact-s32p-44100-96000: CMP_TARGET = 11.45
+fate-swr-resample_exact-s32p-44100-96000: CMP_TARGET = 11.46
 fate-swr-resample_exact-s32p-44100-96000: SIZE_TOLERANCE = 529200 - 20482
 
-fate-swr-resample_exact-s32p-48000-2626: CMP_TARGET = 456.51
+fate-swr-resample_exact-s32p-48000-2626: CMP_TARGET = 456.49
 fate-swr-resample_exact-s32p-48000-2626: SIZE_TOLERANCE = 576000 - 20510
 
-fate-swr-resample_exact-s32p-48000-44100: CMP_TARGET = 0.23
+fate-swr-resample_exact-s32p-48000-44100: CMP_TARGET = 0.74
 fate-swr-resample_exact-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
 
-fate-swr-resample_exact-s32p-48000-8000: CMP_TARGET = 62.36
+fate-swr-resample_exact-s32p-48000-8000: CMP_TARGET = 62.35
 fate-swr-resample_exact-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
 
-fate-swr-resample_exact-s32p-48000-96000: CMP_TARGET = 0.47
+fate-swr-resample_exact-s32p-48000-96000: CMP_TARGET = 0.85
 fate-swr-resample_exact-s32p-48000-96000: SIZE_TOLERANCE = 576000 - 20480
 
 fate-swr-resample_exact-s32p-8000-2626: CMP_TARGET = 2503.33
 fate-swr-resample_exact-s32p-8000-2626: SIZE_TOLERANCE = 96000 - 20486
 
-fate-swr-resample_exact-s32p-8000-44100: CMP_TARGET = 14.59
+fate-swr-resample_exact-s32p-8000-44100: CMP_TARGET = 14.61
 fate-swr-resample_exact-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample_exact-s32p-8000-48000: CMP_TARGET = 14.50
+fate-swr-resample_exact-s32p-8000-48000: CMP_TARGET = 14.52
 fate-swr-resample_exact-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
 
 fate-swr-resample_exact-s32p-8000-96000: CMP_TARGET = 13.62
 fate-swr-resample_exact-s32p-8000-96000: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample_exact-s32p-96000-2626: CMP_TARGET = 675.07
+fate-swr-resample_exact-s32p-96000-2626: CMP_TARGET = 675.05
 fate-swr-resample_exact-s32p-96000-2626: SIZE_TOLERANCE = 1152000 - 20474
 
-fate-swr-resample_exact-s32p-96000-44100: CMP_TARGET = 1.23
+fate-swr-resample_exact-s32p-96000-44100: CMP_TARGET = 1.41
 fate-swr-resample_exact-s32p-96000-44100: SIZE_TOLERANCE = 1152000 - 20480
 
-fate-swr-resample_exact-s32p-96000-48000: CMP_TARGET = 0.99
+fate-swr-resample_exact-s32p-96000-48000: CMP_TARGET = 1.21
 fate-swr-resample_exact-s32p-96000-48000: SIZE_TOLERANCE = 1152000 - 20480
 
-fate-swr-resample_exact-s32p-96000-8000: CMP_TARGET = 58.52
+fate-swr-resample_exact-s32p-96000-8000: CMP_TARGET = 58.54
 fate-swr-resample_exact-s32p-96000-8000: SIZE_TOLERANCE = 1152000 - 20496
 
 define ARESAMPLE_EXACT_ASYNC
@@ -700,7 +700,7 @@ fate-swr-resample_exact_async-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20300
 fate-swr-resample_exact_async-s32p-44100-8000: CMP_TARGET = 4022.87
 fate-swr-resample_exact_async-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
 
-fate-swr-resample_exact_async-s32p-48000-44100: CMP_TARGET = 1923.97
+fate-swr-resample_exact_async-s32p-48000-44100: CMP_TARGET = 1923.96
 fate-swr-resample_exact_async-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20298
 
 fate-swr-resample_exact_async-s32p-48000-8000: CMP_TARGET = 2592.00
@@ -709,7 +709,7 @@ fate-swr-resample_exact_async-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20304
 fate-swr-resample_exact_async-s32p-8000-44100: CMP_TARGET = 11187.24
 fate-swr-resample_exact_async-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
 
-fate-swr-resample_exact_async-s32p-8000-48000: CMP_TARGET = 11326.80
+fate-swr-resample_exact_async-s32p-8000-48000: CMP_TARGET = 11326.79
 fate-swr-resample_exact_async-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20344
 
 define ARESAMPLE_EXACT_LIN
@@ -777,22 +777,22 @@ fate-swr-resample_exact_lin-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
 fate-swr-resample_exact_lin-s16p-8000-48000: CMP_TARGET = 14.54
 fate-swr-resample_exact_lin-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample_exact_lin-s32p-44100-48000: CMP_TARGET = 9.64
+fate-swr-resample_exact_lin-s32p-44100-48000: CMP_TARGET = 9.66
 fate-swr-resample_exact_lin-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20482
 
-fate-swr-resample_exact_lin-s32p-44100-8000: CMP_TARGET = 75.38
+fate-swr-resample_exact_lin-s32p-44100-8000: CMP_TARGET = 75.37
 fate-swr-resample_exact_lin-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20486
 
-fate-swr-resample_exact_lin-s32p-48000-44100: CMP_TARGET = 0.23
+fate-swr-resample_exact_lin-s32p-48000-44100: CMP_TARGET = 0.74
 fate-swr-resample_exact_lin-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20480
 
-fate-swr-resample_exact_lin-s32p-48000-8000: CMP_TARGET = 62.36
+fate-swr-resample_exact_lin-s32p-48000-8000: CMP_TARGET = 62.35
 fate-swr-resample_exact_lin-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20484
 
-fate-swr-resample_exact_lin-s32p-8000-44100: CMP_TARGET = 14.59
+fate-swr-resample_exact_lin-s32p-8000-44100: CMP_TARGET = 14.61
 fate-swr-resample_exact_lin-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20480
 
-fate-swr-resample_exact_lin-s32p-8000-48000: CMP_TARGET = 14.50
+fate-swr-resample_exact_lin-s32p-8000-48000: CMP_TARGET = 14.52
 fate-swr-resample_exact_lin-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20480
 
 define ARESAMPLE_EXACT_LIN_ASYNC
@@ -818,7 +818,7 @@ fate-swr-resample_exact_lin_async-dblp-48000-44100: SIZE_TOLERANCE = 576000 - 20
 fate-swr-resample_exact_lin_async-dblp-48000-8000: CMP_TARGET = 2591.72
 fate-swr-resample_exact_lin_async-dblp-48000-8000: SIZE_TOLERANCE = 576000 - 20304
 
-fate-swr-resample_exact_lin_async-dblp-8000-44100: CMP_TARGET = 11187.25
+fate-swr-resample_exact_lin_async-dblp-8000-44100: CMP_TARGET = 11187.24
 fate-swr-resample_exact_lin_async-dblp-8000-44100: SIZE_TOLERANCE = 96000 - 20344
 
 fate-swr-resample_exact_lin_async-dblp-8000-48000: CMP_TARGET = 11326.80
@@ -863,19 +863,19 @@ fate-swr-resample_exact_lin_async-s16p-8000-48000: SIZE_TOLERANCE = 96000 - 2034
 fate-swr-resample_exact_lin_async-s32p-44100-48000: CMP_TARGET = 7791.72
 fate-swr-resample_exact_lin_async-s32p-44100-48000: SIZE_TOLERANCE = 529200 - 20300
 
-fate-swr-resample_exact_lin_async-s32p-44100-8000: CMP_TARGET = 4023.01
+fate-swr-resample_exact_lin_async-s32p-44100-8000: CMP_TARGET = 4023.02
 fate-swr-resample_exact_lin_async-s32p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
 
-fate-swr-resample_exact_lin_async-s32p-48000-44100: CMP_TARGET = 1923.79
+fate-swr-resample_exact_lin_async-s32p-48000-44100: CMP_TARGET = 1923.77
 fate-swr-resample_exact_lin_async-s32p-48000-44100: SIZE_TOLERANCE = 576000 - 20298
 
-fate-swr-resample_exact_lin_async-s32p-48000-8000: CMP_TARGET = 2591.72
+fate-swr-resample_exact_lin_async-s32p-48000-8000: CMP_TARGET = 2591.71
 fate-swr-resample_exact_lin_async-s32p-48000-8000: SIZE_TOLERANCE = 576000 - 20304
 
 fate-swr-resample_exact_lin_async-s32p-8000-44100: CMP_TARGET = 11187.25
 fate-swr-resample_exact_lin_async-s32p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
 
-fate-swr-resample_exact_lin_async-s32p-8000-48000: CMP_TARGET = 11326.80
+fate-swr-resample_exact_lin_async-s32p-8000-48000: CMP_TARGET = 11326.81
 fate-swr-resample_exact_lin_async-s32p-8000-48000: SIZE_TOLERANCE = 96000 - 20344
 
 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)



More information about the ffmpeg-cvslog mailing list