From c8737d348be526d6403856f424a73ad1c81b157f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 12 Jan 2013 19:11:08 +0100 Subject: [PATCH] swr: work with 4 noise shaping coeffs at a time 63->38 kcycles Signed-off-by: Michael Niedermayer --- libswresample/dither_template.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libswresample/dither_template.c b/libswresample/dither_template.c index 8cf0c57681..ecbe55c5dd 100644 --- a/libswresample/dither_template.c +++ b/libswresample/dither_template.c @@ -29,6 +29,9 @@ void RENAME(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData float S = s->dither.ns_scale; float S_1 = s->dither.ns_scale_1; + av_assert2((taps&3) != 2); + av_assert2((taps&3) != 3 || s->dither.ns_coeffs[taps] == 0); + for (ch=0; chch_count; ch++) { const float *noise = ((const float *)noises->ch[ch]) + s->dither.noise_pos; const DELEM *src = (const DELEM*)srcs->ch[ch]; @@ -38,7 +41,13 @@ void RENAME(swri_noise_shaping)(SwrContext *s, AudioData *dsts, const AudioData pos = s->dither.ns_pos; for (i=0; i