diff mbox

[FFmpeg-devel] add dumpwave filter

Message ID CDE381F7-5C9D-49E6-9592-8331049494A1@gmail.com
State New
Headers show

Commit Message

dmitry.gumenyuk@gmail.com Jan. 17, 2018, 9:14 p.m. UTC
> On 15 Jan 2018, at 13:48, Dmytro Humeniuk <dmitry.gumenyuk@gmail.com> wrote:
> 
>> 
>> On 15 Jan 2018, at 09:14, Tobias Rapp <t.rapp@noa-archive.com> wrote:
>> 
>> On 13.01.2018 23:52, Дмитрий Гуменюк wrote:
>>> Hi,
>>>> On 13 Jan 2018, at 01:37, Дмитрий Гуменюк <dmitry.gumenyuk@gmail.com> wrote:
>>>> 
>>>> Hi
>>>> 
>>>>> On 12 Jan 2018, at 13:32, Дмитрий Гуменюк <dmitry.gumenyuk@gmail.com> wrote:
>>>>> 
>>>>>> On 12 Jan 2018, at 13:17, Tobias Rapp <t.rapp@noa-archive.com> wrote:
>>>>>> 
>>>>>> On 12.01.2018 12:16, Дмитрий Гуменюк wrote:
>>>>>>> Hi
>>>>>>>> On 11 Jan 2018, at 09:20, Tobias Rapp <t.rapp@noa-archive.com> wrote:
>>>>>>>> 
>>>>>>>> On 10.01.2018 18:18, Kyle Swanson wrote:
>>>>>>>>> Hi,
>>>>>>>>> For this to be a part of libavfilter the output needs to be more generic
>>>>>>>>> than the just the Soundcloud format. If we want this to be generally useful
>>>>>>>>> it should probably just output an array of floats between 0.0 and 1.0. The
>>>>>>>>> consumer of this data (JS library, or whatever) can use this in whatever
>>>>>>>>> way it wants.
>>>>>>>> 
>>>>>>>> I agree. If the BWF Peak Envelope output which was suggested in the other thread does not match your demands and filter implementation is actually necessary I would prefer if the filter would attach the RMS value(s) as frame metadata instead of directly dumping to file. Frame metadata can then be re-
>>>>>>> RMS values may be counted for several frames or only for a half of a frame
>>>>>>>> used by other filters or dumped into file by using the existing "ametadata" filter.
>>>>>>>> 
>>>>>>>> This would be similar to:
>>>>>>>> 
>>>>>>>> ffmpeg -i input-file -f null -filter:a "asetnsamples=22050,astats=metadata=on,ametadata=print:file=stats-file.dat" /dev/null
>>>>>>> I like this idea, but won’t asetnsamples affect performance by creating fifo queue? And it may require some effort to parse long output
>>>>>> 
>>>>>> I added asetnsamples to define the audio frame size (interval of values from astats). You can reduce the number of lines printed by ametadata by using the "key=lavfi.astats.foo" option.
>>>>> I used asetnsamples as well, and I measured performance while transcoding - it appears to be slight slower
>>>> I think output is now more generic and I got rid of long switch/case, thanks for support
>>> Here is most recent patch, seems like all comments are addressed, did I miss something?
>> 
>> I still would prefer to have the value attached as frame metadata, then dumped into file via the existing "ametadata" filter. Even better would be to integrate the statistic value (if missing) into the "astats" filter.
>> 
>> If your concern is the output format of "ametadata" then some output format extension (CSV/JSON) needs to be discussed for ametadata/metadata.
>> 
>> If your concern is performance then please add some numbers. In my tests using an approx. 5 minutes input WAV file (48kHz, stereo) the run with "asetnsamples" was considerably faster than the run without (1.7s vs. 13.9s)
> Hi
> As I mentioned previously adding metadata to each frame is not possible
> as value may be counted for several frames or only for a half of a frame 
> 
> I used 2 hours long 48kHz mp3 https://s3-eu-west-1.amazonaws.com/balamii/SynthSystemSystersJAN2018.mp3
> For this purposes I set up CentOS AWS EC2 nano instance
> Then I transcoded it while filtering like following (just to recreate real situation):
> 1. -filter:a "asetnsamples=192197,astats=metadata=on,ametadata=print:file=stats-file.dat" out.mp3
> 2. -filter:a "dumpwave=n=192197:f=-" out.mp3
> Results:
> 1. 244810550046 nanoseconds
> 2. 87494286740 nanoseconds
> 
> One of the possible use cases - to set up 2 chains of asetnsamples->metadata - for example:
> "asetnsamples=192197,astats=metadata=on,ametadata=print:file=stats-file.dat,asetnsamples=22050,astats=metadata=on,ametadata=print:file=stats-file1.dat” for sure it will affect performance
> Comparing with "dumpwave=n=192197:f=out1,dumpwave=n= 22050:f=out2”
> 
Ping
>> Regards,
>> Tobias
>> 
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
—
Best regards,
Dmytro
From 64e953923a0c9f882afcced1d00ce572e0fafaeb Mon Sep 17 00:00:00 2001
From: Dmytro Humeniuk <dmitry.gumenyuk@gmail.com>
Date: Mon, 15 Jan 2018 00:01:25 +0100
Subject: [PATCH] avfilter: add dumpwave filter.

Signed-off-by: Dmytro Humeniuk <dmitry.gumenyuk@gmail.com>
---
 Changelog                            |    1 +
 doc/filters.texi                     |   33 +-
 libavfilter/Makefile                 |    1 +
 libavfilter/af_dumpwave.c            |  234 +++++
 libavfilter/allfilters.c             |    1 +
 libavfilter/version.h                |    4 +-
 tests/fate-run.sh                    |    9 +
 tests/fate/filter-audio.mak          |   12 +
 tests/ref/fate/filter-dumpwave       | 1800 ++++++++++++++++++++++++++++++++++
 tests/ref/fate/filter-dumpwave-24bit | 1800 ++++++++++++++++++++++++++++++++++
 tests/ref/fate/filter-dumpwave-fltp  | 1800 ++++++++++++++++++++++++++++++++++
 11 files changed, 5688 insertions(+), 7 deletions(-)
 create mode 100644 libavfilter/af_dumpwave.c
 create mode 100644 tests/ref/fate/filter-dumpwave
 create mode 100644 tests/ref/fate/filter-dumpwave-24bit
 create mode 100644 tests/ref/fate/filter-dumpwave-fltp

Comments

Moritz Barsnick Jan. 17, 2018, 11:13 p.m. UTC | #1
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -680,13 +680,13 @@ select RIAA.
>  @item cd
>  select Compact Disc (CD).
>  @item 50fm
> -select 50??s (FM).
> +select 50??s (FM).
>  @item 75fm
> -select 75??s (FM).
> +select 75??s (FM).
>  @item 50kf
> -select 50??s (FM-KF).
> +select 50??s (FM-KF).
>  @item 75kf
> -select 75??s (FM-KF).
> +select 75??s (FM-KF).
>  @end table
>  @end table

Please review your own patches carefully. As you can see here, your
editor is changing other sections due to some charset options or so.
Please make sure that doesn't happen.

> +The default value is @var{1800}

You probably don't need to add markup to "1800" (and is it really a
@val? not @code?), especially:

> +Samples count per value per channel, default 128

as you didn't do that here either.

> +@item f, file
> +Path to a file ``-'' is a shorthand
> +for standard output.

There needs to be a comma or perios after "Path to a file".
Furthermore, you don't need to wrap your lines so short.


>  more details but also more artifacts, while higher values make the image smoother
> -but also blurrier. Default value is @code{0} ??? PSNR optimal.
> +but also blurrier. Default value is @code{0} ??? PSNR optimal.

Your editor also changed this.

