summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-02-04 01:36:33 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-02-04 03:11:46 (GMT)
commitb5f544a0f9981ee1676128cb6c3711a2ec80fe1b (patch)
tree04cb1881295ae4f30a21527fb779cb5b183d6dd3
parentbe989f92367839201456c95356f1c4dc13223671 (diff)
downloadffmpeg-b5f544a0f9981ee1676128cb6c3711a2ec80fe1b.zip
ffmpeg-b5f544a0f9981ee1676128cb6c3711a2ec80fe1b.tar.gz
ffmpeg-b5f544a0f9981ee1676128cb6c3711a2ec80fe1b.tar.bz2
swr: Dont use floats for S32->S32 when possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libswresample/swresample.c5
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{