swr: Dont use floats for S32->S32 when possible
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Feb 2013 01:36:33 +0000 (02:36 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Feb 2013 03:11:46 +0000 (04:11 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c

index bb2bf05..b192bfd 100644 (file)
@@ -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{