[FFmpeg-cvslog] swr: audioconvert: consider mono to be planar

Michael Niedermayer git at videolan.org
Sun May 6 19:58:45 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May  6 18:04:09 2012 +0200| [f10aeab69ca094f2059bad992a8b68bc767a46c9] | committer: Michael Niedermayer

swr: audioconvert: consider mono to be planar

This way it will be handled by the planar==planar SIMD

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

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

 libswresample/audioconvert.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c
index 81bd6d3..986c45d 100644
--- a/libswresample/audioconvert.c
+++ b/libswresample/audioconvert.c
@@ -124,6 +124,12 @@ AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt,
     ctx = av_mallocz(sizeof(*ctx));
     if (!ctx)
         return NULL;
+
+    if(channels == 1){
+         in_fmt = av_get_planar_sample_fmt( in_fmt);
+        out_fmt = av_get_planar_sample_fmt(out_fmt);
+    }
+
     ctx->channels = channels;
     ctx->conv_f   = f;
     ctx->ch_map   = ch_map;



More information about the ffmpeg-cvslog mailing list