aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuhammad Faiz <mfcc64@gmail.com>2017-03-16 12:35:11 +0700
committerMuhammad Faiz <mfcc64@gmail.com>2017-03-18 13:57:03 +0700
commitc52638cca255737eb060dcdedf5be4414e622e82 (patch)
treeefda3397661fb7c10955ae312e9e6826ac5be206
parent9e6b269fea260a4f4cd15d1c0f77b21addee342a (diff)
downloadffmpeg-c52638cca255737eb060dcdedf5be4414e622e82.tar.gz
swresample/swresample: do not use s32p internally by default when resampling
use fltp when doing s32 -> s32 resampling because s32p has no simd optimization benchmark: old 17.913s new 7.584s (use fma3) Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
-rw-r--r--libswresample/swresample.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index f2e66005eb..74c96dce60 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -223,6 +223,8 @@ av_cold int swr_init(struct SwrContext *s){
}else if( av_get_planar_sample_fmt(s-> in_sample_fmt) == AV_SAMPLE_FMT_S32P
&& av_get_planar_sample_fmt(s->out_sample_fmt) == AV_SAMPLE_FMT_S32P
&& !s->rematrix
+ && s->out_sample_rate == s->in_sample_rate
+ && !(s->flags & SWR_FLAG_RESAMPLE)
&& s->engine != SWR_ENGINE_SOXR){
s->int_sample_fmt= AV_SAMPLE_FMT_S32P;
}else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){