diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 20:20:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 20:20:21 +0200 |
commit | aab5a4521c4034c218cbd72325b5d1946a3ec3c2 (patch) | |
tree | d250c1d9fc0454047df5ce59f3e55007b4b0a337 /libswresample/swresample.c | |
parent | 00fea26faf8df22b7c686ceb36a7eecdc3d44b10 (diff) | |
download | ffmpeg-aab5a4521c4034c218cbd72325b5d1946a3ec3c2.tar.gz |
swr: add and use function pointers for rematrix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample.c')
-rw-r--r-- | libswresample/swresample.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 9a4f6a7597..0cdf29d131 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -314,7 +314,7 @@ av_assert0(s->out.ch_count); s->dither = s->preout; - if(s->rematrix) + if(s->rematrix || s->dither_method) return swri_rematrix_init(s); return 0; @@ -554,8 +554,9 @@ static int swr_convert_internal(struct SwrContext *s, AudioData *out, int out_co if(s->dither_pos + out_count > s->dither.count) s->dither_pos = 0; + for(ch=0; ch<preout->ch_count; ch++) - swri_sum2(s->int_sample_fmt, preout->ch[ch], preout->ch[ch], s->dither.ch[ch] + s->dither.bps * s->dither_pos, 1, 1, out_count); + s->mix_2_1_f(preout->ch[ch], preout->ch[ch], s->dither.ch[ch] + s->dither.bps * s->dither_pos, s->native_one, 0, 0, out_count); s->dither_pos += out_count; } |