swresample/swresample: Treat mono as planar

This might in some cases improve performance.

Idea from: fbc0b86599
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-04 03:05:05 +02:00
parent c62fea7574
commit 05ff1a2c05
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ static void set_audiodata_fmt(AudioData *a, enum AVSampleFormat fmt){
a->fmt = fmt; a->fmt = fmt;
a->bps = av_get_bytes_per_sample(fmt); a->bps = av_get_bytes_per_sample(fmt);
a->planar= av_sample_fmt_is_planar(fmt); a->planar= av_sample_fmt_is_planar(fmt);
if (a->ch_count == 1)
a->planar = 1;
} }
static void free_temp(AudioData *a){ static void free_temp(AudioData *a){