Skip to content
Snippets Groups Projects
Commit c52638cc authored by Muhammad Faiz's avatar Muhammad Faiz
Browse files

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: default avatarwm4 <nfxjfg@googlemail.com>
Signed-off-by: default avatarMuhammad Faiz <mfcc64@gmail.com>
parent 9e6b269f
No related branches found
No related tags found
No related merge requests found
...@@ -223,6 +223,8 @@ av_cold int swr_init(struct SwrContext *s){ ...@@ -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 }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 && av_get_planar_sample_fmt(s->out_sample_fmt) == AV_SAMPLE_FMT_S32P
&& !s->rematrix && !s->rematrix
&& s->out_sample_rate == s->in_sample_rate
&& !(s->flags & SWR_FLAG_RESAMPLE)
&& s->engine != SWR_ENGINE_SOXR){ && s->engine != SWR_ENGINE_SOXR){
s->int_sample_fmt= AV_SAMPLE_FMT_S32P; s->int_sample_fmt= AV_SAMPLE_FMT_S32P;
}else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){ }else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment