From b5f544a0f9981ee1676128cb6c3711a2ec80fe1b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 4 Feb 2013 02:36:33 +0100 Subject: [PATCH] swr: Dont use floats for S32->S32 when possible Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index bb2bf05fbd..b192bfdfa9 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -295,6 +295,11 @@ av_cold int swr_init(struct SwrContext *s){ if(s->int_sample_fmt == AV_SAMPLE_FMT_NONE){ if(av_get_planar_sample_fmt(s->in_sample_fmt) <= AV_SAMPLE_FMT_S16P){ s->int_sample_fmt= AV_SAMPLE_FMT_S16P; + }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->engine != SWR_ENGINE_SOXR){ + s->int_sample_fmt= AV_SAMPLE_FMT_S32P; }else if(av_get_planar_sample_fmt(s->in_sample_fmt) <= AV_SAMPLE_FMT_FLTP){ s->int_sample_fmt= AV_SAMPLE_FMT_FLTP; }else{