[FFmpeg-cvslog] swr: Dont use floats for S32->S32 when possible

Michael Niedermayer git at videolan.org
Mon Feb 4 04:19:00 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Feb  4 02:36:33 2013 +0100| [b5f544a0f9981ee1676128cb6c3711a2ec80fe1b] | committer: Michael Niedermayer

swr: Dont use floats for S32->S32 when possible

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswresample/swresample.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index bb2bf05..b192bfd 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{



More information about the ffmpeg-cvslog mailing list