diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-04 02:36:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-04 04:11:46 +0100 |
commit | b5f544a0f9981ee1676128cb6c3711a2ec80fe1b (patch) | |
tree | 04cb1881295ae4f30a21527fb779cb5b183d6dd3 /libswresample | |
parent | be989f92367839201456c95356f1c4dc13223671 (diff) | |
download | ffmpeg-streaming-b5f544a0f9981ee1676128cb6c3711a2ec80fe1b.zip ffmpeg-streaming-b5f544a0f9981ee1676128cb6c3711a2ec80fe1b.tar.gz |
swr: Dont use floats for S32->S32 when possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r-- | libswresample/swresample.c | 5 |
1 files changed, 5 insertions, 0 deletions
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{ |