summaryrefslogtreecommitdiff
path: root/libswresample/swresample.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-01 20:20:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-01 20:20:21 +0200
commitaab5a4521c4034c218cbd72325b5d1946a3ec3c2 (patch)
treed250c1d9fc0454047df5ce59f3e55007b4b0a337 /libswresample/swresample.c
parent00fea26faf8df22b7c686ceb36a7eecdc3d44b10 (diff)
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.c5
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;
}