[FFmpeg-cvslog] avformat/tee: allow packets with negative timestamps

2020-12-07 Thread Jan Ekström
ffmpeg | branch: master | Jan Ekström  | Tue Jul 14 
11:54:08 2020 +0300| [95fd790c14b034e8f6d75a5a20bbc1499d299d97] | committer: 
Jan Ekström

avformat/tee: allow packets with negative timestamps

As this is a meta muxer and the same flag is set with the fifo
meta muxer, there is really no reason not to have this set here
as well.

Signed-off-by: Jan Ekström 

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

 libavformat/tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index c5c59975e6..c0b69a386c 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -614,5 +614,5 @@ AVOutputFormat ff_tee_muxer = {
 .write_trailer = tee_write_trailer,
 .write_packet  = tee_write_packet,
 .priv_class= &tee_muxer_class,
-.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
+.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
 };

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] doc/filters: fix obvious mistake for minimum accepted value

2020-12-07 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Dec  7 13:12:42 
2020 +0100| [fcae745f46840416f448639ec34024b07d653ccd] | committer: Paul B Mahol

doc/filters: fix obvious mistake for minimum accepted value

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

 doc/filters.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 3a31f72d79..62d6e26a02 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1421,7 +1421,7 @@ Specify frequency shift. Allowed range is -INT_MAX to 
INT_MAX.
 Default value is 0.0.
 
 @item level
-Set output gain applied to final output. Allowed range is from -1.0 to 1.0.
+Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
 Default value is 1.0.
 @end table
 
@@ -2203,7 +2203,7 @@ Specify phase shift. Allowed range is from -1.0 to 1.0.
 Default value is 0.0.
 
 @item level
-Set output gain applied to final output. Allowed range is from -1.0 to 1.0.
+Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
 Default value is 1.0.
 @end table
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/dynamic_hdr10_plus: don't take a GetBitContext as input argument

2020-12-07 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Dec  6 12:30:14 
2020 -0300| [1aa72fe79454c8f0a9adcd9ac7e6fbd20bbfe1a4] | committer: James Almer

avcodec/dynamic_hdr10_plus: don't take a GetBitContext as input argument

Create a local one instead from a byte buffer input argument.
This prevents skipping bytes that may belong to another SEI message.

Signed-off-by: James Almer 

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

 libavcodec/dynamic_hdr10_plus.c | 13 ++---
 libavcodec/dynamic_hdr10_plus.h |  7 ---
 libavcodec/hevc_sei.c   |  5 -
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/libavcodec/dynamic_hdr10_plus.c b/libavcodec/dynamic_hdr10_plus.c
index bf0d085b8f..4b2ecdb72e 100644
--- a/libavcodec/dynamic_hdr10_plus.c
+++ b/libavcodec/dynamic_hdr10_plus.c
@@ -17,6 +17,7 @@
  */
 
 #include "dynamic_hdr10_plus.h"
+#include "get_bits.h"
 
 static const uint8_t usa_country_code = 0xB5;
 static const uint16_t smpte_provider_code = 0x003C;
@@ -30,11 +31,19 @@ static const int32_t knee_point_den = 4095;
 static const int32_t bezier_anchor_den = 1023;
 static const int32_t saturation_weight_den = 8;
 
-int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(GetBitContext *gb, 
AVDynamicHDRPlus *s)
+int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(AVDynamicHDRPlus *s, const 
uint8_t *data,
+ int size)
 {
+GetBitContext gbc, *gb = &gbc;
+int ret;
+
 if (!s)
 return AVERROR(ENOMEM);
 
+ret = init_get_bits8(gb, data, size);
+if (ret < 0)
+return ret;
+
 s->application_version = get_bits(gb, 8);
 
 if (get_bits_left(gb) < 2)
@@ -189,7 +198,5 @@ int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(GetBitContext 
*gb, AVDynamicHDRPlus
 }
 }
 
-skip_bits(gb, get_bits_left(gb));
-
 return 0;
 }
diff --git a/libavcodec/dynamic_hdr10_plus.h b/libavcodec/dynamic_hdr10_plus.h
index 06053f88e7..cd7acf0432 100644
--- a/libavcodec/dynamic_hdr10_plus.h
+++ b/libavcodec/dynamic_hdr10_plus.h
@@ -20,15 +20,16 @@
 #define AVCODEC_DYNAMIC_HDR10_PLUS_H
 
 #include "libavutil/hdr_dynamic_metadata.h"
-#include "get_bits.h"
 
 /**
  * Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus).
- * @param gb The bit content to be decoded.
  * @param s A pointer containing the decoded AVDynamicHDRPlus structure.
+ * @param data The byte array containing the raw ITU-T T.35 data.
+ * @param size Size of the data array in bytes.
  *
  * @return 0 if succeed. Otherwise, returns the appropriate AVERROR.
  */
-int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(GetBitContext *gb, 
AVDynamicHDRPlus *s);
+int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(AVDynamicHDRPlus *s, const 
uint8_t *data,
+ int size);
 
 #endif /* AVCODEC_DYNAMIC_HDR10_PLUS_H */
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 159ef5830a..3b0fa43439 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -216,7 +216,8 @@ static int 
decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s
 if (!metadata)
 return AVERROR(ENOMEM);
 
-err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(gb, metadata);
+err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(metadata,
+   gb->buffer + 
get_bits_count(gb) / 8, size);
 if (err < 0) {
 av_free(metadata);
 return err;
@@ -229,6 +230,8 @@ static int 
decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s
 return AVERROR(ENOMEM);
 }
 
+skip_bits_long(gb, size * 8);
+
 return 0;
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/hevc_sei: split Dynamic HDR10+ SEI parsing into its own function

2020-12-07 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Dec  6 11:04:05 
2020 -0300| [32bbca07d74d2bf9ebf6ff881be20e7e7afded1a] | committer: James Almer

avcodec/hevc_sei: split Dynamic HDR10+ SEI parsing into its own function

Signed-off-by: James Almer 

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

 libavcodec/hevc_sei.c | 45 ++---
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 8a29181a31..8af9f9b29d 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -207,6 +207,31 @@ static int 
decode_nal_sei_user_data_unregistered(HEVCSEIUnregistered *s, GetBitC
 return 0;
 }
 
+static int decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus 
*s,
+GetBitContext *gb, int 
size)
+{
+size_t meta_size;
+int err;
+AVDynamicHDRPlus *metadata = av_dynamic_hdr_plus_alloc(&meta_size);
+if (!metadata)
+return AVERROR(ENOMEM);
+
+err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(gb, metadata);
+if (err < 0) {
+av_free(metadata);
+return err;
+}
+
+av_buffer_unref(&s->info);
+s->info = av_buffer_create((uint8_t *)metadata, meta_size, NULL, NULL, 0);
+if (!s->info) {
+av_free(metadata);
+return AVERROR(ENOMEM);
+}
+
+return 0;
+}
+
 static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, 
GetBitContext *gb,
  int size)
 {
@@ -239,25 +264,7 @@ static int 
decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
 
 if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
 application_identifier == smpte2094_40_application_identifier) {
-int err = 0;
-size_t meta_size = 0;
-AVDynamicHDRPlus *metadata = av_dynamic_hdr_plus_alloc(&meta_size);
-if (!metadata)
-return AVERROR(ENOMEM);
-
-err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(gb, metadata);
-if (err < 0) {
-av_free(metadata);
-return err;
-}
-
-av_buffer_unref(&s->dynamic_hdr_plus.info);
-s->dynamic_hdr_plus.info = av_buffer_create((uint8_t *)metadata,
-meta_size, NULL, NULL, 
0);
-if (!s->dynamic_hdr_plus.info) {
-av_free(metadata);
-return AVERROR(ENOMEM);
-}
+return 
decode_registered_user_data_dynamic_hdr_plus(&s->dynamic_hdr_plus, gb, size);
 }
 } else {
 uint32_t user_identifier = get_bits_long(gb, 32);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/dynamic_hdr10_plus: remove unused const variables

2020-12-07 Thread James Almer
ffmpeg | branch: master | James Almer  | Mon Dec  7 14:28:50 
2020 -0300| [c369ceb24474449897b3c198fa2c03793173620e] | committer: James Almer

avcodec/dynamic_hdr10_plus: remove unused const variables

Signed-off-by: James Almer 

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

 libavcodec/dynamic_hdr10_plus.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/libavcodec/dynamic_hdr10_plus.c b/libavcodec/dynamic_hdr10_plus.c
index 4b2ecdb72e..a602e606ed 100644
--- a/libavcodec/dynamic_hdr10_plus.c
+++ b/libavcodec/dynamic_hdr10_plus.c
@@ -19,10 +19,6 @@
 #include "dynamic_hdr10_plus.h"
 #include "get_bits.h"
 
-static const uint8_t usa_country_code = 0xB5;
-static const uint16_t smpte_provider_code = 0x003C;
-static const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
-static const uint16_t smpte2094_40_application_identifier = 0x04;
 static const int64_t luminance_den = 1;
 static const int32_t peak_luminance_den = 15;
 static const int64_t rgb_den = 10;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avcodec/hevc_sei: keep size in sync with the registered ITU-T T35 SEI GetBitContext

2020-12-07 Thread James Almer
ffmpeg | branch: master | James Almer  | Sun Dec  6 12:30:13 
2020 -0300| [b9f7c9b2723f44aa7850c24f9dcbb6a4e3ac555f] | committer: James Almer

avcodec/hevc_sei: keep size in sync with the registered ITU-T T35 SEI 
GetBitContext

Signed-off-by: James Almer 

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

 libavcodec/hevc_sei.c | 21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 8af9f9b29d..159ef5830a 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -241,9 +241,9 @@ static int 
decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
 uint8_t country_code = 0;
 uint16_t provider_code = 0;
 
-if (size < 7)
+if (size < 3)
 return AVERROR(EINVAL);
-size -= 7;
+size -= 3;
 
 country_code = get_bits(gb, 8);
 if (country_code == 0xFF) {
@@ -258,16 +258,27 @@ static int 
decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitConte
 // A/341 Amendment - 2094-40
 const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
 const uint8_t smpte2094_40_application_identifier = 0x04;
+uint16_t provider_oriented_code;
+uint8_t application_identifier;
 
-uint16_t provider_oriented_code = get_bits(gb, 16);
-uint8_t application_identifier = get_bits(gb, 8);
+if (size < 3)
+return AVERROR(EINVAL);
+size -= 3;
 
+provider_oriented_code = get_bits(gb, 16);
+application_identifier = get_bits(gb, 8);
 if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
 application_identifier == smpte2094_40_application_identifier) {
 return 
decode_registered_user_data_dynamic_hdr_plus(&s->dynamic_hdr_plus, gb, size);
 }
 } else {
-uint32_t user_identifier = get_bits_long(gb, 32);
+uint32_t user_identifier;
+
+if (size < 4)
+return AVERROR(EINVAL);
+size -= 4;
+
+user_identifier = get_bits_long(gb, 32);
 switch (user_identifier) {
 case MKBETAG('G', 'A', '9', '4'):
 return decode_registered_user_data_closed_caption(&s->a53_caption, 
gb, size);

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/f_perms: add timeline support

2020-12-07 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Mon Dec  7 21:05:37 
2020 +0100| [18befac5da2c71aeb9922b6fd5551502f4c5a913] | committer: Paul B Mahol

avfilter/f_perms: add timeline support

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

 libavfilter/f_perms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c
index dc6ecbbb53..d984e5b150 100644
--- a/libavfilter/f_perms.c
+++ b/libavfilter/f_perms.c
@@ -141,6 +141,7 @@ AVFilter ff_af_aperms = {
 .inputs  = aperms_inputs,
 .outputs = aperms_outputs,
 .priv_class  = &aperms_class,
+.flags   = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };
 #endif /* CONFIG_APERMS_FILTER */
 
@@ -174,5 +175,6 @@ AVFilter ff_vf_perms = {
 .inputs  = perms_inputs,
 .outputs = perms_outputs,
 .priv_class  = &perms_class,
+.flags   = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };
 #endif /* CONFIG_PERMS_FILTER */

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/af_earwax: fix filter behavior

2020-12-07 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Fri Dec  4 17:54:05 
2020 +0100| [f41de0436cc8ce7221cd3702a51f3676cc689cf7] | committer: Paul B Mahol

avfilter/af_earwax: fix filter behavior

Previous filter output was incorrect. New one actually follows
graph in comments described on side of filter taps.

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

 libavfilter/af_earwax.c  | 124 +--
 tests/fate/filter-audio.mak  |   2 +-
 tests/ref/fate/filter-earwax |  40 +++---
 3 files changed, 117 insertions(+), 49 deletions(-)

diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c
index cdd2b4fc49..921d0a4c04 100644
--- a/libavfilter/af_earwax.c
+++ b/libavfilter/af_earwax.c
@@ -34,9 +34,9 @@
 #include "audio.h"
 #include "formats.h"
 
-#define NUMTAPS 64
+#define NUMTAPS 32
 
-static const int8_t filt[NUMTAPS] = {
+static const int8_t filt[NUMTAPS * 2] = {
 /* 30°  330° */
 4,   -6, /* 32 tap stereo FIR filter. */
 4,  -11, /* One side filters as if the */
@@ -72,7 +72,10 @@ static const int8_t filt[NUMTAPS] = {
 4,0};
 
 typedef struct EarwaxContext {
-int16_t taps[NUMTAPS * 2];
+int16_t filter[2][NUMTAPS];
+int16_t taps[4][NUMTAPS * 2];
+
+AVFrame *frame[2];
 } EarwaxContext;
 
 static int query_formats(AVFilterContext *ctx)
@@ -83,7 +86,7 @@ static int query_formats(AVFilterContext *ctx)
 AVFilterFormats *formats = NULL;
 AVFilterChannelLayouts *layout = NULL;
 
-if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_S16  
   )) < 0 ||
+if ((ret = ff_add_format (&formats, AV_SAMPLE_FMT_S16P 
   )) < 0 ||
 (ret = ff_set_common_formats (ctx , formats
   )) < 0 ||
 (ret = ff_add_channel_layout (&layout , AV_CH_LAYOUT_STEREO
   )) < 0 ||
 (ret = ff_set_common_channel_layouts (ctx , layout 
   )) < 0 ||
@@ -94,7 +97,8 @@ static int query_formats(AVFilterContext *ctx)
 }
 
 //FIXME: replace with DSPContext.scalarproduct_int16
-static inline int16_t *scalarproduct(const int16_t *in, const int16_t *endin, 
int16_t *out)
+static inline int16_t *scalarproduct(const int16_t *in, const int16_t *endin,
+ const int16_t *filt, int16_t *out)
 {
 int32_t sample;
 int16_t j;
@@ -103,7 +107,7 @@ static inline int16_t *scalarproduct(const int16_t *in, 
const int16_t *endin, in
 sample = 0;
 for (j = 0; j < NUMTAPS; j++)
 sample += in[j] * filt[j];
-*out = av_clip_int16(sample >> 6);
+*out = av_clip_int16(sample >> 7);
 out++;
 in++;
 }
@@ -111,40 +115,102 @@ static inline int16_t *scalarproduct(const int16_t *in, 
const int16_t *endin, in
 return out;
 }
 
-static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
+static int config_input(AVFilterLink *inlink)
 {
-AVFilterLink *outlink = inlink->dst->outputs[0];
-int16_t *taps, *endin, *in, *out;
-AVFrame *outsamples = ff_get_audio_buffer(outlink, insamples->nb_samples);
-int len;
+EarwaxContext *s = inlink->dst->priv;
 
-if (!outsamples) {
-av_frame_free(&insamples);
-return AVERROR(ENOMEM);
+for (int i = 0; i < NUMTAPS; i++) {
+s->filter[0][i] = filt[i * 2];
+s->filter[1][i] = filt[i * 2 + 1];
 }
-av_frame_copy_props(outsamples, insamples);
 
-taps  = ((EarwaxContext *)inlink->dst->priv)->taps;
-out   = (int16_t *)outsamples->data[0];
-in= (int16_t *)insamples ->data[0];
+return 0;
+}
+
+static void convolve(AVFilterContext *ctx, AVFrame *in,
+ int input_ch, int output_ch,
+ int filter_ch, int tap_ch)
+{
+EarwaxContext *s = ctx->priv;
+int16_t *taps, *endin, *dst, *src;
+int len;
+
+taps  = s->taps[tap_ch];
+dst   = (int16_t *)s->frame[input_ch]->data[output_ch];
+src   = (int16_t *)in->data[input_ch];
 
-len = FFMIN(NUMTAPS, 2*insamples->nb_samples);
+len = FFMIN(NUMTAPS, in->nb_samples);
 // copy part of new input and process with saved input
-memcpy(taps+NUMTAPS, in, len * sizeof(*taps));
-out   = scalarproduct(taps, taps + len, out);
+memcpy(taps+NUMTAPS, src, len * sizeof(*taps));
+dst = scalarproduct(taps, taps + len, s->filter[filter_ch], dst);
 
 // process current input
-if (2*insamples->nb_samples >= NUMTAPS ){
-endin = in + insamples->nb_samples * 2 - NUMTAPS;
-scalarproduct(in, endin, out);
+if (2*in->nb_samples >= NUMTAPS ){
+endin = src + in->nb_samples - NUMTAPS;
+scalarproduct(src, endin, s->filter[filter_ch], dst);
 
 // save part of input for next round
 memcpy(taps, endin, NUMTAPS * sizeof(*taps));
-} else
-memmove(taps, taps + 2*insamples->nb_samples, NUMTAPS * sizeof(*