[FFmpeg-cvslog] swr: dont treat 32 and 24 as equal in simple copy check
Michael Niedermayer
git at videolan.org
Wed Jun 5 03:11:23 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 5 02:49:00 2013 +0200| [3289670142954e143b69f0a87583130140e16410] | committer: Michael Niedermayer
swr: dont treat 32 and 24 as equal in simple copy check
Fixes dithering from 32 to 24 bit
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3289670142954e143b69f0a87583130140e16410
---
libswresample/swresample.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 012de02..08b1aad 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -651,7 +651,8 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co
if(s->resample_first ? !s->rematrix : !s->resample)
preout= midbuf;
- if(s->int_sample_fmt == s->out_sample_fmt && s->out.planar){
+ if(s->int_sample_fmt == s->out_sample_fmt && s->out.planar
+ && !(s->out_sample_fmt==AV_SAMPLE_FMT_S32P && (s->dither.output_sample_bits&31))){
if(preout==in){
out_count= FFMIN(out_count, in_count); //TODO check at the end if this is needed or redundant
av_assert0(s->in.planar); //we only support planar internally so it has to be, we support copying non planar though
More information about the ffmpeg-cvslog
mailing list