> +static const AVOption dumpwave_options[] = {
> +    { "w", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
> +    { "width", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
> +    { "n", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
> +    { "nb_samples", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
> +    { "f", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },
> +    { "file", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },

Cosmetic: I suggest aligning these with some whitespace, which makes it
easier to recognize the duplicated options.

> +    dumpwave->values = av_malloc(dumpwave->width * sizeof(float));
> +    if (!dumpwave->values)
> +        return AVERROR(ENOMEM);
> +    memset(dumpwave->values, 0, dumpwave->width * sizeof(float));

av_mallocz()?

> +static inline void RMS(DumpWaveContext *dumpwave, const float sample)
                      ^^^ I believe capitals are not desired here (but may be wrong)

> +    if (sample != 0)

0.f

Moritz
dmitry.gumenyuk@gmail.com Jan. 18, 2018, 4:23 p.m. UTC | #2
> On 18 Jan 2018, at 00:13, Moritz Barsnick <barsnick@gmx.net> wrote:
> 
>> --- a/doc/filters.texi
>> +++ b/doc/filters.texi
>> @@ -680,13 +680,13 @@ select RIAA.
>> @item cd
>> select Compact Disc (CD).
>> @item 50fm
>> -select 50??s (FM).
>> +select 50??s (FM).
>> @item 75fm
>> -select 75??s (FM).
>> +select 75??s (FM).
>> @item 50kf
>> -select 50??s (FM-KF).
>> +select 50??s (FM-KF).
>> @item 75kf
>> -select 75??s (FM-KF).
>> +select 75??s (FM-KF).
>> @end table
>> @end table
> 
> Please review your own patches carefully. As you can see here, your
> editor is changing other sections due to some charset options or so.
> Please make sure that doesn't happen.
> 
Sorry, I will pay more attention reviewing patches
>> +The default value is @var{1800}
> 
> You probably don't need to add markup to "1800" (and is it really a
> @val? not @code?), especially:
> 
>> +Samples count per value per channel, default 128
> 
> as you didn't do that here either.
> 
>> +@item f, file
>> +Path to a file ``-'' is a shorthand
>> +for standard output.
> 
> There needs to be a comma or perios after "Path to a file".
> Furthermore, you don't need to wrap your lines so short.
> 
> 
>> more details but also more artifacts, while higher values make the image smoother
>> -but also blurrier. Default value is @code{0} ??? PSNR optimal.
>> +but also blurrier. Default value is @code{0} ??? PSNR optimal.
> 
> Your editor also changed this.
> 
>> +static const AVOption dumpwave_options[] = {
>> +    { "w", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
>> +    { "width", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
>> +    { "n", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
>> +    { "nb_samples", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
>> +    { "f", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },
>> +    { "file", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },
> 
I’m not sure what is maximum line length limit
> Cosmetic: I suggest aligning these with some whitespace, which makes it
> easier to recognize the duplicated options.
> 
>> +    dumpwave->values = av_malloc(dumpwave->width * sizeof(float));
>> +    if (!dumpwave->values)
>> +        return AVERROR(ENOMEM);
>> +    memset(dumpwave->values, 0, dumpwave->width * sizeof(float));
> 
> av_mallocz()?
> 
>> +static inline void RMS(DumpWaveContext *dumpwave, const float sample)
>                     ^^^ I believe capitals are not desired here (but may be wrong)
> 
>> +    if (sample != 0)
> 
> 0.f
Thanks
> 
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/Changelog b/Changelog
index 61075b3392..75bb6630c6 100644
--- a/Changelog
+++ b/Changelog
@@ -38,6 +38,7 @@  version <next>:
 - Removed the ffserver program
 - Removed the ffmenc and ffmdec muxer and demuxer
 - VideoToolbox HEVC encoder and hwaccel
+- audio dumpwave filter
 
 
 version 3.4:
diff --git a/doc/filters.texi b/doc/filters.texi
index bd93e0ab84..8984e5aada 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -680,13 +680,13 @@  select RIAA.
 @item cd
 select Compact Disc (CD).
 @item 50fm
-select 50µs (FM).
+select 50??s (FM).
 @item 75fm
-select 75µs (FM).
+select 75??s (FM).
 @item 50kf
-select 50µs (FM-KF).
+select 50??s (FM-KF).
 @item 75kf
-select 75µs (FM-KF).
+select 75??s (FM-KF).
 @end table
 @end table
 
@@ -2538,6 +2538,29 @@  Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
 used to prevent clipping.
 @end table
 
+@section dumpwave
+Dump RMS envelope to a file.
+Convert samples to decibels and calculates RMS (Root-Mean-Square) audio power in 0 to 1.0 floats.
+
+@table @option
+@item w, width
+Number of data values.
+The default value is @var{1800}
+
+@item n, nb_samples
+Samples count per value per channel, default 128
+
+@item f, file
+Path to a file ``-'' is a shorthand
+for standard output.
+@end table
+
+For example, to generate RMS envelope for 44.1 kHz 6 seconds length audio
+with dimensions @var{1800x140}, samples count @code{44100*6/1800=147} and store it to @var{/tmp/out.csv}, you might use:
+@example
+dumpwave=w=1800:n=147:f=/tmp/out.csv
+@end example
+
 @section dynaudnorm
 Dynamic Audio Normalizer.
 
@@ -9379,7 +9402,7 @@  If not set, the filter will use the QP from the video stream (if available).
 @item strength
 Set filter strength. It accepts an integer in range -15 to 32. Lower values mean
 more details but also more artifacts, while higher values make the image smoother
-but also blurrier. Default value is @code{0} − PSNR optimal.
+but also blurrier. Default value is @code{0} ??? PSNR optimal.
 
 @item use_bframe_qp
 Enable the use of the QP from the B-Frames if set to @code{1}. Using this
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index ef4729dd3f..2ffbc9497a 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -87,6 +87,7 @@  OBJS-$(CONFIG_COMPENSATIONDELAY_FILTER)      += af_compensationdelay.o
 OBJS-$(CONFIG_CROSSFEED_FILTER)              += af_crossfeed.o
 OBJS-$(CONFIG_CRYSTALIZER_FILTER)            += af_crystalizer.o
 OBJS-$(CONFIG_DCSHIFT_FILTER)                += af_dcshift.o
+OBJS-$(CONFIG_DUMPWAVE_FILTER)               += af_dumpwave.o
 OBJS-$(CONFIG_DYNAUDNORM_FILTER)             += af_dynaudnorm.o
 OBJS-$(CONFIG_EARWAX_FILTER)                 += af_earwax.o
 OBJS-$(CONFIG_EBUR128_FILTER)                += f_ebur128.o
diff --git a/libavfilter/af_dumpwave.c b/libavfilter/af_dumpwave.c
new file mode 100644
index 0000000000..d5fa03d60b
--- /dev/null
+++ b/libavfilter/af_dumpwave.c
@@ -0,0 +1,234 @@ 
+/*
+ * Copyright (c) 2017 Dmytro Humeniuk
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * waveform audio filter – dump RMS amplitude to a file
+ */
+
+#include "libavutil/avassert.h"
+#include "libavutil/avstring.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/opt.h"
+#include "libavutil/parseutils.h"
+#include "avfilter.h"
+#include "formats.h"
+#include "audio.h"
+#include "internal.h"
+
+typedef struct DumpWaveContext {
+    const AVClass *class;   /**< class for AVOptions */
+    int width;              /**< number of data values */
+    int idx;                /**< index of current value */
+    char *filename;         /**< output filename */
+    float *values;          /**< scaling factors */
+    int64_t nb_samples;     /**< samples per value per channel */
+    int64_t count;          /**< current number of samples counted */
+    int64_t frame_size;     /**< samples per value */
+    double sum;             /**< sum of the squared samples per value */
+    double max_value;       /**< keep track of max value */
+    FILE *dump_fp;
+} DumpWaveContext;
+
+#define OFFSET(x) offsetof(DumpWaveContext, x)
+#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+
+static const AVOption dumpwave_options[] = {
+    { "w", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
+    { "width", "set number of data values",  OFFSET(width), AV_OPT_TYPE_INT,  {.i64 = 1800}, 1, INT_MAX, FLAGS },
+    { "n", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
+    { "nb_samples", "set number of samples per value per channel",  OFFSET(nb_samples), AV_OPT_TYPE_INT64,  {.i64 = 128}, 1, INT64_MAX, FLAGS },
+    { "f", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },
+    { "file", "set dump file", OFFSET(filename), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, FLAGS },
+    { NULL }
+};
+
+AVFILTER_DEFINE_CLASS(dumpwave);
+
+static av_cold int init(AVFilterContext *ctx)
+{
+    DumpWaveContext *dumpwave = ctx->priv;
+
+    dumpwave->sum = dumpwave->idx = dumpwave->count = 0;
+
+    if (!dumpwave->filename) {
+        av_log(ctx, AV_LOG_ERROR, "No output file provided\n");
+        return AVERROR(EINVAL);
+    } else if (!strcmp("-", dumpwave->filename)) {
+        dumpwave->dump_fp = stdout;
+    } else {
+        dumpwave->dump_fp = fopen(dumpwave->filename, "w");
+        if (!dumpwave->dump_fp) {
+            int err = AVERROR(errno);
+            char buf[128];
+            av_strerror(err, buf, sizeof(buf));
+            av_log(ctx, AV_LOG_ERROR, "Could not open file %s: %s\n",
+                   dumpwave->filename, buf);
+            return err;
+        }
+    }
+    return 0;
+}
+
+static av_cold void uninit(AVFilterContext *ctx)
+{
+    DumpWaveContext *dumpwave = ctx->priv;
+    fclose(dumpwave->dump_fp);
+    av_freep(&dumpwave->values);
+}
+
+static int query_formats(AVFilterContext *ctx)
+{
+    static const enum AVSampleFormat sample_fmts[] = {
+        AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
+        AV_SAMPLE_FMT_NONE
+    };
+    AVFilterFormats *formats;
+    AVFilterChannelLayouts *layouts;
+    int ret;
+
+    if (!(formats = ff_make_format_list(sample_fmts)))
+        return AVERROR(ENOMEM);
+
+    layouts = ff_all_channel_counts();
+    if (!layouts)
+        return AVERROR(ENOMEM);
+    ret = ff_set_common_channel_layouts(ctx, layouts);
+    if (ret < 0)
+        return ret;
+
+    return ff_set_common_formats(ctx, formats);
+}
+
+static int config_input(AVFilterLink *inlink)
+{
+    DumpWaveContext *dumpwave = inlink->dst->priv;
+    dumpwave->frame_size = dumpwave->nb_samples * inlink->channels;
+
+    return 0;
+}
+
+static int config_output(AVFilterLink *outlink)
+{
+    AVFilterContext *ctx = outlink->src;
+    DumpWaveContext *dumpwave = ctx->priv;
+    dumpwave->values = av_malloc(dumpwave->width * sizeof(float));
+    if (!dumpwave->values)
+        return AVERROR(ENOMEM);
+    memset(dumpwave->values, 0, dumpwave->width * sizeof(float));
+
+    return 0;
+}
+
+static int request_frame(AVFilterLink *outlink) {
+    AVFilterContext *ctx = outlink->src;
+    DumpWaveContext *dumpwave = ctx->priv;
+
+    AVFilterLink *inlink = ctx->inputs[0];
+
+    int ret = ff_request_frame(inlink);
+
+    if (ret == AVERROR_EOF)
+        for (int i = 0; i < dumpwave->width; i++)
+            fprintf(dumpwave->dump_fp, (i == dumpwave->width - 1) ? "%f\n" : "%f,",
+                    av_clipf(dumpwave->values[i] / dumpwave->max_value, 0, 1.0));
+    return ret;
+}
+
+/**
+ * Convert sample to dB and calculate root mean squared value
+ */
+static inline void RMS(DumpWaveContext *dumpwave, const float sample)
+{
+    double value = 0.;
+    if (sample != 0)
+        value = (20. * log10(fabs(sample)) + 60.) / 60.;
+
+    dumpwave->sum += value * value;
+
+    if (dumpwave->count++ == dumpwave->frame_size) {
+        value = av_clipd(sqrt(dumpwave->sum / dumpwave->frame_size), 0, 1.0);
+        dumpwave->max_value = FFMAX(value, dumpwave->max_value);
+        dumpwave->values[dumpwave->idx++] = value;
+        dumpwave->sum = dumpwave->count = 0;
+    }
+}
+
+static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
+{
+    AVFilterContext *ctx = inlink->dst;
+    DumpWaveContext *dumpwave = ctx->priv;
+    int channels = frame->channels;
+    int c, i;
+
+    if (dumpwave->idx < dumpwave->width)
+        switch (inlink->format) {
+            case AV_SAMPLE_FMT_FLTP:
+                for (c = 0; c < channels; c++) {
+                    const float *src = (const float *)frame->extended_data[c];
+
+                    for (i = 0; i < frame->nb_samples; i++, src++)
+                        RMS(dumpwave, *src);
+                }
+                break;
+            case AV_SAMPLE_FMT_FLT: {
+                const float *src = (const float *)frame->extended_data[0];
+
+                for (i = 0; i < frame->nb_samples; i++) {
+                    for (c = 0; c < channels; c++, src++)
+                        RMS(dumpwave, *src);
+                }
+
+            } break;
+        }
+    return ff_filter_frame(inlink->dst->outputs[0], frame);
+}
+
+static const AVFilterPad dumpwave_inputs[] = {
+    {
+        .name         = "default",
+        .type         = AVMEDIA_TYPE_AUDIO,
+        .filter_frame = filter_frame,
+        .config_props  = config_input
+    },
+    { NULL }
+};
+
+static const AVFilterPad dumpwave_outputs[] = {
+    {
+        .name          = "default",
+        .type          = AVMEDIA_TYPE_AUDIO,
+        .request_frame = request_frame,
+        .config_props  = config_output
+    },
+    { NULL }
+};
+
+AVFilter ff_af_dumpwave = {
+    .name          = "dumpwave",
+    .description   = NULL_IF_CONFIG_SMALL("Dump RMS amplitude to a file"),
+    .init          = init,
+    .uninit        = uninit,
+    .query_formats = query_formats,
+    .priv_size     = sizeof(DumpWaveContext),
+    .inputs        = dumpwave_inputs,
+    .outputs       = dumpwave_outputs,
+    .priv_class    = &dumpwave_class,
+};
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 42516bbdf9..2539ee9e9a 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -98,6 +98,7 @@  static void register_all(void)
     REGISTER_FILTER(CROSSFEED,      crossfeed,      af);
     REGISTER_FILTER(CRYSTALIZER,    crystalizer,    af);
     REGISTER_FILTER(DCSHIFT,        dcshift,        af);
+    REGISTER_FILTER(DUMPWAVE,       dumpwave,       af);
     REGISTER_FILTER(DYNAUDNORM,     dynaudnorm,     af);
     REGISTER_FILTER(EARWAX,         earwax,         af);
     REGISTER_FILTER(EBUR128,        ebur128,        af);
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 0f11721822..ca096962bb 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -30,8 +30,8 @@ 
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR   7
-#define LIBAVFILTER_VERSION_MINOR  11
-#define LIBAVFILTER_VERSION_MICRO 101
+#define LIBAVFILTER_VERSION_MINOR  12
+#define LIBAVFILTER_VERSION_MICRO 100
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                                LIBAVFILTER_VERSION_MINOR, \
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 05f4ca5e20..60f1b3e786 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -243,6 +243,15 @@  refcmp_metadata(){
         -f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
 }
 
+refcmp_dumpwave(){
+    src=$1
+    size=$2
+    fuzz=${3:-1}
+    ffmpeg $FLAGS $DEC_OPTS -i ${src} \
+    -af "dumpwave=n=${size}:f=-" \
+    -f null /dev/null | tr ',.' '\n=' | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
+}
+
 video_filter(){
     filters=$1
     shift
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index bd8b3d3c35..b9dcc90ac2 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -340,6 +340,18 @@  fate-filter-hdcd-s32p: CMD = md5 -i $(SRC) -af hdcd -f s32le
 fate-filter-hdcd-s32p: CMP = oneline
 fate-filter-hdcd-s32p: REF = 0c5513e83eedaa10ab6fac9ddc173cf5
 
+FATE_AFILTER-$(call FILTERDEMDEC, DUMPWAVE, WAV, PCM_S16LE) += fate-filter-dumpwave
+fate-filter-dumpwave: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-dumpwave: CMD = refcmp_dumpwave $(SRC) 147 0.000010
+
+FATE_AFILTER-$(call FILTERDEMDEC, DUMPWAVE, TRUEHD, TRUEHD) += fate-filter-dumpwave-fltp
+fate-filter-dumpwave-fltp: SRC = $(TARGET_SAMPLES)/audiomatch/tones_afconvert_44100_stereo_aac_he2.m4a
+fate-filter-dumpwave-fltp: CMD = refcmp_dumpwave $(SRC) 52 0.000015
+
+FATE_AFILTER-$(call FILTERDEMDEC, DUMPWAVE, FLAC, FLAC) += fate-filter-dumpwave-24bit
+fate-filter-dumpwave-24bit: SRC = $(TARGET_SAMPLES)/lossless-audio/master_audio_2.0_24bit.wma
+fate-filter-dumpwave-24bit: CMD = refcmp_dumpwave $(SRC) 51 0.000012
+
 FATE_AFILTER-yes += fate-filter-formats
 fate-filter-formats: libavfilter/tests/formats$(EXESUF)
 fate-filter-formats: CMD = run libavfilter/tests/formats
diff --git a/tests/ref/fate/filter-dumpwave b/tests/ref/fate/filter-dumpwave
new file mode 100644
index 0000000000..9ff02a6428
--- /dev/null
+++ b/tests/ref/fate/filter-dumpwave
@@ -0,0 +1,1800 @@ 
+0=824713
+0=836494
+0=825428
+0=824060
+0=835604
+0=826313
+0=823901
+0=833144
+0=828954
+0=824104
+0=829610
+0=832018
+0=824678
+0=827427
+0=833274
+0=825691
+0=826063
+0=833246
+0=827138
+0=825129
+0=831745
+0=829414
+0=824635
+0=828717
+0=833131
+0=824515
+0=825745
+0=835551
+0=824762
+0=825481
+0=836432
+0=825483
+0=823315
+0=836010
+0=826669
+0=823132
+0=834015
+0=828911
+0=823107
+0=830483
+0=832162
+0=823610
+0=828233
+0=833608
+0=824550
+0=826681
+0=833674
+0=826003
+0=825739
+0=832841
+0=827991
+0=825183
+0=829525
+0=831461
+0=825033
+0=826088
+0=834779
+0=825269
+0=824212
+0=836058
+0=825893
+0=823233
+0=836044
+0=827084
+0=822411
+0=834705
+0=828903
+0=822325
+0=831550
+0=832031
+0=822594
+0=828754
+0=834174
+0=823346
+0=827171
+0=834582
+0=824762
+0=826097
+0=833716
+0=826493
+0=825521
+0=832286
+0=829235
+0=825318
+0=827169
+0=833501
+0=825497
+0=825067
+0=835384
+0=826105
+0=823294
+0=835794
+0=827138
+0=822466
+0=834867
+0=828914
+0=821995
+0=832229
+0=831767
+0=822020
+0=829257
+0=834446
+0=822624
+0=827395
+0=835379
+0=823484
+0=826304
+0=834958
+0=825499
+0=825631
+0=833075
+0=827498
+0=825395
+0=829181
+0=831935
+0=825538
+0=825936
+0=834287
+0=826054
+0=824192
+0=835167
+0=827070
+0=822906
+0=834753
+0=828585
+0=822224
+0=832633
+0=831274
+0=822082
+0=829433
+0=834421
+0=822216
+0=827524
+0=835770
+0=823219
+0=826257
+0=835786
+0=824168
+0=825569
+0=834507
+0=826952
+0=825268
+0=831121
+0=829681
+0=825360
+0=827472
+0=833150
+0=825853
+0=825405
+0=834210
+0=826736
+0=823965
+0=834163
+0=828219
+0=823060
+0=832808
+0=830389
+0=822496
+0=829672
+0=833834
+0=822671
+0=827330
+0=835856
+0=822881
+0=826048
+0=836287
+0=823811
+0=825254
+0=835412
+0=825462
+0=824933
+0=833021
+0=828347
+0=824985
+0=829122
+0=831754
+0=825411
+0=826752
+0=833384
+0=826276
+0=825227
+0=833596
+0=827575
+0=824135
+0=832481
+0=829677
+0=823489
+0=829686
+0=833066
+0=823234
+0=827012
+0=835562
+0=824716
+0=825499
+0=836463
+0=824052
+0=824712
+0=836053
+0=825668
+0=824331
+0=834114
+0=827550
+0=824364
+0=830369
+0=831171
+0=824776
+0=827937
+0=832893
+0=825551
+0=826238
+0=833315
+0=826839
+0=825152
+0=832631
+0=828643
+0=824462
+0=829905
+0=831817
+0=824162
+0=827330
+0=835030
+0=824250
+0=824973
+0=836330
+0=824711
+0=824560
+0=836326
+0=825740
+0=823491
+0=835011
+0=827545
+0=823451
+0=831829
+0=830534
+0=823834
+0=828799
+0=832919
+0=824619
+0=827071
+0=833590
+0=825789
+0=825864
+0=832896
+0=827583
+0=825162
+0=831336
+0=830119
+0=824830
+0=827172
+0=834013
+0=824880
+0=826167
+0=835928
+0=825349
+0=823540
+0=836332
+0=826227
+0=822945
+0=835420
+0=827831
+0=822566
+0=832875
+0=830421
+0=822813
+0=829639
+0=833200
+0=823475
+0=827625
+0=834167
+0=824539
+0=826400
+0=834045
+0=826156
+0=825602
+0=832023
+0=828635
+0=825248
+0=828054
+0=832779
+0=825267
+0=825381
+0=835146
+0=825660
+0=823875
+0=836016
+0=826540
+0=822652
+0=835587
+0=827903
+0=822192
+0=833525
+0=830375
+0=822106
+0=830173
+0=833515
+0=822478
+0=828093
+0=834873
+0=823588
+0=807679
+0=832758
+0=845901
+0=838234
+0=824826
+0=821727
+0=833420
+0=831204
+0=819857
+0=822333
+0=828943
+0=833602
+0=836239
+0=823254
+0=825184
+0=830914
+0=833152
+0=819845
+0=826346
+0=829342
+0=829812
+0=834948
+0=822844
+0=827243
+0=830042
+0=833120
+0=822461
+0=832665
+0=829938
+0=823505
+0=831995
+0=824883
+0=828929
+0=827465
+0=830454
+0=828869
+0=829441
+0=828687
+0=825792
+0=825534
+0=831786
+0=827401
+0=828518
+0=824201
+0=835049
+0=826093
+0=828691
+0=830435
+0=825434
+0=831118
+0=827483
+0=829513
+0=826767
+0=826669
+0=827010
+0=828877
+0=828658
+0=833404
+0=826415
+0=828336
+0=827704
+0=830553
+0=827867
+0=833043
+0=828870
+0=828767
+0=825718
+0=830430
+0=828926
+0=828511
+0=823706
+0=828209
+0=826576
+0=827226
+0=828840
+0=831177
+0=826671
+0=828063
+0=828448
+0=831527
+0=832124
+0=829561
+0=828394
+0=828758
+0=825850
+0=829836
+0=827294
+0=827792
+0=826723
+0=828506
+0=826223
+0=824863
+0=821319
+0=830490
+0=826487
+0=829876
+0=827071
+0=828760
+0=829973
+0=824724
+0=829631
+0=829469
+0=828403
+0=828887
+0=828358
+0=827968
+0=828677
+0=828797
+0=832920
+0=827751
+0=826622
+0=827771
+0=830324
+0=827317
+0=831077
+0=827135
+0=827741
+0=829584
+0=830074
+0=827912
+0=830567
+0=826160
+0=829930
+0=827662
+0=828260
+0=829672
+0=827494
+0=828671
+0=829424
+0=828924
+0=835833
+0=825353
+0=829051
+0=829085
+0=829071
+0=826121
+0=828028
+0=828063
+0=829834
+0=828848
+0=828001
+0=828558
+0=829316
+0=828389
+0=825677
+0=825782
+0=828510
+0=828591
+0=828890
+0=827116
+0=831236
+0=828815
+0=829912
+0=828992
+0=827963
+0=829399
+0=829715
+0=826767
+0=829244
+0=826276
+0=831629
+0=828400
+0=827019
+0=846009
+0=827517
+0=827446
+0=829167
+0=828056
+0=827422
+0=828760
+0=830776
+0=827353
+0=827269
+0=828299
+0=830804
+0=827898
+0=829006
+0=827864
+0=831547
+0=829355
+0=828103
+0=829353
+0=828739
+0=829176
+0=828768
+0=828085
+0=830323
+0=834475
+0=827281
+0=829466
+0=829737
+0=827968
+0=829235
+0=829616
+0=827988
+0=828080
+0=828529
+0=826965
+0=829097
+0=827944
+0=829234
+0=825369
+0=827880
+0=827049
+0=829290
+0=827330
+0=828476
+0=828912
+0=828194
+0=828029
+0=828367
+0=827998
+0=830111
+0=826484
+0=827909
+0=831675
+0=823444
+0=826577
+0=851884
+0=851253
+0=826948
+0=823042
+0=831610
+0=828220
+0=826573
+0=829420
+0=827029
+0=826651
+0=830314
+0=827825
+0=828047
+0=828714
+0=827486
+0=827645
+0=829441
+0=828369
+0=828381
+0=828673
+0=828549
+0=823670
+0=828222
+0=829183
+0=826012
+0=829493
+0=828342
+0=827954
+0=831691
+0=826571
+0=829680
+0=827076
+0=829309
+0=827886
+0=829528
+0=826691
+0=828621
+0=827689
+0=828158
+0=827498
+0=827886
+0=829785
+0=828749
+0=828439
+0=829434
+0=804690
+0=831404
+0=830026
+0=826814
+0=828947
+0=828761
+0=828400
+0=828949
+0=829409
+0=828153
+0=829825
+0=828828
+0=828819
+0=828555
+0=829293
+0=827703
+0=828321
+0=828114
+0=830936
+0=832720
+0=827978
+0=829719
+0=827841
+0=828720
+0=827590
+0=830485
+0=828187
+0=827580
+0=828146
+0=829508
+0=829404
+0=829341
+0=827336
+0=829380
+0=826851
+0=826628
+0=768180
+0=787571
+0=805210
+0=779217
+0=791471
+0=783526
+0=779731
+0=778912
+0=778940
+0=774108
+0=785830
+0=776888
+0=787092
+0=779067
+0=795728
+0=789099
+0=777030
+0=765784
+0=783062
+0=781050
+0=784287
+0=807812
+0=773561
+0=762505
+0=769473
+0=755651
+0=776867
+0=794793
+0=795090
+0=762953
+0=785230
+0=774152
+0=786401
+0=789144
+0=784995
+0=787514
+0=788021
+0=788567
+0=793192
+0=788149
+0=772176
+0=782433
+0=792908
+0=780921
+0=788482
+0=793462
+0=792531
+0=792874
+0=774784
+0=788625
+0=775557
+0=788330
+0=788195
+0=797677
+0=792909
+0=779301
+0=804506
+0=758956
+0=784072
+0=776451
+0=793550
+0=754527
+0=786744
+0=771059
+0=790982
+0=784901
+0=781898
+0=798241
+0=783798
+0=781142
+0=770487
+0=787604
+0=766027
+0=768224
+0=777160
+0=805029
+0=796685
+0=772947
+0=794081
+0=776281
+0=777476
+0=775038
+0=790958
+0=789942
+0=781881
+0=770143
+0=781131
+0=781693
+0=792957
+0=791689
+0=801173
+0=766312
+0=795903
+0=783324
+0=765790
+0=767969
+0=795156
+0=777345
+0=794897
+0=791492
+0=766243
+0=789287
+0=767587
+0=775792
+0=770022
+0=797729
+0=768568
+0=780550
+0=783389
+0=773479
+0=779061
+0=761783
+0=779974
+0=797270
+0=796186
+0=772953
+0=791541
+0=769254
+0=786664
+0=784919
+0=772198
+0=770196
+0=779742
+0=769250
+0=791960
+0=785956
+0=781518
+0=784169
+0=800683
+0=790195
+0=800395
+0=768227
+0=790383
+0=787723
+0=792108
+0=781892
+0=791797
+0=794240
+0=795643
+0=782601
+0=792907
+0=781655
+0=792525
+0=792264
+0=787882
+0=772522
+0=799622
+0=779597
+0=765720
+0=898600
+0=958203
+0=969008
+0=971050
+0=948607
+0=975215
+0=976717
+0=964028
+0=974475
+0=986066
+0=974158
+0=966265
+0=945112
+0=971755
+0=960580
+0=967360
+0=989716
+0=993119
+0=975423
+0=964560
+0=990898
+0=970927
+0=981310
+0=969310
+0=963654
+0=968231
+0=978391
+0=978674
+0=962900
+0=957737
+0=949883
+0=975287
+0=969320
+0=981096
+0=967428
+0=962277
+0=988736
+0=965942
+0=969544
+0=978327
+0=971183
+0=971561
+0=955862
+0=963205
+0=958212
+0=958793
+0=972081
+0=968635
+0=966267
+0=978997
+0=966114
+0=975850
+0=984185
+0=980326
+0=992522
+0=981875
+0=960001
+0=982048
+0=970918
+0=966708
+0=955842
+0=977851
+0=987260
+0=984555
+0=981376
+0=965924
+0=973230
+0=957210
+0=986907
+0=967033
+0=998863
+0=951828
+0=971206
+0=956956
+0=962391
+0=971464
+0=968171
+0=973145
+0=985079
+0=977878
+0=966492
+0=977089
+0=982652
+0=962583
+0=962786
+0=982820
+0=972458
+0=953460
+0=979750
+0=963521
+0=974605
+0=986349
+0=970416
+0=983391
+0=972795
+0=971330
+0=989825
+0=966466
+0=966456
+0=968458
+0=987607
+0=985040
+0=962080
+0=978616
+0=982024
+0=954487
+0=965447
+0=977020
+0=981027
+0=964041
+0=980185
+0=974881
+0=960906
+0=985900
+0=961117
+0=974484
+0=963251
+0=972246
+0=972540
+0=989015
+0=961761
+0=973984
+0=957154
+0=976602
+0=935132
+0=991384
+0=975965
+0=976788
+0=950601
+0=960536
+0=978050
+0=973021
+0=967748
+0=987574
+0=968024
+0=962597
+0=968875
+0=981262
+0=964487
+0=972034
+0=986382
+0=974452
+0=953045
+0=984896
+0=964190
+0=990139
+1=000000
+0=968265
+0=961641
+0=969249
+0=828633
+0=828975
+0=827590
+0=829446
+0=829004
+0=826740
+0=829787
+0=827436
+0=828054
+0=829965
+0=828053
+0=827251
+0=830556
+0=827031
+0=829032
+0=828806
+0=827160
+0=830407
+0=826292
+0=830495
+0=825979
+0=831061
+0=827399
+0=829224
+0=828151
+0=827881
+0=827365
+0=831360
+0=825168
+0=830735
+0=825253
+0=830098
+0=831157
+0=828787
+0=834779
+0=829343
+0=831097
+0=828375
+0=828209
+0=830786
+0=827098
+0=827546
+0=828497
+0=829739
+0=826432
+0=829397
+0=829940
+0=825244
+0=830240
+0=829071
+0=827113
+0=827481
+0=829080
+0=828244
+0=829047
+0=827420
+0=827385
+0=828607
+0=829125
+0=829090
+0=829259
+0=827938
+0=826984
+0=827859
+0=827897
+0=828158
+0=827818
+0=829623
+0=827863
+0=829010
+0=828474
+0=827453
+0=828174
+0=830110
+0=827617
+0=827074
+0=828368
+0=828727
+0=827859
+0=829200
+0=829032
+0=829779
+0=828827
+0=827797
+0=828546
+0=828514
+0=828597
+0=828019
+0=825839
+0=830818
+0=830634
+0=828577
+0=828632
+0=827963
+0=827773
+0=828257
+0=827778
+0=830072
+0=828885
+0=828019
+0=828013
+0=828126
+0=829659
+0=827290
+0=827688
+0=830544
+0=828509
+0=826998
+0=828635
+0=829392
+0=828513
+0=827737
+0=829766
+0=829377
+0=828336
+0=829298
+0=827000
+0=828547
+0=829795
+0=826440
+0=830167
+0=827110
+0=828217
+0=829066
+0=828750
+0=829395
+0=825810
+0=831530
+0=825576
+0=830971
+0=826330
+0=830852
+0=818968
+0=830018
+0=827341
+0=828250
+0=828999
+0=828425
+0=829854
+0=827135
+0=829476
+0=828009
+0=826841
+0=829919
+0=826349
+0=828222
+0=830507
+0=826850
+0=829168
+0=827334
+0=826887
+0=830475
+0=829541
+0=826793
+0=826977
+0=829063
+0=828051
+0=830291
+0=826899
+0=828941
+0=829134
+0=829257
+0=828076
+0=827105
+0=828526
+0=827257
+0=832841
+0=830720
+0=827027
+0=827415
+0=827945
+0=827393
+0=830044
+0=829004
+0=828786
+0=829814
+0=827970
+0=827517
+0=829038
+0=828765
+0=828461
+0=828721
+0=828167
+0=828438
+0=828044
+0=827704
+0=828487
+0=828711
+0=828388
+0=826896
+0=829897
+0=826786
+0=829717
+0=827846
+0=832228
+0=829500
+0=828101
+0=829589
+0=828545
+0=826308
+0=827763
+0=829509
+0=828806
+0=828134
+0=828043
+0=828083
+0=831631
+0=828206
+0=825912
+0=827893
+0=830964
+0=827237
+0=828798
+0=826831
+0=831194
+0=825525
+0=827852
+0=831271
+0=824462
+0=827330
+0=830550
+0=827150
+0=829315
+0=829490
+0=826902
+0=830134
+0=826501
+0=829455
+0=829443
+0=827621
+0=828501
+0=828237
+0=830242
+0=826398
+0=831190
+0=826525
+0=828713
+0=828495
+0=828902
+0=826165
+0=830709
+0=828595
+0=828089
+0=829991
+0=826473
+0=830967
+0=826669
+0=827851
+0=828430
+0=828488
+0=832604
+0=828278
+0=827484
+0=831295
+0=828165
+0=827364
+0=827998
+0=830292
+0=827750
+0=827043
+0=829364
+0=829314
+0=826528
+0=829223
+0=829128
+0=829351
+0=827883
+0=826832
+0=826700
+0=828587
+0=831325
+0=828623
+0=825264
+0=829579
+0=827462
+0=829857
+0=828099
+0=829919
+0=826829
+0=829848
+0=829417
+0=825359
+0=827279
+0=828431
+0=827694
+0=829030
+0=827653
+0=828248
+0=827623
+0=828880
+0=830796
+0=828858
+0=824991
+0=830041
+0=828434
+0=827362
+0=830333
+0=827500
+0=818002
+0=650152
+0=603187
+0=594715
+0=596728
+0=603095
+0=607414
+0=625697
+0=627437
+0=635532
+0=652778
+0=654270
+0=657409
+0=676480
+0=675552
+0=677501
+0=691884
+0=694174
+0=691481
+0=702665
+0=708868
+0=703115
+0=709216
+0=719085
+0=710703
+0=713287
+0=723647
+0=715061
+0=714048
+0=723670
+0=716606
+0=711759
+0=718615
+0=715589
+0=706615
+0=709133
+0=711495
+0=697679
+0=697665
+0=700657
+0=685899
+0=681944
+0=685541
+0=668851
+0=663889
+0=662647
+0=649750
+0=639236
+0=634993
+0=625106
+0=613827
+0=603022
+0=601251
+0=589880
+0=599393
+0=639364
+0=609054
+0=631997
+0=603159
+0=593049
+0=593817
+0=607815
+0=619537
+0=618083
+0=635035
+0=648255
+0=646333
+0=656907
+0=674077
+0=668509
+0=676966
+0=691539
+0=687058
+0=690878
+0=705091
+0=701320
+0=702740
+0=711968
+0=713393
+0=709236
+0=715137
+0=721624
+0=714155
+0=715707
+0=724479
+0=714329
+0=713562
+0=722551
+0=712282
+0=708742
+0=715527
+0=707375
+0=700093
+0=702919
+0=699467
+0=689683
+0=686215
+0=687082
+0=672740
+0=667612
+0=666954
+0=654736
+0=642538
+0=642944
+0=629883
+0=616503
+0=611330
+0=604445
+0=589969
+0=594095
+0=611289
+0=648941
+0=647681
+0=614498
+0=589683
+0=592996
+0=606560
+0=607747
+0=614619
+0=636944
+0=635718
+0=643146
+0=658632
+0=663951
+0=664603
+0=676854
+0=685700
+0=684034
+0=690760
+0=702740
+0=697628
+0=701532
+0=712943
+0=709204
+0=708281
+0=719118
+0=716396
+0=712664
+0=718774
+0=721928
+0=713647
+0=716902
+0=722474
+0=711463
+0=711237
+0=717474
+0=706694
+0=702877
+0=708450
+0=697928
+0=691404
+0=692526
+0=687486
+0=674734
+0=673402
+0=671949
+0=655923
+0=647459
+0=651327
+0=630040
+0=621305
+0=622337
+0=604898
+0=592119
+0=598490
+0=598012
+0=631633
+0=613269
+0=637996
+0=596329
+0=594216
+0=599277
+0=602047
+0=613400
+0=628947
+0=629017
+0=641367
+0=654310
+0=657165
+0=662350
+0=676110
+0=678865
+0=681653
+0=689327
+0=698920
+0=694694
+0=700911
+0=711852
+0=705927
+0=707700
+0=720340
+0=712533
+0=712446
+0=723155
+0=716987
+0=713607
+0=721128
+0=718895
+0=711628
+0=714710
+0=717713
+0=707054
+0=704989
+0=711452
+0=697978
+0=693496
+0=699011
+0=686536
+0=676846
+0=682598
+0=670047
+0=658107
+0=658116
+0=650961
+0=632455
+0=632148
+0=624424
+0=606772
+0=602922
+0=600593
+0=589659
+0=605437
+0=651853
+0=644894
+0=607547
+0=597557
+0=593797
+0=601977
+0=607835
+0=622434
+0=625829
+0=635334
+0=650666
+0=652636
+0=657055
+0=675504
+0=673724
+0=677031
+0=692113
+0=692057
+0=690913
+0=704036
+0=706413
+0=702471
+0=710150
+0=717847
+0=709939
+0=713998
+0=723398
+0=714166
+0=714626
+0=724399
+0=715465
+0=712254
+0=720638
+0=713866
+0=707020
+0=711040
+0=710640
+0=698010
+0=699075
+0=701067
+0=686127
+0=683281
+0=686939
+0=668922
+0=665133
+0=665133
+0=649619
+0=640439
+0=639263
+0=623962
+0=614825
+0=606600
+0=600790
+0=590391
+0=597384
+0=629934
+0=612794
+0=637389
+0=605436
+0=592250
+0=593766
+0=606874
+0=616885
+0=617075
+0=634730
+0=645470
+0=645144
+0=656590
+0=672275
+0=667178
+0=676492
+0=690819
+0=685604
+0=690330
+0=705479
+0=699555
+0=701897
+0=713963
+0=711021
+0=708849
+0=716800
+0=719788
+0=713805
+0=716784
+0=723852
+0=713900
+0=714382
+0=722926
+0=711697
+0=709365
+0=717025
+0=706470
+0=700477
+0=706142
+0=697736
+0=689344
+0=689518
+0=686751
+0=672911
+0=670073
+0=667733
+0=654929
+0=644993
+0=644637
+0=629947
+0=618884
+0=613599
+0=604071
+0=591591
+0=594720
+0=604830
+0=652804
+0=643875
+0=618896
+0=590671
+0=592497
+0=605527
+0=606194
+0=612937
+0=636421
+0=633488
+0=641504
+0=659307
+0=661223
+0=663082
+0=677697
+0=683504
+0=682617
+0=691274
+0=701617
+0=696178
+0=701861
+0=712770
+0=707428
+0=708749
+0=720021
+0=714585
+0=712747
+0=721085
+0=719554
+0=713504
+0=718429
+0=721627
+0=711194
+0=712434
+0=717714
+0=706253
+0=703998
+0=709668
+0=697182
+0=692556
+0=694885
+0=686032
+0=676261
+0=676225
+0=670327
+0=657960
+0=649837
+0=651260
+0=631849
+0=623263
+0=623312
+0=606489
+0=593319
+0=599977
+0=594806
+0=620507
+0=614542
+0=646242
+0=599441
+0=595160
+0=597929
+0=599853
+0=612970
+0=627371
+0=626544
+0=640746
+0=653680
+0=654598
+0=661713
+0=676589
+0=676006
+0=681004
+0=691190
+0=695531
+0=693976
+0=701782
+0=710214
+0=705144
+0=708251
+0=719777
+0=711621
+0=712817
+0=723704
+0=715758
+0=713853
+0=722969
+0=717090
+0=711806
+0=717009
+0=716146
+0=707176
+0=706736
+0=711137
+0=698080
+0=694967
+0=699647
+0=686650
+0=678224
+0=684045
+0=670219
+0=659382
+0=660810
+0=650813
+0=633677
+0=634527
+0=625384
+0=607705
+0=604425
+0=602144
+0=588241
+0=602358
+0=640337
+0=652672
+0=615042
+0=599240
+0=591482
+0=600823
+0=609381
+0=618119
+0=624214
+0=635562
+0=648034
+0=651051
+0=657043
+0=673992
+0=672034
+0=676835
+0=691720
+0=690220
+0=690596
+0=705124
+0=703913
+0=702057
+0=711324
+0=716062
+0=709409
+0=714850
+0=722683
+0=713520
+0=715410
+0=724539
+0=714637
+0=712965
+0=721784
+0=712729
+0=707643
+0=713639
+0=708779
+0=698579
+0=700947
+0=700687
+0=686621
+0=684408
+0=688154
+0=669318
+0=666069
+0=667454
+0=649895
+0=641523
+0=642661
+0=623775
+0=615865
+0=610867
+0=599708
+0=590076
+0=596896
+0=621421
+0=623214
+0=634432
+0=607868
+0=591573
+0=593987
+0=605556
+0=614365
+0=616214
+0=634818
+0=642097
+0=644248
+0=656730
+0=669659
+0=666141
+0=676271
+0=689472
+0=684445
+0=690078
+0=705130
+0=698156
+0=701634
+0=714659
+0=709287
+0=708537
+0=719078
+0=717164
+0=712823
+0=718971
+0=722645
+0=713631
+0=715434
+0=722789
+0=711391
+0=710147
+0=717895
+0=705986
+0=701130
+0=708254
+0=696784
+0=689844
+0=692710
+0=685593
+0=673183
+0=672721
+0=668142
+0=654584
+0=648190
+0=646007
+0=629544
+0=621942
+0=615664
+0=604410
+0=592839
+0=595412
+0=600888
+0=644187
+0=647795
+0=626200
+0=591502
+0=592368
+0=603512
+0=605184
+0=611597
+0=635108
+0=631597
+0=640182
+0=659114
+0=659076
+0=661740
+0=679008
+0=680617
+0=681336
+0=692042
+0=700006
+0=694923
+0=702292
+0=712181
+0=706179
+0=709004
+0=720389
+0=713175
+0=712885
+0=722619
+0=717656
+0=713590
+0=720617
+0=719788
+0=711203
+0=713926
+0=717449
+0=705980
+0=705292
+0=710428
+0=696721
+0=693761
+0=696667
+0=685286
+0=677550
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
diff --git a/tests/ref/fate/filter-dumpwave-24bit b/tests/ref/fate/filter-dumpwave-24bit
new file mode 100644
index 0000000000..22edfaadcd
--- /dev/null
+++ b/tests/ref/fate/filter-dumpwave-24bit
@@ -0,0 +1,1800 @@ 
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=224302
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+0=841745
+0=788047
+0=748917
+0=720293
+0=688079
+0=656733
+0=638894
+0=634215
+0=630093
+0=631210
+0=633098
+0=651759
+0=658466
+0=652880
+0=662558
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+0=844392
+0=765081
+0=762103
+0=707079
+0=679771
+0=675042
+0=663191
+0=700414
+0=757438
+0=725194
+0=705868
+0=687268
+0=691135
+0=750347
+0=723829
+0=682688
+0=666682
+0=664180
+0=675279
+0=676935
+0=654239
+0=664039
+0=663011
+0=647605
+0=642384
+0=647789
+0=671352
+0=673537
+0=691387
+0=714801
+0=736264
+0=738198
+0=712065
+0=718203
+0=717840
+0=769580
+0=737699
+0=707247
+0=697584
+0=671126
+0=642209
+0=660227
+0=660507
+0=688137
+0=767453
+0=799177
+0=734205
+0=710574
+0=671055
+0=731670
+0=827303
+0=831449
+0=964008
+0=990753
+0=935534
+0=698339
+0=692149
+0=688286
+0=699028
+0=688225
+0=707303
+0=691346
+0=698947
+0=699622
+0=706657
+0=723386
+0=721420
+0=726225
+0=736428
+0=742754
+0=718415
+0=725973
+0=723311
+0=715160
+0=726739
+0=712333
+0=709311
+0=644005
+0=667798
+0=686012
+0=722711
+0=931965
+0=866032
+0=749760
+0=698270
+0=640944
+0=689757
+0=753800
+0=791440
+0=925562
+0=799456
+1=000000
+0=919873
+0=817269
+0=677215
+0=758001
+0=763341
+0=784855
+0=771223
+0=761722
+0=736243
+0=743542
+0=757208
+0=755877
+0=753123
+0=764066
+0=769388
+0=804547
+0=804305
+0=795622
+0=798916
+0=767507
+0=774637
+0=764732
+0=714243
+0=671109
+0=729271
+0=799450
+0=909180
+1=000000
+0=894119
+0=709049
+0=662739
+0=680415
+0=713906
+0=772539
+0=906828
+0=899995
+0=920487
+1=000000
+0=810841
+0=684986
+0=711258
+0=725620
+0=776792
+0=745277
+0=761995
+0=767798
+0=739816
+0=757500
+0=738110
+0=792096
+0=846678
+0=838788
+0=948339
+0=982073
+0=952408
+0=832683
+0=813362
+0=842852
+0=797106
+0=803256
+0=764264
+0=790589
+0=856282
+1=000000
+0=999174
+0=901788
+0=777854
+0=773426
+0=738647
+0=703269
+0=780736
+0=988676
+1=000000
+1=000000
+1=000000
+0=833610
+0=763349
+0=726852
+0=739021
+0=908965
+0=885340
+1=000000
+0=881319
+0=799549
+0=857412
+0=837212
+0=867977
+0=892579
+0=894092
+0=856737
+0=877661
+0=854919
+0=803554
+0=813056
+0=807427
+0=787018
+0=777809
+0=845759
+0=846430
+0=869370
+1=000000
+1=000000
+0=978480
+0=806175
+0=816200
+0=825170
+0=763962
+0=822614
+1=000000
+0=955709
+1=000000
+0=920265
+0=764339
+0=771021
+0=749014
+0=783016
+0=910570
+1=000000
+1=000000
+0=930078
+0=752214
+0=782371
+0=973670
+0=903115
+0=920444
+0=912696
+0=888486
+0=925196
+0=893076
+0=901428
+0=857528
+0=899964
+0=863507
+0=861074
+0=844177
+0=852677
+0=902875
+0=900525
+0=958217
+0=890276
+0=946505
+0=944610
+0=811391
+0=746645
+0=904529
+0=865012
+0=973616
+1=000000
+0=873728
+0=743539
+0=739248
+0=735495
+0=941765
+0=916189
+0=956666
+0=871292
+0=942754
+0=786919
+0=759121
+0=763417
+0=736012
+0=855912
+0=915690
+0=880190
+0=978250
+0=994537
+0=897972
+0=948645
+1=000000
+0=946789
+0=967859
+0=868263
+0=891167
+0=868412
+0=923960
+0=930740
+0=949476
+0=968820
+0=942560
+0=997686
+0=955536
+0=991766
+1=000000
+0=978315
+1=000000
+0=948582
+0=763077
+0=738243
+0=791407
+0=851858
+0=938881
+0=933761
+0=864582
+0=971071
+1=000000
+0=997599
+0=942161
+0=760131
+0=925148
+1=000000
+1=000000
+0=969989
+0=983823
+0=948713
+0=915842
+0=994454
+0=895032
+0=880687
+0=852227
+0=833531
+0=848224
+0=882641
+0=957190
+0=968869
+1=000000
+1=000000
+0=992307
+0=967208
+0=979524
+0=977865
+0=959268
+0=967298
+0=989030
+0=832418
+0=772989
+0=765857
+0=831373
+0=982342
+0=980518
+1=000000
+0=975839
+0=900911
+0=820326
+0=980271
+1=000000
+0=892618
+0=973388
+1=000000
+0=998069
+1=000000
+0=872368
+0=903706
+0=967277
+0=949791
+0=952947
+0=904188
+0=944787
+0=954079
+0=926660
+0=982137
+0=955253
+0=992198
+0=961992
+0=990132
+0=966033
+0=959110
+0=957259
+0=856759
+0=890691
+0=940475
+0=985574
+0=860379
+0=849068
+0=959235
+0=844167
+0=874377
+0=848563
+0=840440
+0=948905
+0=906866
+0=958252
+0=989144
+0=848357
+0=968794
+0=980987
+0=894828
+0=911726
+0=881825
+0=856113
+0=959623
+0=896656
+0=972501
+0=939894
+0=982672
+0=959736
+0=961141
+1=000000
+0=994292
+0=995982
+0=947090
+1=000000
+1=000000
+0=992761
+0=978781
+0=985234
+0=957014
+0=961768
+0=948226
+0=914261
+0=932501
+0=933892
+0=978484
+0=967140
+0=832748
+0=745884
+0=917392
+1=000000
+0=894209
+0=883887
+0=822313
+0=972362
+1=000000
+0=886391
+0=928341
+0=821172
+0=863261
+1=000000
+0=832096
+0=909564
+0=973634
+0=974417
+0=922031
+0=956091
+0=954641
+0=922537
+0=929884
+0=944048
+0=966920
+0=981914
+0=971320
+0=951493
+1=000000
+0=979823
+0=972921
+0=942573
+0=967899
+0=952465
+0=907230
+0=931029
+0=969490
+0=941927
+0=809856
+0=964684
+0=944925
+0=989618
+0=874620
+0=967000
+0=981291
+1=000000
+0=883393
+0=891833
+0=863094
+1=000000
+0=971085
+0=979232
+0=959368
+0=982586
+0=884528
+0=882526
+1=000000
+0=906835
+0=993183
+1=000000
+1=000000
+0=982826
+0=997459
+0=991041
+1=000000
+0=958453
+0=945851
+0=960850
+0=910385
+0=847791
+0=890285
+0=961240
+0=957250
+0=985075
+0=951963
+0=927003
+0=952378
+0=919249
+1=000000
+0=901805
+1=000000
+1=000000
+0=814169
+0=916923
+1=000000
+1=000000
+0=952165
+0=902322
+0=908002
+0=948014
+0=858024
+0=761607
+0=833539
+0=950271
+0=978927
+0=993227
+0=792331
+0=931884
+0=972283
+0=983334
+0=958172
+0=942749
+0=952302
+0=987334
+0=947250
+0=958788
+0=951924
+0=960742
+0=940217
+0=961246
+0=976297
+0=987047
+0=931444
+0=967859
+0=955151
+0=971760
+0=970895
+0=943685
+0=958568
+0=817709
+0=786615
+0=789430
+0=948780
+0=882037
+0=712753
+0=841486
+0=929263
+1=000000
+0=735648
+0=753999
+0=862883
+1=000000
+0=938782
+0=801265
+0=926550
+1=000000
+0=750665
+0=948961
+0=951378
+0=967976
+0=991725
+1=000000
+0=954079
+0=961090
+1=000000
+0=978406
+0=961082
+0=978406
+0=985876
+0=995996
+0=994075
+0=999286
+0=941232
+0=981213
+0=953664
+0=955501
+0=966355
+0=748529
+0=764968
+0=808405
+0=955742
+0=696660
+0=756588
+0=799144
+1=000000
+0=853078
+0=990571
+0=884054
+0=956468
+0=908133
+0=789570
+0=847777
+0=970647
+0=812663
+0=768222
+0=735423
+0=779359
+0=968791
+0=987127
+0=957957
+0=925199
+0=957934
+0=952264
+0=945846
+0=954571
+0=936280
+0=964646
+0=992989
+0=950365
+0=932901
+0=915224
+0=888636
+0=956748
+1=000000
+1=000000
+1=000000
+0=922857
+0=923174
+0=770231
+0=946888
+0=968871
+0=965949
+1=000000
+1=000000
+1=000000
+0=975505
+0=845332
+0=825614
+0=838105
+0=990704
+0=867669
+0=839457
+0=802678
+0=850867
+0=963496
+0=860189
+0=978255
+0=959337
+0=953877
+0=955596
+0=962588
+0=983066
+0=960229
+0=936067
+0=981828
+0=984295
+0=956396
+0=981942
+0=965212
+0=957171
+0=943461
+0=973749
+0=961673
+0=875896
+0=985616
+0=984066
+1=000000
+1=000000
+1=000000
+0=918539
+1=000000
+1=000000
+0=947545
+0=767944
+0=752053
+0=821105
+1=000000
+0=865282
+0=808337
+0=808271
+0=854263
+0=945628
+0=822692
+0=998359
+1=000000
+0=865840
+0=908397
+0=964975
+0=879364
+0=924567
+0=980277
+0=960580
+0=974134
+0=954330
+0=968070
+0=992057
+0=943954
+0=961198
+1=000000
+0=950107
+0=951018
+0=965437
+0=956448
+0=991752
+0=946372
+0=977417
+0=924209
+0=788942
+0=944906
+0=922399
+0=736540
+0=748182
+0=793174
+1=000000
+0=942923
+0=750392
+0=769406
+0=963301
+0=899519
+0=816897
+0=808104
+0=890071
+0=938358
+0=962607
+0=835501
+0=868008
+0=966809
+1=000000
+0=973309
+0=973334
+0=978602
+0=955790
+0=951976
+0=972266
+0=983089
+0=919059
+0=925421
+0=939524
+1=000000
+0=995834
+0=974150
+0=932100
+0=960070
+0=964293
+0=996906
+0=967398
+0=973681
+0=855122
+0=772457
+0=783127
+0=976136
+0=909671
+0=841953
+0=807564
+0=755521
+0=976210
+1=000000
+0=880193
+1=000000
+0=997657
+0=995070
+0=978508
+0=940706
+0=936243
+0=995662
+0=946063
+0=975254
+0=985556
+0=975832
+0=968476
+0=956676
+0=950189
+0=980697
+0=968794
+0=931082
+0=930510
+0=948618
+0=941369
+0=924711
+0=987972
+0=988729
+0=969527
+0=933802
+0=918249
+0=906997
+0=920807
+0=854953
+0=979677
+0=984832
+1=000000
+0=904425
+0=898181
+0=908456
+0=848372
+0=998143
+1=000000
+0=966288
+1=000000
+1=000000
+0=916176
+1=000000
+1=000000
+0=940605
+1=000000
+0=986891
+1=000000
+0=929727
+0=988300
+0=967530
+0=980489
+0=952880
+0=961959
+0=908535
+0=948238
+0=943060
+0=978952
+0=970153
+1=000000
+0=968099
+0=984090
+0=972909
+1=000000
+0=983198
+0=974817
+0=944278
+0=939285
+0=992397
+0=967710
+0=913271
+0=837739
+0=968960
+1=000000
+0=914456
+0=981115
+0=981976
+1=000000
+1=000000
+0=945902
+0=965958
+1=000000
+0=923470
+0=836821
+0=887226
+0=910174
+0=896661
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
diff --git a/tests/ref/fate/filter-dumpwave-fltp b/tests/ref/fate/filter-dumpwave-fltp
new file mode 100644
index 0000000000..e66230c331
--- /dev/null
+++ b/tests/ref/fate/filter-dumpwave-fltp
@@ -0,0 +1,1800 @@ 
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+0=858258
+0=539333
+0=438221
+0=372100
+0=366304
+0=605164
+0=637041
+0=647097
+0=650465
+0=660785
+0=686207
+0=692284
+0=714718
+1=000000
+1=000000
+1=000000
+1=000000
+1=000000
+0=932305
+0=620423
+0=442906
+0=368353
+0=319873
+0=545479
+0=620829
+0=647351
+0=677884
+0=675255
+0=679301
+0=672597
+0=688984
+0=706110
+0=716553
+0=740333
+0=731576
+0=713456
+0=726138
+0=718627
+0=724037
+0=726700
+0=736484
+0=729591
+0=722254
+0=722133
+0=719773
+0=717406
+0=723866
+0=740628
+0=731773
+0=729539
+0=718669
+0=705302
+0=724621
+0=739104
+0=724219
+0=727740
+0=720731
+0=709535
+0=723419
+0=734793
+0=740019
+0=730477
+0=716716
+0=712089
+0=714344
+0=728412
+0=736718
+0=739912
+0=729902
+0=710555
+0=719894
+0=722910
+0=722449
+0=737566
+0=729739
+0=716124
+0=721822
+0=715009
+0=723679
+0=722796
+0=732713
+0=737485
+0=720121
+0=728077
+0=716547
+0=716084
+0=719229
+0=732125
+0=744413
+0=730455
+0=715725
+0=710203
+0=732332
+0=741583
+0=724931
+0=724937
+0=709796
+0=709250
+0=723284
+0=732987
+0=745560
+0=728379
+0=711723
+0=724620
+0=713805
+0=730486
+0=724913
+0=741663
+0=728598
+0=718227
+0=727791
+0=723163
+0=723398
+0=731062
+0=734626
+0=731220
+0=727052
+0=720081
+0=738048
+0=717014
+0=733038
+0=743975
+0=734933
+0=732812
+0=720501
+0=717626
+0=725392
+0=732820
+0=749270
+0=704439
+0=722127
+0=711660
+0=734862
+0=738333
+0=733339
+0=736081
+0=708228
+0=726093
+0=731247
+0=730739
+0=743854
+0=736958
+0=724179
+0=723631
+0=723821
+0=732181
+0=726260
+0=739140
+0=733514
+0=724304
+0=729432
+0=722905
+0=728259
+0=721314
+0=738705
+0=740450
+0=727002
+0=723862
+0=723334
+0=709887
+0=730005
+0=739521
+0=741841
+0=729584
+0=712231
+0=336937
+0=298472
+0=209081
+0=714031
+0=724366
+0=715397
+0=721422
+0=732867
+0=730268
+0=748117
+0=729724
+0=712682
+0=726029
+0=721250
+0=726328
+0=733099
+0=737674
+0=731491
+0=720964
+0=578512
+0=298573
+0=272381
+0=206786
+0=237417
+0=252874
+0=226084
+0=172041
+0=186558
+0=190866
+0=182826
+0=175867
+0=165237
+0=151661
+0=150387
+0=146097
+0=152924
+0=199537
+0=153670
+0=122749
+0=159706
+0=126894
+0=165266
+0=239186
+0=233079
+0=222228
+0=206099
+0=201526
+0=191191
+0=198300
+0=197981
+0=163304
+0=145302
+0=159978
+0=149547
+0=147227
+0=141445
+0=159249
+0=135666
+0=139789
+0=127052
+0=160830
+0=186189
+0=132828
+0=150849
+0=143468
+0=144028
+0=183438
+0=135804
+0=217010
+0=197695
+0=171126
+0=203445
+0=194493
+0=241693
+0=406420
+0=339634
+0=383268
+0=455703
+0=457827
+0=520291
+0=524483
+0=238330
+0=110808
+0=168339
+0=147951
+0=162243
+0=150819
+0=184741
+0=175898
+0=194101
+0=190111
+0=179677
+0=233265
+0=318130
+0=320481
+0=354988
+0=481297
+0=460593
+0=467382
+0=568170
+0=517503
+0=520205
+0=548765
+0=553441
+0=600469
+0=545632
+0=600640
+0=568467
+0=569154
+0=546451
+0=582425
+0=571239
+0=555579
+0=571522
+0=607882
+0=576581
+0=600963
+0=610136
+0=595841
+0=591522
+0=525182
+0=543039
+0=535541
+0=568935
+0=537147
+0=642570
+0=626792
+0=578389
+0=569345
+0=595519
+0=579207
+0=581767
+0=613901
+0=575467
+0=583127
+0=579487
+0=603304
+0=562584
+0=560308
+0=610506
+0=561111
+0=563899
+0=381348
+0=379003
+0=253670
+0=460863
+0=711883
+0=729942
+0=724539
+0=714967
+0=705897
+0=725739
+0=735627
+0=742161
+0=732013
+0=713670
+0=715329
+0=718217
+0=730857
+0=592026
+0=603543
+0=485509
+0=363700
+0=264931
+0=282851
+0=643812
+0=730715
+0=715021
+0=723639
+0=713050
+0=724163
+0=728431
+0=737754
+0=730148
+0=721797
+0=721400
+0=723999
+0=719481
+0=726417
+0=739884
+0=726363
+0=729663
+0=715532
+0=719538
+0=708151
+0=731072
+0=747187
+0=728660
+0=726613
+0=716812
+0=715687
+0=725991
+0=726762
+0=751239
+0=738150
+0=711591
+0=723254
+0=718762
+0=746486
+0=734648
+0=725186
+0=711405
+0=717831
+0=724430
+0=722088
+0=739427
+0=734160
+0=717988
+0=727660
+0=721939
+0=726270
+0=719455
+0=735387
+0=743644
+0=723760
+0=727418
+0=720378
+0=715459
+0=724325
+0=734440
+0=740681
+0=732058
+0=715527
+0=719033
+0=717267
+0=728859
+0=740613
+0=742972
+0=728086
+0=709030
+0=719161
+0=723549
+0=726643
+0=739857
+0=735571
+0=720428
+0=722604
+0=725676
+0=727857
+0=739551
+0=730475
+0=715310
+0=726128
+0=721116
+0=722589
+0=729138
+0=740910
+0=729306
+0=726668
+0=717646
+0=725112
+0=713459
+0=730843
+0=743416
+0=730909
+0=727784
+0=717161
+0=713982
+0=723304
+0=731416
+0=749010
+0=730449
+0=719547
+0=715115
+0=716023
+0=734460
+0=728302
+0=739427
+0=727087
+0=713513
+0=725010
+0=723686
+0=724884
+0=731997
+0=734340
+0=728727
+0=693627
+0=728784
+0=723745
+0=739751
+0=732782
+0=722184
+0=727462
+0=719573
+0=721123
+0=724998
+0=734660
+0=734712
+0=725043
+0=722626
+0=723222
+0=710904
+0=730531
+0=741462
+0=735233
+0=728171
+0=713188
+0=716663
+0=722527
+0=724713
+0=743040
+0=724682
+0=717445
+0=714630
+0=708284
+0=734476
+0=699138
+0=532407
+0=442498
+0=400918
+0=355128
+0=309918
+0=248948
+0=158553
+0=147877
+0=674200
+0=720693
+0=728688
+0=721800
+0=732922
+0=743805
+0=731951
+0=738284
+0=731081
+0=731093
+0=733115
+0=707788
+0=444923
+0=412918
+0=340215
+0=262937
+0=250349
+0=215054
+0=139889
+0=161877
+0=132695
+0=153043
+0=178970
+0=122343
+0=143666
+0=146711
+0=195903
+0=170892
+0=276601
+0=238787
+0=204432
+0=256136
+0=295939
+0=239652
+0=284766
+0=295380
+0=330743
+0=370179
+0=320568
+0=257844
+0=180962
+0=170186
+0=186331
+0=178293
+0=113517
+0=233356
+0=167461
+0=115629
+0=193337
+0=191038
+0=202300
+0=304221
+0=317445
+0=246462
+0=295359
+0=320380
+0=288341
+0=319974
+0=316320
+0=330785
+0=329100
+0=310133
+0=282031
+0=213775
+0=350954
+0=380485
+0=307958
+0=351828
+0=393056
+0=350981
+0=453510
+0=473442
+0=540284
+0=516216
+0=603404
+0=556632
+0=591924
+0=579931
+0=396341
+0=299853
+0=303798
+0=297094
+0=279675
+0=258558
+0=417952
+0=332794
+0=309517
+0=387591
+0=409073
+0=391377
+0=428548
+0=516457
+0=515962
+0=524509
+0=569197
+0=595600
+0=598179
+0=586404
+0=570604
+0=569281
+0=588599
+0=594373
+0=597649
+0=615876
+0=561009
+0=577146
+0=589312
+0=592530
+0=550463
+0=551038
+0=606072
+0=604416
+0=655783
+0=595122
+0=538098
+0=389445
+0=272194
+0=540215
+0=542095
+0=549248
+0=573062
+0=579642
+0=573118
+0=572743
+0=592692
+0=583184
+0=552493
+0=568285
+0=589139
+0=571588
+0=556753
+0=595836
+0=630269
+0=597138
+0=488225
+0=347092
+0=286099
+0=366328
+0=649498
+0=756743
+0=711298
+0=719262
+0=757913
+0=710452
+0=706664
+0=747384
+0=716401
+0=710435
+0=742745
+0=733614
+0=714059
+0=725425
+0=748371
+0=715471
+0=715689
+0=751005
+0=383424
+0=543304
+0=717851
+0=735742
+0=719975
+0=725764
+0=748057
+0=706992
+0=711115
+0=751541
+0=710409
+0=708143
+0=759903
+0=719540
+0=704172
+0=758216
+0=726936
+0=700870
+0=751976
+0=726916
+0=705335
+0=743198
+0=727901
+0=709083
+0=730888
+0=737053
+0=715735
+0=722046
+0=736705
+0=720850
+0=714872
+0=738044
+0=722373
+0=712685
+0=743363
+0=723412
+0=711854
+0=742301
+0=722805
+0=733364
+0=707359
+0=750534
+0=721420
+0=702777
+0=749953
+0=727744
+0=700834
+0=747712
+0=729716
+0=699351
+0=742505
+0=727801
+0=704355
+0=736950
+0=736657
+0=708611
+0=728755
+0=740617
+0=709061
+0=724837
+0=743027
+0=711733
+0=723548
+0=742172
+0=713453
+0=723111
+0=738481
+0=718783
+0=723631
+0=737043
+0=720849
+0=714271
+0=732983
+0=734784
+0=710186
+0=726337
+0=744514
+0=705553
+0=725768
+0=739792
+0=728077
+0=707064
+0=737820
+0=735137
+0=704437
+0=730470
+0=743551
+0=702571
+0=732589
+0=746277
+0=702843
+0=724997
+0=751937
+0=702865
+0=722701
+0=750335
+0=707710
+0=718330
+0=749578
+0=717181
+0=719136
+0=743255
+0=728472
+0=712757
+0=728306
+0=741419
+0=713193
+0=720430
+0=754870
+0=718739
+0=711283
+0=758151
+0=721479
+0=705882
+0=755512
+0=720269
+0=703466
+0=735995
+0=751547
+0=709571
+0=722190
+0=756596
+0=704799
+0=715729
+0=755869
+0=710600
+0=712699
+0=758070
+0=718994
+0=717050
+0=746810
+0=727704
+0=715373
+0=735590
+0=733008
+0=714378
+0=725329
+0=740216
+0=717403
+0=710533
+0=729894
+0=693987
+0=587768
+0=502688
+0=525693
+0=516775
+0=511696
+0=473457
+0=444074
+0=465045
+0=429726
+0=412075
+0=369313
+0=329445
+0=305959
+0=240333
+0=641779
+0=724398
+0=701575
+0=747225
+0=725585
+0=684201
+0=612099
+0=546590
+0=503191
+0=526074
+0=505146
+0=446389
+0=465481
+0=448487
+0=417446
+0=391045
+0=343813
+0=320181
+0=258764
+0=241668
+0=189530
+0=142873
+0=157287
+0=165445
+0=192255
+0=137583
+0=139002
+0=134500
+0=287154
+0=351916
+0=293061
+0=364687
+0=397716
+0=429355
+0=524339
+0=524467
+0=520499
+0=508603
+0=559377
+0=368069
+0=164384
+0=163397
+0=120486
+0=205538
+0=150500
+0=111980
+0=166251
+0=158987
+0=306947
+0=289644
+0=362536
+0=367776
+0=387989
+0=485289
+0=545698
+0=532848
+0=513362
+0=565849
+0=583167
+0=544731
+0=584662
+0=570803
+0=583310
+0=570594
+0=599108
+0=563213
+0=548218
+0=542949
+0=565844
+0=600136
+0=588134
+0=573516
+0=578478
+0=590521
+0=555043
+0=554922
+0=560007
+0=612432
+0=606998
+0=570844
+0=550222
+0=582718
+0=572938
+0=579646
+0=585976
+0=560054
+0=514494
+0=566194
+0=564815
+0=575461
+0=645236
+0=563480
+0=590996
+0=570147
+0=555875
+0=539656
+0=590824
+0=594470
+0=592896
+0=602625
+0=549499
+0=611599
+0=572959
+0=591319
+0=589460
+0=551811
+0=566512
+0=564639
+0=614177
+0=547875
+0=396662
+0=307126
+0=172631
+0=441375
+0=680673
+0=751469
+0=722806
+0=588483
+0=582915
+0=565876
+0=578834
+0=595932
+0=556568
+0=612285
+0=570464
+0=587057
+0=565883
+0=593059
+0=569029
+0=534140
+0=349448
+0=215013
+0=276477
+0=623042
+0=696869
+0=685143
+0=719663
+0=737190
+0=755151
+0=726025
+0=714721
+0=712053
+0=714640
+0=720430
+0=743733
+0=750345
+0=718849
+0=711144
+0=714843
+0=714334
+0=725673
+0=762379
+0=737157
+0=722936
+0=710881
+0=706635
+0=767496
+0=715661
+0=707068
+0=713999
+0=739455
+0=752270
+0=724763
+0=712256
+0=710139
+0=717277
+0=727246
+0=755813
+0=746759
+0=717384
+0=705529
+0=706060
+0=719702
+0=732741
+0=760755
+0=729350
+0=718240
+0=715523
+0=714636
+0=717284
+0=737025
+0=753960
+0=722617
+0=715784
+0=708112
+0=709513
+0=727078
+0=762408
+0=746239
+0=721714
+0=707990
+0=705856
+0=714945
+0=735405
+0=760176
+0=654258
+0=737983
+0=757958
+0=728876
+0=712977
+0=709876
+0=717108
+0=727267
+0=746639
+0=748290
+0=717772
+0=709286
+0=713374
+0=715636
+0=728005
+0=761250
+0=735247
+0=721463
+0=716874
+0=710418
+0=714677
+0=735266
+0=757754
+0=729692
+0=714396
+0=707368
+0=710669
+0=729828
+0=749334
+0=752397
+0=718298
+0=706464
+0=708124
+0=719114
+0=729194
+0=758562
+0=731793
+0=718500
+0=720633
+0=782719
+0=715891
+0=715671
+0=718355
+0=720950
+0=740356
+0=754179
+0=718208
+0=713248
+0=710593
+0=709908
+0=722396
+0=762683
+0=741903
+0=724495
+0=711420
+0=705995
+0=713733
+0=736806
+0=759246
+0=730239
+0=711932
+0=708783
+0=716779
+0=730679
+0=741627
+0=755470
+0=720472
+0=709848
+0=710643
+0=712935
+0=724190
+0=759969
+0=737380
+0=727660
+0=718064
+0=710381
+0=711870
+0=731416
+0=688292
+0=715189
+0=734444
+0=757581
+0=726122
+0=717919
+0=707154
+0=710005
+0=724170
+0=759493
+0=748364
+0=722862
+0=710645
+0=706161
+0=717410
+0=733247
+0=758410
+0=732630
+0=713077
+0=712436
+0=671528
+0=469513
+0=233696
+0=311195
+0=320420
+0=367389
+0=362505
+0=346831
+0=328538
+0=301621
+0=287011
+0=286690
+0=214465
+0=163265
+0=152579
+0=163518
+0=144076
+0=160782
+0=135019
+0=630613
+0=597477
+0=237097
+0=198741
+0=292621
+0=323590
+0=332767
+0=360086
+0=312172
+0=279391
+0=302348
+0=335329
+0=256106
+0=215853
+0=174218
+0=135164
+0=136013
+0=133883
+0=165344
+0=135052
+0=128345
+0=150472
+0=205497
+0=226469
+0=263599
+0=269841
+0=170750
+0=188872
+0=186840
+0=250134
+0=298306
+0=396104
+0=427885
+0=543909
+0=424536
+0=472631
+0=512415
+0=527628
+0=538201
+0=352777
+0=137645
+0=143076
+0=246058
+0=263169
+0=248701
+0=240569
+0=168567
+0=194020
+0=236052
+0=284744
+0=285092
+0=407308
+0=491072
+0=478449
+0=451156
+0=429528
+0=490049
+0=515566
+0=580273
+0=582295
+0=588152
+0=594467
+0=564015
+0=538235
+0=572068
+0=604544
+0=647035
+0=568192
+0=608431
+0=583999
+0=585483
+0=595099
+0=594672
+0=596411
+0=582694
+0=560740
+0=621372
+0=575073
+0=547070
+0=627652
+0=593563
+0=621620
+0=586489
+0=590537
+0=600251
+0=625004
+0=577153
+0=570160
+0=606588
+0=588507
+0=591719
+0=619735
+0=609646
+0=614669
+0=579035
+0=524839
+0=640188
+0=576647
+0=560327
+0=589136
+0=574958
+0=581608
+0=610523
+0=600005
+0=594807
+0=415057
+0=330775
+0=348688
+0=396542
+0=672117
+0=723955
+0=723567
+0=723081
+0=736399
+0=738797
+0=725828
+0=720043
+0=601666
+0=561489
+0=595882
+0=558544
+0=570027
+0=577182
+0=548895
+0=548908
+0=347306
+0=357285
+0=237377
+0=580480
+0=703569
+0=720167
+0=731121
+0=732540
+0=743617
+0=731436
+0=708197
+0=723609
+0=720998
+0=721977
+0=734014
+0=736209
+0=725814
+0=723207
+0=723041
+0=726563
+0=719056
+0=729847
+0=741391
+0=724859
+0=729588
+0=719098
+0=720348
+0=717385
+0=732965
+0=745913
+0=726066
+0=716518
+0=708595
+0=728737
+0=742360
+0=732139
+0=731107
+0=717320
+0=716150
+0=719504
+0=729701
+0=746598
+0=732365
+0=722496
+0=714218
+0=718923
+0=728152
+0=728376
+0=741974
+0=730084
+0=714578
+0=728150
+0=719273
+0=728601
+0=726802
+0=736534
+0=732485
+0=725136
+0=724259
+0=724578
+0=716306
+0=726466
+0=739287
+0=731719
+0=732103
+0=716522
+0=717032
+0=714119
+0=730491
+0=743419
+0=740030
+0=719759
+0=710935
+0=731383
+0=736073
+0=742159
+0=731421
+0=713264
+0=721349
+0=719988
+0=730493
+0=733872
+0=737872
+0=723866
+0=717884
+0=721266
+0=725806
+0=720238
+0=734459
+0=733243
+0=722119
+0=726957
+0=718741
+0=726565
+0=714592
+0=732242
+0=742935
+0=725439
+0=726836
+0=717610
+0=711754
+0=728007
+0=733194
+0=744611
+0=729491
+0=715490
+0=714082
+0=715279
+0=730334
+0=748382
+0=725652
+0=711697
+0=715536
+0=727916
+0=726933
+0=745189
+0=732148
+0=711409
+0=723626
+0=718507
+0=731067
+0=726650
+0=739967
+0=728664
+0=719181
+0=724035
+0=719857
+0=719321
+0=725289
+0=735995
+0=730689
+0=728807
+0=720367
+0=723034
+0=709003
+0=733111
+0=746213
+0=729288
+0=730585
+0=715614
+0=711483
+0=724817
+0=729381
+0=745292
+0=642570
+0=337972
+0=222941
+0=199253
+0=557917
+0=736973
+0=728063
+0=711478
+0=721841
+0=723217
+0=723962
+0=741826
+0=735359
+0=719901
+0=726042
+0=718349
+0=726303
+0=722474
+0=733124
+0=712207
+0=514321
+0=258485
+0=191512
+0=191568
+0=208579
+0=197767
+0=159554
+0=166685
+0=159137
+0=156098
+0=140183
+0=135656
+0=158351
+0=204264
+0=179447
+0=145815
+0=186971
+0=154190
+0=172361
+0=264647
+0=249852
+0=360308
+0=295691
+0=240511
+0=219274
+0=128982
+0=155513
+0=164454
+0=161931
+0=132662
+0=207530
+0=147174
+0=210396
+0=151111
+0=186041
+0=157637
+0=125937
+0=211981
+0=239249
+0=251700
+0=311075
+0=234826
+0=230703
+0=313952
+0=281432
+0=256490
+0=366061
+0=264166
+0=243863
+0=261983
+0=413306
+0=380981
+0=492869
+0=420291
+0=520805
+0=531118
+0=553591
+0=552420
+0=567550
+0=578776
+0=549849
+0=557985
+0=434722
+0=333954
+0=236992
+0=328843
+0=325971
+0=203870
+0=268857
+0=383662
+0=375773
+0=438134
+0=417538
+0=422026
+0=565881
+0=582816
+0=551380
+0=551130
+0=580823
+0=545862
+0=543732
+0=586506
+0=604576
+0=581742
+0=581295
+0=551463
+0=569139
+0=556255
+0=569214
+0=588226
+0=581470
+0=627098
+0=596086
+0=576726
+0=572954
+0=605795
+0=578559
+0=571867
+0=565670
+0=575661
+0=609835
+0=588236
+0=624934
+0=573511
+0=572515
+0=555435
+0=563173
+0=557587
+0=578116
+0=618013
+0=578225
+0=580694
+0=590855
+0=585934
+0=585363
+0=612975
+0=598365
+0=584673
+0=549799
+0=570197
+0=618477
+0=596165
+0=586621
+0=442706
+0=334194
+0=243121
+0=311331
+0=636602
+0=707214
+0=719460
+0=728204
+0=721297
+0=719018
+0=732579
+0=729194
+0=725977
+0=727010
+0=743814
+0=723710
+0=728655
+0=628553
+0=558622
+0=552421
+0=373848
+0=257946
+0=279333
+0=488714
+0=699833
+0=739322
+0=724375
+0=724333
+0=737915
+0=723226
+0=722602
+0=728291
+0=734953
+0=717845
+0=724287
+0=718031
+0=715061
+0=717984
+0=726193
+0=735433
+0=719109
+0=727262
+0=733828
+0=726461
+0=724164
+0=739346
+0=730675
+0=729563
+0=725637
+0=742532
+0=721622
+0=725064
+0=729975
+0=730429
+0=718999
+0=725529
+0=695749
+0=734219
+0=723839
+0=734220
+0=734464
+0=723981
+0=718157
+0=736161
+0=720684
+0=717402
+0=715020
+0=722694
+0=721875
+0=716569
+0=735752
+0=720938
+0=724215
+0=730151
+0=738189
+0=721097
+0=732469
+0=735577
+0=730498
+0=720141
+0=736966
+0=731033
+0=726389
+0=722812
+0=736244
+0=718244
+0=720137
+0=721958
+0=715690
+0=715191
+0=718824
+0=732252
+0=721350
+0=719896
+0=730658
+0=783584
+0=720844
+0=711397
+0=720923
+0=725021
+0=716381
+0=730739
+0=732948
+0=724540
+0=720467
+0=740826
+0=725570
+0=724575
+0=730908
+0=737576
+0=723859
+0=727079
+0=736010
+0=722816
+0=720204
+0=728826
+0=727815
+0=716737
+0=715549
+0=718111
+0=719339
+0=719322
+0=729040
+0=733479
+0=721686
+0=725697
+0=736822
+0=726820
+0=725612
+0=738860
+0=732063
+0=726496
+0=726555
+0=740571
+0=656223
+0=723796
+0=728434
+0=736799
+0=725844
+0=724446
+0=740163
+0=730635
+0=724207
+0=730917
+0=734293
+0=721812
+0=721282
+0=733457
+0=719132
+0=715520
+0=715774
+0=725195
+0=722186
+0=718917
+0=739118
+0=724739
+0=723615
+0=728776
+0=738377
+0=724282
+0=730260
+0=739063
+0=731981
+0=716725
+0=684159
+0=433223
+0=231157
+0=214786
+0=206197
+0=223375
+0=222949
+0=152217
+0=117950
+0=588154
+0=728723
+0=733535
+0=726428
+0=717015
+0=727914
+0=725047
+0=712196
+0=716219
+0=724869
+0=722152
+0=596353
+0=327881
+0=216518
+0=197994
+0=240207
+0=179869
+0=211432
+0=131779
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
+0=000000
\ No newline at end of file