Permalink
Browse files

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information...
1 parent be989f9 commit b5f544a0f9981ee1676128cb6c3711a2ec80fe1b @michaelni michaelni committed Feb 4, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 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{

0 comments on commit b5f544a

Please sign in to comment.