diff mbox series

[FFmpeg-devel,2/2] lavfi/drawutils: improve colorspace support

Message ID 45ea4a6d79d74602fca86efb69044916714f6c70.1654192626.git.ffmpegagent@gmail.com
State Accepted
Commit 6c3a82f0433de8ff9c35def971a736056cc8ff38
Headers show
Series lavfi/drawutils: improve colorspace support | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

softworkz June 2, 2022, 5:57 p.m. UTC
From: rcombs <rcombs@rcombs.me>

- Introduce ff_draw_init2, which takes explicit colorspace and range
  args
- Use lavu/csp and lavfi/colorspace for conversion, rather than the
  lavu/colorspace.h macros
- Use the passed-in colorspace when performing RGB->YUV conversions

The upshot of this is:
- Support for YUV spaces other than BT601
- Better rounding for all conversions
- Particular rounding improvements in >8-bit formats, which previously
  used simple left-shifts
- Support for limited-range RGB
- Support for full-range YUV in non-J pixfmts

Due to the rounding improvements, this results in a large number of
minor changes to FATE tests.

Signed-off-by: rcombs <rcombs@rcombs.me>
---
 libavfilter/drawutils.c                       |  84 +--
 libavfilter/drawutils.h                       |  26 +-
 tests/ref/fate/filter-chromashift-smear       |  10 +-
 tests/ref/fate/filter-chromashift-wrap        |  10 +-
 tests/ref/fate/filter-decimate                | 480 +++++++++---------
 tests/ref/fate/filter-fps-down                |  22 +-
 tests/ref/fate/filter-fps-down-eof-pass       |  22 +-
 tests/ref/fate/filter-fps-down-round-down     |  20 +-
 tests/ref/fate/filter-fps-down-round-up       |  22 +-
 tests/ref/fate/filter-fps-start-drop          |  12 +-
 tests/ref/fate/filter-fps-start-fill          |  12 +-
 tests/ref/fate/filter-fps-up                  |  28 +-
 tests/ref/fate/filter-fps-up-round-down       |  28 +-
 tests/ref/fate/filter-fps-up-round-up         |  28 +-
 tests/ref/fate/filter-framerate-12bit-down    | 100 ++--
 tests/ref/fate/filter-framerate-12bit-up      | 120 ++---
 tests/ref/fate/filter-framerate-down          |   2 +-
 tests/ref/fate/filter-framerate-up            |  20 +-
 .../filter-metadata-signalstats-yuv420p10     |   2 +-
 tests/ref/fate/filter-minterpolate-down       |   2 +-
 tests/ref/fate/filter-minterpolate-up         |  20 +-
 tests/ref/fate/filter-mpdecimate              |  40 +-
 tests/ref/fate/filter-overlay_yuv420p10       |   6 +-
 tests/ref/fate/filter-overlay_yuv422p10       |   6 +-
 tests/ref/fate/filter-pixfmts-pad             |  84 +--
 tests/ref/fate/filter-pixfmts-tinterlace_pad  |  22 +-
 tests/ref/fate/filter-testsrc2-yuv420p        | 140 ++---
 tests/ref/fate/filter-testsrc2-yuv444p        | 140 ++---
 tests/ref/fate/filter-tpad-add                |   4 +-
 tests/ref/fate/filter-tpad-clone              |   8 +-
 tests/ref/fate/filter-unsharp-yuv420p10       |  40 +-
 tests/ref/fate/filter-untile                  |  16 +-
 32 files changed, 807 insertions(+), 769 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 65ed61aa92..b4083b9a95 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -23,9 +23,10 @@ 
 
 #include "libavutil/avassert.h"
 #include "libavutil/avutil.h"
-#include "libavutil/colorspace.h"
+#include "libavutil/csp.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/pixdesc.h"
+#include "colorspace.h"
 #include "drawutils.h"
 #include "formats.h"
 
@@ -76,13 +77,14 @@  int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
     return 0;
 }
 
-int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
+int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSpace csp,
+                  enum AVColorRange range, unsigned flags)
 {
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format);
+    const AVLumaCoefficients *luma = NULL;
     const AVComponentDescriptor *c;
     unsigned i, nb_planes = 0;
     int pixelstep[MAX_PLANES] = { 0 };
-    int full_range = 0;
     int depthb = 0;
 
     if (!desc || !desc->name)
@@ -91,9 +93,17 @@  int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
         return AVERROR(ENOSYS);
     if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
         return AVERROR(ENOSYS);
-    if (format == AV_PIX_FMT_YUVJ420P || format == AV_PIX_FMT_YUVJ422P || format == AV_PIX_FMT_YUVJ444P ||
-        format == AV_PIX_FMT_YUVJ411P || format == AV_PIX_FMT_YUVJ440P)
-        full_range = 1;
+    if (csp == AVCOL_SPC_UNSPECIFIED)
+        csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;
+    if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))
+        return AVERROR(EINVAL);
+    if (range == AVCOL_RANGE_UNSPECIFIED)
+        range = (format == AV_PIX_FMT_YUVJ420P || format == AV_PIX_FMT_YUVJ422P ||
+                 format == AV_PIX_FMT_YUVJ444P || format == AV_PIX_FMT_YUVJ411P ||
+                 format == AV_PIX_FMT_YUVJ440P || csp == AVCOL_SPC_RGB)
+                ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
+    if (range != AVCOL_RANGE_JPEG && range != AVCOL_RANGE_MPEG)
+        return AVERROR(EINVAL);
     for (i = 0; i < desc->nb_components; i++) {
         int db;
         c = &desc->comp[i];
@@ -130,18 +140,27 @@  int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
     draw->desc      = desc;
     draw->format    = format;
     draw->nb_planes = nb_planes;
+    draw->range     = range;
+    draw->csp       = csp;
     draw->flags     = flags;
-    draw->full_range = full_range;
+    if (luma)
+        ff_fill_rgb2yuv_table(luma, draw->rgb2yuv);
     memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));
     draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
     draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
     return 0;
 }
 
+int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
+{
+    return ff_draw_init2(draw, format, AVCOL_SPC_UNSPECIFIED, AVCOL_RANGE_UNSPECIFIED, flags);
+}
+
 void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4])
 {
     unsigned i;
-    uint8_t tmp8[4];
+    double yuvad[4];
+    double rgbad[4];
     const AVPixFmtDescriptor *desc = draw->desc;
 
     if (rgba != color->rgba)
@@ -149,35 +168,36 @@  void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
 
     memset(color->comp, 0, sizeof(color->comp));
 
-    if (draw->desc->flags & AV_PIX_FMT_FLAG_RGB) {
-        memcpy(tmp8, rgba, sizeof(tmp8));
-    } else if (draw->nb_planes >= 2) {
-        /* assume YUV */
-        tmp8[0] = draw->full_range ? RGB_TO_Y_JPEG(rgba[0], rgba[1], rgba[2]) : RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
-        tmp8[1] = draw->full_range ? RGB_TO_U_JPEG(rgba[0], rgba[1], rgba[2]) : RGB_TO_U_CCIR(rgba[0], rgba[1], rgba[2], 0);
-        tmp8[2] = draw->full_range ? RGB_TO_V_JPEG(rgba[0], rgba[1], rgba[2]) : RGB_TO_V_CCIR(rgba[0], rgba[1], rgba[2], 0);
-        tmp8[3] = rgba[3];
-    } else if (draw->format == AV_PIX_FMT_GRAY8 || draw->format == AV_PIX_FMT_GRAY8A ||
-               draw->format == AV_PIX_FMT_GRAY16LE || draw->format == AV_PIX_FMT_YA16LE ||
-               draw->format == AV_PIX_FMT_GRAY9LE  ||
-               draw->format == AV_PIX_FMT_GRAY10LE ||
-               draw->format == AV_PIX_FMT_GRAY12LE ||
-               draw->format == AV_PIX_FMT_GRAY14LE) {
-        tmp8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
-        tmp8[1] = rgba[3];
-    } else {
-        av_log(NULL, AV_LOG_WARNING,
-               "Color conversion not implemented for %s\n", draw->desc->name);
-        memset(color, 128, sizeof(*color));
-        return;
+    for (int i = 0; i < 4; i++)
+        rgbad[i] = color->rgba[i] / 255.;
+
+    if (draw->desc->flags & AV_PIX_FMT_FLAG_RGB)
+        memcpy(yuvad, rgbad, sizeof(double) * 3);
+    else
+        ff_matrix_mul_3x3_vec(yuvad, rgbad, draw->rgb2yuv);
+
+    yuvad[3] = rgbad[3];
+
+    for (int i = 0; i < 3; i++) {
+        int chroma = (!(draw->desc->flags & AV_PIX_FMT_FLAG_RGB) && i > 0);
+        if (draw->range == AVCOL_RANGE_MPEG) {
+            yuvad[i] *= (chroma ? 224. : 219.) / 255.;
+            yuvad[i] += (chroma ? 128. :  16.) / 255.;
+        } else if (chroma) {
+            yuvad[i] += 0.5;
+        }
     }
 
+    // Ensure we place the alpha appropriately for gray formats
+    if (desc->nb_components <= 2)
+        yuvad[1] = yuvad[3];
+
     for (i = 0; i < desc->nb_components; i++) {
+        unsigned val = yuvad[i] * ((1 << (draw->desc->comp[i].depth + draw->desc->comp[i].shift)) - 1) + 0.5;
         if (desc->comp[i].depth > 8)
-            color->comp[desc->comp[i].plane].u16[desc->comp[i].offset / 2] = tmp8[i] <<
-                (draw->desc->comp[i].depth + draw->desc->comp[i].shift - 8);
+            color->comp[desc->comp[i].plane].u16[desc->comp[i].offset / 2] = val;
         else
-            color->comp[desc->comp[i].plane].u8[desc->comp[i].offset] = tmp8[i];
+            color->comp[desc->comp[i].plane].u8[desc->comp[i].offset] = val;
     }
 }
 
diff --git a/libavfilter/drawutils.h b/libavfilter/drawutils.h
index 396688514e..90df55107a 100644
--- a/libavfilter/drawutils.h
+++ b/libavfilter/drawutils.h
@@ -41,8 +41,10 @@  typedef struct FFDrawContext {
     uint8_t vsub[MAX_PLANES];  /*< vertical subsampling */
     uint8_t hsub_max;
     uint8_t vsub_max;
-    int full_range;
+    enum AVColorRange range;
     unsigned flags;
+    enum AVColorSpace csp;
+    double rgb2yuv[3][3];
 } FFDrawContext;
 
 typedef struct FFDrawColor {
@@ -64,13 +66,29 @@  typedef struct FFDrawColor {
  *
  * Only a limited number of pixel formats are supported, if format is not
  * supported the function will return an error.
- * flags is combination of FF_DRAW_* flags.
- * @return  0 for success, < 0 for error
+ * @param format  pixel format of the frames that will be drawn onto
+ * @param csp     color space of the frames that will be drawn onto,
+ *                defaulting to BT601 or RGB depending on the specified format
+ *                when AVCOL_SPC_UNSPECIFIED is passed.
+ * @param range   sample value range of the frames that will be drawn onto,
+ *                defaulting to TV-range unless using a legacy J format
+ *                when AVCOL_RANGE_UNSPECIFIED is passed.
+ * @param flags   combination of FF_DRAW_* flags.
+ * @return        0 for success, < 0 for error
+ */
+int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSpace csp,
+                  enum AVColorRange range, unsigned flags);
+
+/*
+ * Legacy wrapper for ff_draw_init2.
  */
 int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags);
 
+
+
 /**
- * Prepare a color.
+ * Prepare a color. The rgba value passed is always 8-bit full-range in the RGB space
+ * corresponding to the space set at initialization.
  */
 void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4]);
 
diff --git a/tests/ref/fate/filter-chromashift-smear b/tests/ref/fate/filter-chromashift-smear
index e5651c0f94..949cc6cd07 100644
--- a/tests/ref/fate/filter-chromashift-smear
+++ b/tests/ref/fate/filter-chromashift-smear
@@ -3,8 +3,8 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x91a39b4c
-0,          1,          1,        1,   115200, 0xe2ff7f63
-0,          2,          2,        1,   115200, 0x242f7a20
-0,          3,          3,        1,   115200, 0x4f7c95a9
-0,          4,          4,        1,   115200, 0xee6e9daa
+0,          0,          0,        1,   115200, 0x39a9f743
+0,          1,          1,        1,   115200, 0x7749d86c
+0,          2,          2,        1,   115200, 0x636dd339
+0,          3,          3,        1,   115200, 0x4c14ef30
+0,          4,          4,        1,   115200, 0x249bf65a
diff --git a/tests/ref/fate/filter-chromashift-wrap b/tests/ref/fate/filter-chromashift-wrap
index 3ce663ac1c..383b24fc67 100644
--- a/tests/ref/fate/filter-chromashift-wrap
+++ b/tests/ref/fate/filter-chromashift-wrap
@@ -3,8 +3,8 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x2b9db3ed
-0,          1,          1,        1,   115200, 0xebb7987c
-0,          2,          2,        1,   115200, 0xee1a9331
-0,          3,          3,        1,   115200, 0xf4f5aeb2
-0,          4,          4,        1,   115200, 0x7b66b6b3
+0,          0,          0,        1,   115200, 0xd3940ff3
+0,          1,          1,        1,   115200, 0x4e4cf17d
+0,          2,          2,        1,   115200, 0x2d67ec4a
+0,          3,          3,        1,   115200, 0xf18d0848
+0,          4,          4,        1,   115200, 0x00ed0f82
diff --git a/tests/ref/fate/filter-decimate b/tests/ref/fate/filter-decimate
index 7c51b438a4..0edc0ea4ee 100644
--- a/tests/ref/fate/filter-decimate
+++ b/tests/ref/fate/filter-decimate
@@ -3,243 +3,243 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x960ae41c
-0,          2,          2,        1,   115200, 0xe8031d25
-0,          3,          3,        1,   115200, 0x13254a89
-0,          4,          4,        1,   115200, 0x939c7f3d
-0,          5,          5,        1,   115200, 0xa68ba085
-0,          6,          6,        1,   115200, 0xe7bda27b
-0,          7,          7,        1,   115200, 0x00679a86
-0,          8,          8,        1,   115200, 0x0c849830
-0,          9,          9,        1,   115200, 0x2e6a927d
-0,         10,         10,        1,   115200, 0x475b92e1
-0,         11,         11,        1,   115200, 0xfe3e9516
-0,         12,         12,        1,   115200, 0xc5d79a51
-0,         13,         13,        1,   115200, 0x9dd29e29
-0,         14,         14,        1,   115200, 0x16b3ae83
-0,         15,         15,        1,   115200, 0x4151b7b0
-0,         16,         16,        1,   115200, 0x5f54b19d
-0,         17,         17,        1,   115200, 0xd776b3e3
-0,         18,         18,        1,   115200, 0xe55ab961
-0,         19,         19,        1,   115200, 0xad23bb36
-0,         20,         20,        1,   115200, 0x7f4db57f
-0,         21,         21,        1,   115200, 0xbafda06e
-0,         22,         22,        1,   115200, 0xf263893c
-0,         23,         23,        1,   115200, 0x53ba81d3
-0,         24,         24,        1,   115200, 0x0fa465ad
-0,         25,         25,        1,   115200, 0x214a709b
-0,         26,         26,        1,   115200, 0x51878099
-0,         27,         27,        1,   115200, 0x6e1a7b19
-0,         28,         28,        1,   115200, 0x96ed90b3
-0,         29,         29,        1,   115200, 0x91aba349
-0,         30,         30,        1,   115200, 0xfd35adb5
-0,         31,         31,        1,   115200, 0xec62b4a5
-0,         32,         32,        1,   115200, 0x8898b87a
-0,         33,         33,        1,   115200, 0x517dc6b8
-0,         34,         34,        1,   115200, 0xb7cdcc9c
-0,         35,         35,        1,   115200, 0x9ba9dfb5
-0,         36,         36,        1,   115200, 0xd162f354
-0,         37,         37,        1,   115200, 0x1f25e394
-0,         38,         38,        1,   115200, 0xd828e1dc
-0,         39,         39,        1,   115200, 0xa02cce79
-0,         40,         40,        1,   115200, 0x1ca0c5ec
-0,         41,         41,        1,   115200, 0xab66ba79
-0,         42,         42,        1,   115200, 0x484c9be1
-0,         43,         43,        1,   115200, 0x8d3b7e1c
-0,         44,         44,        1,   115200, 0x50fe70d4
-0,         45,         45,        1,   115200, 0x54b85d95
-0,         46,         46,        1,   115200, 0xea0451c2
-0,         47,         47,        1,   115200, 0x3811656f
-0,         48,         48,        1,   115200, 0x0c7c7081
-0,         49,         49,        1,   115200, 0xe0b15961
-0,         50,         50,        1,   115200, 0x227f6926
-0,         51,         51,        1,   115200, 0xfbb26630
-0,         52,         52,        1,   115200, 0x7d3e840d
-0,         53,         53,        1,   115200, 0xeb5fa9c0
-0,         54,         54,        1,   115200, 0x0c54b377
-0,         55,         55,        1,   115200, 0xab62be11
-0,         56,         56,        1,   115200, 0xf6a1c43b
-0,         57,         57,        1,   115200, 0xf266c6fc
-0,         58,         58,        1,   115200, 0x2952d0ca
-0,         59,         59,        1,   115200, 0x528ed993
-0,         60,         60,        1,   115200, 0x8fc8ebcc
-0,         61,         61,        1,   115200, 0x85ddd275
-0,         62,         62,        1,   115200, 0xbbd1d587
-0,         63,         63,        1,   115200, 0x55dfe337
-0,         64,         64,        1,   115200, 0x1cede87f
-0,         65,         65,        1,   115200, 0x4eaee7ed
-0,         66,         66,        1,   115200, 0xe75aea8e
-0,         67,         67,        1,   115200, 0xb758f43c
-0,         68,         68,        1,   115200, 0xe0f7ed7f
-0,         69,         69,        1,   115200, 0x5735c147
-0,         70,         70,        1,   115200, 0x7b86a23a
-0,         71,         71,        1,   115200, 0xe0ec8dcc
-0,         72,         72,        1,   115200, 0xdce072c4
-0,         73,         73,        1,   115200, 0xf87a8603
-0,         74,         74,        1,   115200, 0x0a70acd9
-0,         75,         75,        1,   115200, 0xc88fd26c
-0,         76,         76,        1,   115200, 0xb57429df
-0,         77,         77,        1,   115200, 0x99e47b15
-0,         78,         78,        1,   115200, 0x7ef18171
-0,         79,         79,        1,   115200, 0xe6d277ea
-0,         80,         80,        1,   115200, 0xcea57703
-0,         81,         81,        1,   115200, 0x5f0b5f56
-0,         82,         82,        1,   115200, 0x685e311a
-0,         83,         83,        1,   115200, 0xc42f0eca
-0,         84,         84,        1,   115200, 0x2884cc9e
-0,         85,         85,        1,   115200, 0xcb29e344
-0,         86,         86,        1,   115200, 0x99f6f98e
-0,         87,         87,        1,   115200, 0x6afd0ff0
-0,         88,         88,        1,   115200, 0x04e00753
-0,         89,         89,        1,   115200, 0x17141778
-0,         90,         90,        1,   115200, 0x2ddb1b44
-0,         91,         91,        1,   115200, 0x5cad0475
-0,         92,         92,        1,   115200, 0x1dd6bcb5
-0,         93,         93,        1,   115200, 0x2ad35f9a
-0,         94,         94,        1,   115200, 0x83652763
-0,         95,         95,        1,   115200, 0xec7408ab
-0,         96,         96,        1,   115200, 0x6162ffec
-0,         97,         97,        1,   115200, 0xf1220ac0
-0,         98,         98,        1,   115200, 0xc2d62c84
-0,         99,         99,        1,   115200, 0x34653b99
-0,        100,        100,        1,   115200, 0x020e66ea
-0,        101,        101,        1,   115200, 0x0dca7cdb
-0,        102,        102,        1,   115200, 0x3dc971b6
-0,        103,        103,        1,   115200, 0x98bf6287
-0,        104,        104,        1,   115200, 0xaabd5b1a
-0,        105,        105,        1,   115200, 0xbb6a4fa3
-0,        106,        106,        1,   115200, 0x03dd3aa4
-0,        107,        107,        1,   115200, 0x3af1360a
-0,        108,        108,        1,   115200, 0x152037a4
-0,        109,        109,        1,   115200, 0x57993a48
-0,        110,        110,        1,   115200, 0x0b15446a
-0,        111,        111,        1,   115200, 0x4f6347d9
-0,        112,        112,        1,   115200, 0xef1e44fa
-0,        113,        113,        1,   115200, 0xa2d04d81
-0,        114,        114,        1,   115200, 0x843a4c9b
-0,        115,        115,        1,   115200, 0xbf7752d1
-0,        116,        116,        1,   115200, 0x5c6e5525
-0,        117,        117,        1,   115200, 0x3c154810
-0,        118,        118,        1,   115200, 0x422f49e5
-0,        119,        119,        1,   115200, 0x19e94743
-0,        120,        120,        1,   115200, 0x5ef8435d
-0,        121,        121,        1,   115200, 0x49304277
-0,        122,        122,        1,   115200, 0x10be590d
-0,        123,        123,        1,   115200, 0x2c466d25
-0,        124,        124,        1,   115200, 0x5e4a88d6
-0,        125,        125,        1,   115200, 0x729ca385
-0,        126,        126,        1,   115200, 0x1ceda942
-0,        127,        127,        1,   115200, 0x76f1b6df
-0,        128,        128,        1,   115200, 0x51a1cbcd
-0,        129,        129,        1,   115200, 0xb8a1cf0a
-0,        130,        130,        1,   115200, 0x46e2db68
-0,        131,        131,        1,   115200, 0xbb75e434
-0,        132,        132,        1,   115200, 0xc983fa93
-0,        133,        133,        1,   115200, 0x4772e1f5
-0,        134,        134,        1,   115200, 0x516edf5d
-0,        135,        135,        1,   115200, 0xd6abc909
-0,        136,        136,        1,   115200, 0x501eb9ba
-0,        137,        137,        1,   115200, 0x477fa501
-0,        138,        138,        1,   115200, 0x495b8934
-0,        139,        139,        1,   115200, 0x6b226e4c
-0,        140,        140,        1,   115200, 0x78385fe5
-0,        141,        141,        1,   115200, 0x31744953
-0,        142,        142,        1,   115200, 0x3065441b
-0,        143,        143,        1,   115200, 0xea0f4fc3
-0,        144,        144,        1,   115200, 0xabeb5a8b
-0,        145,        145,        1,   115200, 0xebd26907
-0,        146,        146,        1,   115200, 0xb09b7cec
-0,        147,        147,        1,   115200, 0xac2d7c67
-0,        148,        148,        1,   115200, 0x0ccf9831
-0,        149,        149,        1,   115200, 0xbd97c1d7
-0,        150,        150,        1,   115200, 0x78fae02a
-0,        151,        151,        1,   115200, 0x9c83eac2
-0,        152,        152,        1,   115200, 0x1730ea14
-0,        153,        153,        1,   115200, 0xc31ad6b5
-0,        154,        154,        1,   115200, 0xeb55c91d
-0,        155,        155,        1,   115200, 0x962ccec2
-0,        156,        156,        1,   115200, 0xb8d3e712
-0,        157,        157,        1,   115200, 0x6b9dd89d
-0,        158,        158,        1,   115200, 0x0e9ad4b2
-0,        159,        159,        1,   115200, 0x4130c7a9
-0,        160,        160,        1,   115200, 0xfdc3c95a
-0,        161,        161,        1,   115200, 0xf315bda6
-0,        162,        162,        1,   115200, 0x4bc3b912
-0,        163,        163,        1,   115200, 0xbaffc04f
-0,        164,        164,        1,   115200, 0x3db0b8fc
-0,        165,        165,        1,   115200, 0xad4ca464
-0,        166,        166,        1,   115200, 0xba0f8631
-0,        167,        167,        1,   115200, 0x9cee7879
-0,        168,        168,        1,   115200, 0x9ded6c00
-0,        169,        169,        1,   115200, 0x7fe086ad
-0,        170,        170,        1,   115200, 0x4d03b49a
-0,        171,        171,        1,   115200, 0xe3e4da5e
-0,        172,        172,        1,   115200, 0x5dd92ee1
-0,        173,        173,        1,   115200, 0x2e838a0b
-0,        174,        174,        1,   115200, 0x7e4d9226
-0,        175,        175,        1,   115200, 0x2ef78d74
-0,        176,        176,        1,   115200, 0x48d979bc
-0,        177,        177,        1,   115200, 0xc8bb5e03
-0,        178,        178,        1,   115200, 0x9a732644
-0,        179,        179,        1,   115200, 0x3ef6f663
-0,        180,        180,        1,   115200, 0x0d93bf3a
-0,        181,        181,        1,   115200, 0x5b93cae6
-0,        182,        182,        1,   115200, 0xce5deda8
-0,        183,        183,        1,   115200, 0xbb751742
-0,        184,        184,        1,   115200, 0xda5915f2
-0,        185,        185,        1,   115200, 0x1fd13822
-0,        186,        186,        1,   115200, 0xfbc74cf5
-0,        187,        187,        1,   115200, 0xdb973f71
-0,        188,        188,        1,   115200, 0x038bf8d2
-0,        189,        189,        1,   115200, 0x8cb09cf6
-0,        190,        190,        1,   115200, 0x23d56c24
-0,        191,        191,        1,   115200, 0xc2a14e78
-0,        192,        192,        1,   115200, 0x25384d72
-0,        193,        193,        1,   115200, 0xbf505c2a
-0,        194,        194,        1,   115200, 0x7f11704d
-0,        195,        195,        1,   115200, 0x83b57e8c
-0,        196,        196,        1,   115200, 0xd560904a
-0,        197,        197,        1,   115200, 0x6de79f3f
-0,        198,        198,        1,   115200, 0xf1808e3e
-0,        199,        199,        1,   115200, 0xc23879a8
-0,        200,        200,        1,   115200, 0x9199737e
-0,        201,        201,        1,   115200, 0x13a862ab
-0,        202,        202,        1,   115200, 0x56d75b8d
-0,        203,        203,        1,   115200, 0x11a85b04
-0,        204,        204,        1,   115200, 0x49735f37
-0,        205,        205,        1,   115200, 0xd83e6782
-0,        206,        206,        1,   115200, 0x0a0f764d
-0,        207,        207,        1,   115200, 0x870d7c76
-0,        208,        208,        1,   115200, 0x6847819a
-0,        209,        209,        1,   115200, 0xe0cf8104
-0,        210,        210,        1,   115200, 0x16f880f3
-0,        211,        211,        1,   115200, 0xbcb079ba
-0,        212,        212,        1,   115200, 0x09c579df
-0,        213,        213,        1,   115200, 0xa2416c6d
-0,        214,        214,        1,   115200, 0x181e5c0c
-0,        215,        215,        1,   115200, 0x4b7e5752
-0,        216,        216,        1,   115200, 0xda554658
-0,        217,        217,        1,   115200, 0x2b9252f4
-0,        218,        218,        1,   115200, 0xbfe1689b
-0,        219,        219,        1,   115200, 0xf6ef640c
-0,        220,        220,        1,   115200, 0x423d77e8
-0,        221,        221,        1,   115200, 0x37b185c1
-0,        222,        222,        1,   115200, 0x666992a4
-0,        223,        223,        1,   115200, 0x9ae39b0a
-0,        224,        224,        1,   115200, 0xec7ea7ed
-0,        225,        225,        1,   115200, 0x2606ad0b
-0,        226,        226,        1,   115200, 0xef62c3f5
-0,        227,        227,        1,   115200, 0xb933db3f
-0,        228,        228,        1,   115200, 0x38d2fd89
-0,        229,        229,        1,   115200, 0xa446f158
-0,        230,        230,        1,   115200, 0xb5dded43
-0,        231,        231,        1,   115200, 0x137dd7be
-0,        232,        232,        1,   115200, 0xd9beca7e
-0,        233,        233,        1,   115200, 0x7581c760
-0,        234,        234,        1,   115200, 0x7506a692
-0,        235,        235,        1,   115200, 0xb67c8e7d
-0,        236,        236,        1,   115200, 0x3a4c7fbe
-0,        237,        237,        1,   115200, 0xe287603b
-0,        238,        238,        1,   115200, 0xd3894d9d
-0,        239,        239,        1,   115200, 0x674f4263
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xbf963f2c
+0,          2,          2,        1,   115200, 0x822c77cd
+0,          3,          3,        1,   115200, 0x62c0a4b1
+0,          4,          4,        1,   115200, 0x7a3fd919
+0,          5,          5,        1,   115200, 0x800efa06
+0,          6,          6,        1,   115200, 0x3326fbbe
+0,          7,          7,        1,   115200, 0xb803f3ba
+0,          8,          8,        1,   115200, 0xaf07f156
+0,          9,          9,        1,   115200, 0x57a3ebe3
+0,         10,         10,        1,   115200, 0x6c27ebb2
+0,         11,         11,        1,   115200, 0xea56ee4e
+0,         12,         12,        1,   115200, 0xfc76f369
+0,         13,         13,        1,   115200, 0xf3f7f7f4
+0,         14,         14,        1,   115200, 0xa40c083b
+0,         15,         15,        1,   115200, 0xb1eb1129
+0,         16,         16,        1,   115200, 0x093a0ab7
+0,         17,         17,        1,   115200, 0x8b140cad
+0,         18,         18,        1,   115200, 0xa6681236
+0,         19,         19,        1,   115200, 0x1270137e
+0,         20,         20,        1,   115200, 0x2f550e34
+0,         21,         21,        1,   115200, 0xd5ebf9a1
+0,         22,         22,        1,   115200, 0x35aee377
+0,         23,         23,        1,   115200, 0xff4cdc71
+0,         24,         24,        1,   115200, 0x5d70c0bc
+0,         25,         25,        1,   115200, 0xb8c0caea
+0,         26,         26,        1,   115200, 0x56f8da6b
+0,         27,         27,        1,   115200, 0xca81d558
+0,         28,         28,        1,   115200, 0xdc89ea02
+0,         29,         29,        1,   115200, 0xcf06fc36
+0,         30,         30,        1,   115200, 0x14b905d5
+0,         31,         31,        1,   115200, 0xbed50cbf
+0,         32,         32,        1,   115200, 0xa894103c
+0,         33,         33,        1,   115200, 0x4b611da9
+0,         34,         34,        1,   115200, 0xedfc22e3
+0,         35,         35,        1,   115200, 0xa0b63573
+0,         36,         36,        1,   115200, 0x6f9148db
+0,         37,         37,        1,   115200, 0x69e03976
+0,         38,         38,        1,   115200, 0xe9bf3865
+0,         39,         39,        1,   115200, 0xd9e9255f
+0,         40,         40,        1,   115200, 0x99b91d6d
+0,         41,         41,        1,   115200, 0x1f8011f4
+0,         42,         42,        1,   115200, 0x74f0f3d0
+0,         43,         43,        1,   115200, 0x1ca7d668
+0,         44,         44,        1,   115200, 0x84d2c990
+0,         45,         45,        1,   115200, 0x1fcfb766
+0,         46,         46,        1,   115200, 0x4e89ab81
+0,         47,         47,        1,   115200, 0xf6d5bfed
+0,         48,         48,        1,   115200, 0x7124cb5f
+0,         49,         49,        1,   115200, 0xdc2bb44c
+0,         50,         50,        1,   115200, 0xd11ac3c8
+0,         51,         51,        1,   115200, 0x019ec083
+0,         52,         52,        1,   115200, 0xa935dd47
+0,         53,         53,        1,   115200, 0x8bff0250
+0,         54,         54,        1,   115200, 0xcd400ba8
+0,         55,         55,        1,   115200, 0xa6ea14c0
+0,         56,         56,        1,   115200, 0xaad01a88
+0,         57,         57,        1,   115200, 0xf7dd1c70
+0,         58,         58,        1,   115200, 0x26ae259f
+0,         59,         59,        1,   115200, 0x51bb2e04
+0,         60,         60,        1,   115200, 0x15bd3f32
+0,         61,         61,        1,   115200, 0x6937269b
+0,         62,         62,        1,   115200, 0x4d5729de
+0,         63,         63,        1,   115200, 0x343f384b
+0,         64,         64,        1,   115200, 0xe9353d2a
+0,         65,         65,        1,   115200, 0x65753d3c
+0,         66,         66,        1,   115200, 0xbda64078
+0,         67,         67,        1,   115200, 0x32c84b69
+0,         68,         68,        1,   115200, 0xd95f4557
+0,         69,         69,        1,   115200, 0x20a41a53
+0,         70,         70,        1,   115200, 0x7445fc11
+0,         71,         71,        1,   115200, 0x2b76e8a5
+0,         72,         72,        1,   115200, 0xc445cf15
+0,         73,         73,        1,   115200, 0x0a4fe0ab
+0,         74,         74,        1,   115200, 0x85610638
+0,         75,         75,        1,   115200, 0x937a29b5
+0,         76,         76,        1,   115200, 0x3aa67daa
+0,         77,         77,        1,   115200, 0x70b2cbef
+0,         78,         78,        1,   115200, 0x7cb8d043
+0,         79,         79,        1,   115200, 0x529fc410
+0,         80,         80,        1,   115200, 0x3bc8c140
+0,         81,         81,        1,   115200, 0xb689a829
+0,         82,         82,        1,   115200, 0xb16276ee
+0,         83,         83,        1,   115200, 0xf95c5305
+0,         84,         84,        1,   115200, 0x7a9a0f51
+0,         85,         85,        1,   115200, 0x823a280e
+0,         86,         86,        1,   115200, 0x5c483fd4
+0,         87,         87,        1,   115200, 0x05cd5897
+0,         88,         88,        1,   115200, 0x7b075138
+0,         89,         89,        1,   115200, 0x7de4634b
+0,         90,         90,        1,   115200, 0x5ea6699e
+0,         91,         91,        1,   115200, 0xafc3542f
+0,         92,         92,        1,   115200, 0x249b0f88
+0,         93,         93,        1,   115200, 0x1c4bb61b
+0,         94,         94,        1,   115200, 0x4a4c7fff
+0,         95,         95,        1,   115200, 0x7b3962f3
+0,         96,         96,        1,   115200, 0x304d5af6
+0,         97,         97,        1,   115200, 0x7da664c0
+0,         98,         98,        1,   115200, 0xe85b85e6
+0,         99,         99,        1,   115200, 0x8c7594d5
+0,        100,        100,        1,   115200, 0xe279bef2
+0,        101,        101,        1,   115200, 0x66f9d4be
+0,        102,        102,        1,   115200, 0xa7cdc971
+0,        103,        103,        1,   115200, 0xad30baf5
+0,        104,        104,        1,   115200, 0x9244b378
+0,        105,        105,        1,   115200, 0x6485a7cc
+0,        106,        106,        1,   115200, 0xf30e9291
+0,        107,        107,        1,   115200, 0x9f288e01
+0,        108,        108,        1,   115200, 0xade58fe5
+0,        109,        109,        1,   115200, 0x0c029251
+0,        110,        110,        1,   115200, 0x660b9c9f
+0,        111,        111,        1,   115200, 0xa7c99ff7
+0,        112,        112,        1,   115200, 0xd63a9d6d
+0,        113,        113,        1,   115200, 0x8b27a5cf
+0,        114,        114,        1,   115200, 0xf97ba4a2
+0,        115,        115,        1,   115200, 0xa4b9aa9c
+0,        116,        116,        1,   115200, 0xe197ad07
+0,        117,        117,        1,   115200, 0x9dd8a125
+0,        118,        118,        1,   115200, 0xccbca2f6
+0,        119,        119,        1,   115200, 0xb4daa104
+0,        120,        120,        1,   115200, 0x100c9d8a
+0,        121,        121,        1,   115200, 0xcd239c90
+0,        122,        122,        1,   115200, 0xb0d1b2ab
+0,        123,        123,        1,   115200, 0x04a1c66e
+0,        124,        124,        1,   115200, 0x01ede1ed
+0,        125,        125,        1,   115200, 0x13d5fc05
+0,        126,        126,        1,   115200, 0xf62401b2
+0,        127,        127,        1,   115200, 0x05a00e4e
+0,        128,        128,        1,   115200, 0xfe802328
+0,        129,        129,        1,   115200, 0x527025b0
+0,        130,        130,        1,   115200, 0x1f6331a4
+0,        131,        131,        1,   115200, 0x77ad3986
+0,        132,        132,        1,   115200, 0xf8484f06
+0,        133,        133,        1,   115200, 0xc9ec372e
+0,        134,        134,        1,   115200, 0x9ef33524
+0,        135,        135,        1,   115200, 0x58ed1f81
+0,        136,        136,        1,   115200, 0x4d140fb8
+0,        137,        137,        1,   115200, 0x0260fb37
+0,        138,        138,        1,   115200, 0xc30ddff1
+0,        139,        139,        1,   115200, 0x5fbec612
+0,        140,        140,        1,   115200, 0x1bdcb832
+0,        141,        141,        1,   115200, 0xaa23a217
+0,        142,        142,        1,   115200, 0x3d9d9d4e
+0,        143,        143,        1,   115200, 0xcf7ca95f
+0,        144,        144,        1,   115200, 0x29aeb511
+0,        145,        145,        1,   115200, 0xd727c28d
+0,        146,        146,        1,   115200, 0xbbc0d640
+0,        147,        147,        1,   115200, 0x5254d5b9
+0,        148,        148,        1,   115200, 0x4e68f139
+0,        149,        149,        1,   115200, 0xc8221a08
+0,        150,        150,        1,   115200, 0xd0973761
+0,        151,        151,        1,   115200, 0xc0a44143
+0,        152,        152,        1,   115200, 0x4fc63fc3
+0,        153,        153,        1,   115200, 0x5def2bd6
+0,        154,        154,        1,   115200, 0x2d151cfd
+0,        155,        155,        1,   115200, 0xdca12233
+0,        156,        156,        1,   115200, 0xe3f93a01
+0,        157,        157,        1,   115200, 0xeb562c80
+0,        158,        158,        1,   115200, 0x353428c0
+0,        159,        159,        1,   115200, 0xa27a1bb0
+0,        160,        160,        1,   115200, 0x00b31d64
+0,        161,        161,        1,   115200, 0xc9d41237
+0,        162,        162,        1,   115200, 0xe3ae0ea6
+0,        163,        163,        1,   115200, 0x532315f1
+0,        164,        164,        1,   115200, 0x1c060fa5
+0,        165,        165,        1,   115200, 0x82cefc68
+0,        166,        166,        1,   115200, 0xe59cdfb0
+0,        167,        167,        1,   115200, 0xc752d2fd
+0,        168,        168,        1,   115200, 0x11a9c73f
+0,        169,        169,        1,   115200, 0x5bfce0a0
+0,        170,        170,        1,   115200, 0xdfcd0d08
+0,        171,        171,        1,   115200, 0x72223121
+0,        172,        172,        1,   115200, 0x10f18168
+0,        173,        173,        1,   115200, 0x3246d9d1
+0,        174,        174,        1,   115200, 0x0ebce030
+0,        175,        175,        1,   115200, 0xe557d979
+0,        176,        176,        1,   115200, 0xbca5c41a
+0,        177,        177,        1,   115200, 0x3770a682
+0,        178,        178,        1,   115200, 0xd6966c19
+0,        179,        179,        1,   115200, 0x01f13a7d
+0,        180,        180,        1,   115200, 0x4c030202
+0,        181,        181,        1,   115200, 0x17f70f1a
+0,        182,        182,        1,   115200, 0x953933a6
+0,        183,        183,        1,   115200, 0x334d5fc2
+0,        184,        184,        1,   115200, 0x91146079
+0,        185,        185,        1,   115200, 0xf2108405
+0,        186,        186,        1,   115200, 0xa7789bab
+0,        187,        187,        1,   115200, 0x26559004
+0,        188,        188,        1,   115200, 0xc5144c57
+0,        189,        189,        1,   115200, 0xa743f4ab
+0,        190,        190,        1,   115200, 0x42f7c523
+0,        191,        191,        1,   115200, 0xa1ada8b2
+0,        192,        192,        1,   115200, 0x6428a8b1
+0,        193,        193,        1,   115200, 0xbf72b6ef
+0,        194,        194,        1,   115200, 0x0ef0ca5d
+0,        195,        195,        1,   115200, 0xc7e6d823
+0,        196,        196,        1,   115200, 0x36dfe907
+0,        197,        197,        1,   115200, 0x5b15f784
+0,        198,        198,        1,   115200, 0x88bbe6be
+0,        199,        199,        1,   115200, 0x99b0d1c3
+0,        200,        200,        1,   115200, 0x1da5cbca
+0,        201,        201,        1,   115200, 0xe6efbaf8
+0,        202,        202,        1,   115200, 0x5a03b454
+0,        203,        203,        1,   115200, 0xf929b3ae
+0,        204,        204,        1,   115200, 0xcffab7cf
+0,        205,        205,        1,   115200, 0x6befc008
+0,        206,        206,        1,   115200, 0x434dcef4
+0,        207,        207,        1,   115200, 0x0cc5d530
+0,        208,        208,        1,   115200, 0x08c2d9c5
+0,        209,        209,        1,   115200, 0xf994d94a
+0,        210,        210,        1,   115200, 0x1973d911
+0,        211,        211,        1,   115200, 0x540cd279
+0,        212,        212,        1,   115200, 0x842ed2d6
+0,        213,        213,        1,   115200, 0x8fa4c5bb
+0,        214,        214,        1,   115200, 0x77b9b5d1
+0,        215,        215,        1,   115200, 0x8ae3b17d
+0,        216,        216,        1,   115200, 0x52a4a175
+0,        217,        217,        1,   115200, 0x2f69ad02
+0,        218,        218,        1,   115200, 0xd56cc263
+0,        219,        219,        1,   115200, 0x8aa4bde3
+0,        220,        220,        1,   115200, 0x1f97d1e1
+0,        221,        221,        1,   115200, 0x24d2df00
+0,        222,        222,        1,   115200, 0x8a5feb1a
+0,        223,        223,        1,   115200, 0xed8bf2a9
+0,        224,        224,        1,   115200, 0xfc91ff14
+0,        225,        225,        1,   115200, 0xf25b0408
+0,        226,        226,        1,   115200, 0xfbd719be
+0,        227,        227,        1,   115200, 0x1719309c
+0,        228,        228,        1,   115200, 0x0c645265
+0,        229,        229,        1,   115200, 0x52da4723
+0,        230,        230,        1,   115200, 0x61494396
+0,        231,        231,        1,   115200, 0xba312ea6
+0,        232,        232,        1,   115200, 0x65a32114
+0,        233,        233,        1,   115200, 0xd19b1e21
+0,        234,        234,        1,   115200, 0x0e80fe23
+0,        235,        235,        1,   115200, 0x5e4fe60c
+0,        236,        236,        1,   115200, 0x4ca9d81b
+0,        237,        237,        1,   115200, 0xc343b958
+0,        238,        238,        1,   115200, 0xb5b2a7d1
+0,        239,        239,        1,   115200, 0xe9879d29
diff --git a/tests/ref/fate/filter-fps-down b/tests/ref/fate/filter-fps-down
index 0b6725f037..0407a3e044 100644
--- a/tests/ref/fate/filter-fps-down
+++ b/tests/ref/fate/filter-fps-down
@@ -3,14 +3,14 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x0c1062d6
-0,          1,          1,        1,   115200, 0x278d887e
-0,          2,          2,        1,   115200, 0x75e1a17b
-0,          3,          3,        1,   115200, 0x686b77e7
-0,          4,          4,        1,   115200, 0x1fc2d693
-0,          5,          5,        1,   115200, 0x2d0ba5a4
-0,          6,          6,        1,   115200, 0x40426f99
-0,          7,          7,        1,   115200, 0xc705ccd9
-0,          8,          8,        1,   115200, 0x5635daa5
-0,          9,          9,        1,   115200, 0x7161ef8f
-0,         10,         10,        1,   115200, 0xccf02fed
+0,          0,          0,        1,   115200, 0xb986bcbd
+0,          1,          1,        1,   115200, 0xed18e21f
+0,          2,          2,        1,   115200, 0x6fedfa63
+0,          3,          3,        1,   115200, 0xa4e0d22b
+0,          4,          4,        1,   115200, 0x32332c36
+0,          5,          5,        1,   115200, 0xa611fd70
+0,          6,          6,        1,   115200, 0x0fa5c984
+0,          7,          7,        1,   115200, 0x127c21d0
+0,          8,          8,        1,   115200, 0x4194305c
+0,          9,          9,        1,   115200, 0x274845a7
+0,         10,         10,        1,   115200, 0x9aa1765a
diff --git a/tests/ref/fate/filter-fps-down-eof-pass b/tests/ref/fate/filter-fps-down-eof-pass
index 0b6725f037..0407a3e044 100644
--- a/tests/ref/fate/filter-fps-down-eof-pass
+++ b/tests/ref/fate/filter-fps-down-eof-pass
@@ -3,14 +3,14 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x0c1062d6
-0,          1,          1,        1,   115200, 0x278d887e
-0,          2,          2,        1,   115200, 0x75e1a17b
-0,          3,          3,        1,   115200, 0x686b77e7
-0,          4,          4,        1,   115200, 0x1fc2d693
-0,          5,          5,        1,   115200, 0x2d0ba5a4
-0,          6,          6,        1,   115200, 0x40426f99
-0,          7,          7,        1,   115200, 0xc705ccd9
-0,          8,          8,        1,   115200, 0x5635daa5
-0,          9,          9,        1,   115200, 0x7161ef8f
-0,         10,         10,        1,   115200, 0xccf02fed
+0,          0,          0,        1,   115200, 0xb986bcbd
+0,          1,          1,        1,   115200, 0xed18e21f
+0,          2,          2,        1,   115200, 0x6fedfa63
+0,          3,          3,        1,   115200, 0xa4e0d22b
+0,          4,          4,        1,   115200, 0x32332c36
+0,          5,          5,        1,   115200, 0xa611fd70
+0,          6,          6,        1,   115200, 0x0fa5c984
+0,          7,          7,        1,   115200, 0x127c21d0
+0,          8,          8,        1,   115200, 0x4194305c
+0,          9,          9,        1,   115200, 0x274845a7
+0,         10,         10,        1,   115200, 0x9aa1765a
diff --git a/tests/ref/fate/filter-fps-down-round-down b/tests/ref/fate/filter-fps-down-round-down
index 4440539b6f..ede7e33033 100644
--- a/tests/ref/fate/filter-fps-down-round-down
+++ b/tests/ref/fate/filter-fps-down-round-down
@@ -3,13 +3,13 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x201b9db1
-0,          1,          1,        1,   115200, 0x309b9c06
-0,          2,          2,        1,   115200, 0xa14e9aca
-0,          3,          3,        1,   115200, 0x02b6ab21
-0,          4,          4,        1,   115200, 0x296dd4a5
-0,          5,          5,        1,   115200, 0x59e85f83
-0,          6,          6,        1,   115200, 0xf040bf35
-0,          7,          7,        1,   115200, 0xa76dcd9d
-0,          8,          8,        1,   115200, 0x3af5d306
-0,          9,          9,        1,   115200, 0xc8ce7fb1
+0,          0,          0,        1,   115200, 0x8567f6cf
+0,          1,          1,        1,   115200, 0x0054f5dd
+0,          2,          2,        1,   115200, 0x3226f459
+0,          3,          3,        1,   115200, 0xc2c4037c
+0,          4,          4,        1,   115200, 0x93892b01
+0,          5,          5,        1,   115200, 0xc875b905
+0,          6,          6,        1,   115200, 0x7f601649
+0,          7,          7,        1,   115200, 0x5cef2244
+0,          8,          8,        1,   115200, 0xe1342b12
+0,          9,          9,        1,   115200, 0x57d4cca0
diff --git a/tests/ref/fate/filter-fps-down-round-up b/tests/ref/fate/filter-fps-down-round-up
index c3cf02fd24..415f1305a8 100644
--- a/tests/ref/fate/filter-fps-down-round-up
+++ b/tests/ref/fate/filter-fps-down-round-up
@@ -3,14 +3,14 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x201b9db1
-0,          2,          2,        1,   115200, 0x309b9c06
-0,          3,          3,        1,   115200, 0xb73857e2
-0,          4,          4,        1,   115200, 0x02b6ab21
-0,          5,          5,        1,   115200, 0x296dd4a5
-0,          6,          6,        1,   115200, 0xc95a675e
-0,          7,          7,        1,   115200, 0xf040bf35
-0,          8,          8,        1,   115200, 0xa76dcd9d
-0,          9,          9,        1,   115200, 0x0caf7172
-0,         10,         10,        1,   115200, 0xc8ce7fb1
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0x8567f6cf
+0,          2,          2,        1,   115200, 0x0054f5dd
+0,          3,          3,        1,   115200, 0x04cab318
+0,          4,          4,        1,   115200, 0xc2c4037c
+0,          5,          5,        1,   115200, 0x93892b01
+0,          6,          6,        1,   115200, 0xe4e2c25a
+0,          7,          7,        1,   115200, 0x7f601649
+0,          8,          8,        1,   115200, 0x5cef2244
+0,          9,          9,        1,   115200, 0x7c13cdb3
+0,         10,         10,        1,   115200, 0x57d4cca0
diff --git a/tests/ref/fate/filter-fps-start-drop b/tests/ref/fate/filter-fps-start-drop
index cfa1c40997..6c6c2af0f6 100644
--- a/tests/ref/fate/filter-fps-start-drop
+++ b/tests/ref/fate/filter-fps-start-drop
@@ -3,9 +3,9 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          5,          5,        1,   115200, 0x2d0ba5a4
-0,          6,          6,        1,   115200, 0xc95a675e
-0,          7,          7,        1,   115200, 0xf040bf35
-0,          8,          8,        1,   115200, 0x5635daa5
-0,          9,          9,        1,   115200, 0x0caf7172
-0,         10,         10,        1,   115200, 0xc8ce7fb1
+0,          5,          5,        1,   115200, 0xa611fd70
+0,          6,          6,        1,   115200, 0xe4e2c25a
+0,          7,          7,        1,   115200, 0x7f601649
+0,          8,          8,        1,   115200, 0x4194305c
+0,          9,          9,        1,   115200, 0x7c13cdb3
+0,         10,         10,        1,   115200, 0x57d4cca0
diff --git a/tests/ref/fate/filter-fps-start-fill b/tests/ref/fate/filter-fps-start-fill
index c5efb42a8f..6ff981d387 100644
--- a/tests/ref/fate/filter-fps-start-fill
+++ b/tests/ref/fate/filter-fps-start-fill
@@ -3,9 +3,9 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          5,          5,        1,   115200, 0x3744b3ed
-0,          6,          6,        1,   115200, 0x3744b3ed
-0,          7,          7,        1,   115200, 0x201b9db1
-0,          8,          8,        1,   115200, 0x75e1a17b
-0,          9,          9,        1,   115200, 0xb73857e2
-0,         10,         10,        1,   115200, 0x02b6ab21
+0,          5,          5,        1,   115200, 0xeba70ff3
+0,          6,          6,        1,   115200, 0xeba70ff3
+0,          7,          7,        1,   115200, 0x8567f6cf
+0,          8,          8,        1,   115200, 0x6fedfa63
+0,          9,          9,        1,   115200, 0x04cab318
+0,         10,         10,        1,   115200, 0xc2c4037c
diff --git a/tests/ref/fate/filter-fps-up b/tests/ref/fate/filter-fps-up
index dfb957c63a..b192538069 100644
--- a/tests/ref/fate/filter-fps-up
+++ b/tests/ref/fate/filter-fps-up
@@ -3,17 +3,17 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x60a58f35
-0,          3,          3,        1,   115200, 0x60a58f35
-0,          4,          4,        1,   115200, 0x60a58f35
-0,          5,          5,        1,   115200, 0x09ffa4e1
-0,          6,          6,        1,   115200, 0x09ffa4e1
-0,          7,          7,        1,   115200, 0x33f15918
-0,          8,          8,        1,   115200, 0x33f15918
-0,          9,          9,        1,   115200, 0xb0dfacf8
-0,         10,         10,        1,   115200, 0xb0dfacf8
-0,         11,         11,        1,   115200, 0xb0dfacf8
-0,         12,         12,        1,   115200, 0x53d5b181
-0,         13,         13,        1,   115200, 0x53d5b181
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0x0ebce86f
+0,          3,          3,        1,   115200, 0x0ebce86f
+0,          4,          4,        1,   115200, 0x0ebce86f
+0,          5,          5,        1,   115200, 0xa9c0fe04
+0,          6,          6,        1,   115200, 0xa9c0fe04
+0,          7,          7,        1,   115200, 0x779eb44c
+0,          8,          8,        1,   115200, 0x779eb44c
+0,          9,          9,        1,   115200, 0x27a904da
+0,         10,         10,        1,   115200, 0x27a904da
+0,         11,         11,        1,   115200, 0x27a904da
+0,         12,         12,        1,   115200, 0x328d092e
+0,         13,         13,        1,   115200, 0x328d092e
diff --git a/tests/ref/fate/filter-fps-up-round-down b/tests/ref/fate/filter-fps-up-round-down
index b68e4fe972..33eff3e4f8 100644
--- a/tests/ref/fate/filter-fps-up-round-down
+++ b/tests/ref/fate/filter-fps-up-round-down
@@ -3,17 +3,17 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x60a58f35
-0,          3,          3,        1,   115200, 0x60a58f35
-0,          4,          4,        1,   115200, 0x09ffa4e1
-0,          5,          5,        1,   115200, 0x09ffa4e1
-0,          6,          6,        1,   115200, 0x09ffa4e1
-0,          7,          7,        1,   115200, 0x33f15918
-0,          8,          8,        1,   115200, 0x33f15918
-0,          9,          9,        1,   115200, 0xb0dfacf8
-0,         10,         10,        1,   115200, 0xb0dfacf8
-0,         11,         11,        1,   115200, 0x53d5b181
-0,         12,         12,        1,   115200, 0x53d5b181
-0,         13,         13,        1,   115200, 0x53d5b181
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0x0ebce86f
+0,          3,          3,        1,   115200, 0x0ebce86f
+0,          4,          4,        1,   115200, 0xa9c0fe04
+0,          5,          5,        1,   115200, 0xa9c0fe04
+0,          6,          6,        1,   115200, 0xa9c0fe04
+0,          7,          7,        1,   115200, 0x779eb44c
+0,          8,          8,        1,   115200, 0x779eb44c
+0,          9,          9,        1,   115200, 0x27a904da
+0,         10,         10,        1,   115200, 0x27a904da
+0,         11,         11,        1,   115200, 0x328d092e
+0,         12,         12,        1,   115200, 0x328d092e
+0,         13,         13,        1,   115200, 0x328d092e
diff --git a/tests/ref/fate/filter-fps-up-round-up b/tests/ref/fate/filter-fps-up-round-up
index 692c1d6c69..a8877f08f9 100644
--- a/tests/ref/fate/filter-fps-up-round-up
+++ b/tests/ref/fate/filter-fps-up-round-up
@@ -3,17 +3,17 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x3744b3ed
-0,          3,          3,        1,   115200, 0x60a58f35
-0,          4,          4,        1,   115200, 0x60a58f35
-0,          5,          5,        1,   115200, 0x09ffa4e1
-0,          6,          6,        1,   115200, 0x09ffa4e1
-0,          7,          7,        1,   115200, 0x33f15918
-0,          8,          8,        1,   115200, 0x33f15918
-0,          9,          9,        1,   115200, 0x33f15918
-0,         10,         10,        1,   115200, 0xb0dfacf8
-0,         11,         11,        1,   115200, 0xb0dfacf8
-0,         12,         12,        1,   115200, 0x53d5b181
-0,         13,         13,        1,   115200, 0x53d5b181
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0xeba70ff3
+0,          3,          3,        1,   115200, 0x0ebce86f
+0,          4,          4,        1,   115200, 0x0ebce86f
+0,          5,          5,        1,   115200, 0xa9c0fe04
+0,          6,          6,        1,   115200, 0xa9c0fe04
+0,          7,          7,        1,   115200, 0x779eb44c
+0,          8,          8,        1,   115200, 0x779eb44c
+0,          9,          9,        1,   115200, 0x779eb44c
+0,         10,         10,        1,   115200, 0x27a904da
+0,         11,         11,        1,   115200, 0x27a904da
+0,         12,         12,        1,   115200, 0x328d092e
+0,         13,         13,        1,   115200, 0x328d092e
diff --git a/tests/ref/fate/filter-framerate-12bit-down b/tests/ref/fate/filter-framerate-12bit-down
index 25a3c0a53a..705d07d9c3 100644
--- a/tests/ref/fate/filter-framerate-12bit-down
+++ b/tests/ref/fate/filter-framerate-12bit-down
@@ -3,53 +3,53 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   307200, 0xb49cf016
-0,          1,          1,        1,   307200, 0xbccf696d
-0,          2,          2,        1,   307200, 0x709c8dd1
-0,          3,          3,        1,   307200, 0xb948d907
-0,          4,          4,        1,   307200, 0x850f849a
-0,          5,          5,        1,   307200, 0xaf71e7fc
-0,          6,          6,        1,   307200, 0x0a1ba486
-0,          7,          7,        1,   307200, 0x0601f62a
-0,          8,          8,        1,   307200, 0x2c6d3a59
-0,          9,          9,        1,   307200, 0xed03597b
-0,         10,         10,        1,   307200, 0x9f84df5d
-0,         11,         11,        1,   307200, 0x9fbe8c84
-0,         12,         12,        1,   307200, 0x8f7bc394
-0,         13,         13,        1,   307200, 0x5113c787
-0,         14,         14,        1,   307200, 0x41e8002f
-0,         15,         15,        1,   307200, 0xab2162fc
-0,         16,         16,        1,   307200, 0xbf8f847c
-0,         17,         17,        1,   307200, 0x832d9ef7
-0,         18,         18,        1,   307200, 0xd2f5e043
-0,         19,         19,        1,   307200, 0xceeaddb8
-0,         20,         20,        1,   307200, 0xf2b12fe5
-0,         21,         21,        1,   307200, 0xf3477e11
-0,         22,         22,        1,   307200, 0xdf387773
-0,         23,         23,        1,   307200, 0x273be7e2
-0,         24,         24,        1,   307200, 0x68cd0360
-0,         25,         25,        1,   307200, 0x4693ab03
-0,         26,         26,        1,   307200, 0xe2baef73
-0,         27,         27,        1,   307200, 0x0c9fa60a
-0,         28,         28,        1,   307200, 0x6e4ddbc5
-0,         29,         29,        1,   307200, 0xd1b2353c
-0,         30,         30,        1,   307200, 0x8a512668
-0,         31,         31,        1,   307200, 0x7224b439
-0,         32,         32,        1,   307200, 0x7a9243e2
-0,         33,         33,        1,   307200, 0x9a7e4553
-0,         34,         34,        1,   307200, 0x4d795626
-0,         35,         35,        1,   307200, 0x4e24d659
-0,         36,         36,        1,   307200, 0xa230b54b
-0,         37,         37,        1,   307200, 0x14598ea5
-0,         38,         38,        1,   307200, 0x21619cf3
-0,         39,         39,        1,   307200, 0x5220a167
-0,         40,         40,        1,   307200, 0xb6505ff0
-0,         41,         41,        1,   307200, 0x0a482a3d
-0,         42,         42,        1,   307200, 0x6bdce40c
-0,         43,         43,        1,   307200, 0x3c6074f3
-0,         44,         44,        1,   307200, 0x369c71c8
-0,         45,         45,        1,   307200, 0x4fda2634
-0,         46,         46,        1,   307200, 0x4df2d619
-0,         47,         47,        1,   307200, 0x21205aab
-0,         48,         48,        1,   307200, 0xe00f48c2
-0,         49,         49,        1,   307200, 0xe3b11798
+0,          0,          0,        1,   307200, 0xf0d70414
+0,          1,          1,        1,   307200, 0x75d668e8
+0,          2,          2,        1,   307200, 0xca39d9c3
+0,          3,          3,        1,   307200, 0xfacaf28f
+0,          4,          4,        1,   307200, 0x00bb97bf
+0,          5,          5,        1,   307200, 0xb309f05f
+0,          6,          6,        1,   307200, 0x08a78b1e
+0,          7,          7,        1,   307200, 0x1ec21037
+0,          8,          8,        1,   307200, 0x45c901e4
+0,          9,          9,        1,   307200, 0x460775a7
+0,         10,         10,        1,   307200, 0x16ce3448
+0,         11,         11,        1,   307200, 0x6bc2b063
+0,         12,         12,        1,   307200, 0x4e628c33
+0,         13,         13,        1,   307200, 0xc965923a
+0,         14,         14,        1,   307200, 0x54c8fe7c
+0,         15,         15,        1,   307200, 0x11758b98
+0,         16,         16,        1,   307200, 0x73f988a8
+0,         17,         17,        1,   307200, 0xb47223da
+0,         18,         18,        1,   307200, 0x03af8c25
+0,         19,         19,        1,   307200, 0x3871b12e
+0,         20,         20,        1,   307200, 0x59447ef5
+0,         21,         21,        1,   307200, 0xfb7918bd
+0,         22,         22,        1,   307200, 0xe9c623db
+0,         23,         23,        1,   307200, 0x78634f23
+0,         24,         24,        1,   307200, 0x8229d18c
+0,         25,         25,        1,   307200, 0xfb530895
+0,         26,         26,        1,   307200, 0x118b22a4
+0,         27,         27,        1,   307200, 0x4b39ea30
+0,         28,         28,        1,   307200, 0xe2f0c1ff
+0,         29,         29,        1,   307200, 0xcbc65013
+0,         30,         30,        1,   307200, 0xf903e8d5
+0,         31,         31,        1,   307200, 0x870fa119
+0,         32,         32,        1,   307200, 0x7e5b2f5c
+0,         33,         33,        1,   307200, 0x8b8a42a9
+0,         34,         34,        1,   307200, 0xa4a429bc
+0,         35,         35,        1,   307200, 0xf308c14c
+0,         36,         36,        1,   307200, 0xf255baeb
+0,         37,         37,        1,   307200, 0x8c4d949e
+0,         38,         38,        1,   307200, 0x28b57e98
+0,         39,         39,        1,   307200, 0x568cd24c
+0,         40,         40,        1,   307200, 0xfc8e3884
+0,         41,         41,        1,   307200, 0xfee05e7f
+0,         42,         42,        1,   307200, 0x3502c242
+0,         43,         43,        1,   307200, 0x3542901f
+0,         44,         44,        1,   307200, 0x8d74850c
+0,         45,         45,        1,   307200, 0x11d6693a
+0,         46,         46,        1,   307200, 0x83cf7d6e
+0,         47,         47,        1,   307200, 0x17ecef9a
+0,         48,         48,        1,   307200, 0x37ba308f
+0,         49,         49,        1,   307200, 0x7659d1ed
diff --git a/tests/ref/fate/filter-framerate-12bit-up b/tests/ref/fate/filter-framerate-12bit-up
index 15bf9be6f6..15f05b67ba 100644
--- a/tests/ref/fate/filter-framerate-12bit-up
+++ b/tests/ref/fate/filter-framerate-12bit-up
@@ -3,63 +3,63 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   307200, 0xb49cf016
-0,          1,          1,        1,   307200, 0x95d191b2
-0,          2,          2,        1,   307200, 0x20e5173b
-0,          3,          3,        1,   307200, 0x5378b13c
-0,          4,          4,        1,   307200, 0x3e304543
-0,          5,          5,        1,   307200, 0x2f131cdb
-0,          6,          6,        1,   307200, 0x83dbe321
-0,          7,          7,        1,   307200, 0xb81fc682
-0,          8,          8,        1,   307200, 0xb32a8644
-0,          9,          9,        1,   307200, 0xc5c8b0f8
-0,         10,         10,        1,   307200, 0x27945d0a
-0,         11,         11,        1,   307200, 0x444c7640
-0,         12,         12,        1,   307200, 0xcba4c6bb
-0,         13,         13,        1,   307200, 0xf923c7a3
-0,         14,         14,        1,   307200, 0x88149757
-0,         15,         15,        1,   307200, 0x4bdfd3ca
-0,         16,         16,        1,   307200, 0x1c279695
-0,         17,         17,        1,   307200, 0x634cc809
-0,         18,         18,        1,   307200, 0xda8c6c41
-0,         19,         19,        1,   307200, 0x2136c986
-0,         20,         20,        1,   307200, 0x457576a8
-0,         21,         21,        1,   307200, 0xe2337c57
-0,         22,         22,        1,   307200, 0x8ed517c9
-0,         23,         23,        1,   307200, 0x4fd35f99
-0,         24,         24,        1,   307200, 0x4237e892
-0,         25,         25,        1,   307200, 0x1383a9d8
-0,         26,         26,        1,   307200, 0xc7195735
-0,         27,         27,        1,   307200, 0x0e058165
-0,         28,         28,        1,   307200, 0x0b81f345
-0,         29,         29,        1,   307200, 0x2ddf2f0a
-0,         30,         30,        1,   307200, 0x0b58bcf7
-0,         31,         31,        1,   307200, 0x1b684a1d
-0,         32,         32,        1,   307200, 0x1e44f1cf
-0,         33,         33,        1,   307200, 0x3ed6b5d8
-0,         34,         34,        1,   307200, 0x00881a40
-0,         35,         35,        1,   307200, 0x2c3d1406
-0,         36,         36,        1,   307200, 0xbd67248a
-0,         37,         37,        1,   307200, 0x46261913
-0,         38,         38,        1,   307200, 0xe5b2bbaa
-0,         39,         39,        1,   307200, 0x0e4455cd
-0,         40,         40,        1,   307200, 0xb4943212
-0,         41,         41,        1,   307200, 0xf96b6808
-0,         42,         42,        1,   307200, 0x58adad3f
-0,         43,         43,        1,   307200, 0x978413f0
-0,         44,         44,        1,   307200, 0x0037320a
-0,         45,         45,        1,   307200, 0xaac8e1ca
-0,         46,         46,        1,   307200, 0xc3578407
-0,         47,         47,        1,   307200, 0xfc29c675
-0,         48,         48,        1,   307200, 0x22ed5b5a
-0,         49,         49,        1,   307200, 0x6d58e21e
-0,         50,         50,        1,   307200, 0xbf62b4c3
-0,         51,         51,        1,   307200, 0xbd5edb2d
-0,         52,         52,        1,   307200, 0x55528432
-0,         53,         53,        1,   307200, 0xa3f1e514
-0,         54,         54,        1,   307200, 0xba073e6f
-0,         55,         55,        1,   307200, 0x29b8df00
-0,         56,         56,        1,   307200, 0x1517512b
-0,         57,         57,        1,   307200, 0x4e740b42
-0,         58,         58,        1,   307200, 0xbd6b7053
-0,         59,         59,        1,   307200, 0xe73f29ef
+0,          0,          0,        1,   307200, 0xf0d70414
+0,          1,          1,        1,   307200, 0x6f4f534a
+0,          2,          2,        1,   307200, 0x57f82b18
+0,          3,          3,        1,   307200, 0xcda8e8a1
+0,          4,          4,        1,   307200, 0xaa307009
+0,          5,          5,        1,   307200, 0x9ad7c3d3
+0,          6,          6,        1,   307200, 0x9df5f0d7
+0,          7,          7,        1,   307200, 0xfb7edf18
+0,          8,          8,        1,   307200, 0xef248b54
+0,          9,          9,        1,   307200, 0x61ad29ba
+0,         10,         10,        1,   307200, 0xbbb6d277
+0,         11,         11,        1,   307200, 0xdd651a67
+0,         12,         12,        1,   307200, 0x15ba3293
+0,         13,         13,        1,   307200, 0x4c7162e4
+0,         14,         14,        1,   307200, 0xdbf4df9c
+0,         15,         15,        1,   307200, 0xf41bf8b4
+0,         16,         16,        1,   307200, 0xd1ea6bda
+0,         17,         17,        1,   307200, 0xbe30495d
+0,         18,         18,        1,   307200, 0xce1b92fe
+0,         19,         19,        1,   307200, 0xdf503102
+0,         20,         20,        1,   307200, 0xc6d8feaa
+0,         21,         21,        1,   307200, 0x13451b24
+0,         22,         22,        1,   307200, 0x6ee0eab6
+0,         23,         23,        1,   307200, 0xdcf59507
+0,         24,         24,        1,   307200, 0x017539af
+0,         25,         25,        1,   307200, 0x140bd179
+0,         26,         26,        1,   307200, 0xee8b6208
+0,         27,         27,        1,   307200, 0xb81c4fd4
+0,         28,         28,        1,   307200, 0x533c9287
+0,         29,         29,        1,   307200, 0x54a0e4d0
+0,         30,         30,        1,   307200, 0xdd700bcd
+0,         31,         31,        1,   307200, 0xd49ee76f
+0,         32,         32,        1,   307200, 0xd881bc34
+0,         33,         33,        1,   307200, 0x1422ea45
+0,         34,         34,        1,   307200, 0x31ede786
+0,         35,         35,        1,   307200, 0x29adb882
+0,         36,         36,        1,   307200, 0x62b4f994
+0,         37,         37,        1,   307200, 0x253558d8
+0,         38,         38,        1,   307200, 0xfb0eaa67
+0,         39,         39,        1,   307200, 0x331c2adf
+0,         40,         40,        1,   307200, 0xf853359e
+0,         41,         41,        1,   307200, 0xca73beb7
+0,         42,         42,        1,   307200, 0xd31b8d8a
+0,         43,         43,        1,   307200, 0x83dcdaaf
+0,         44,         44,        1,   307200, 0x1ee4383b
+0,         45,         45,        1,   307200, 0x7ac11c03
+0,         46,         46,        1,   307200, 0x57bb11bd
+0,         47,         47,        1,   307200, 0x9f448c18
+0,         48,         48,        1,   307200, 0x8b472bcd
+0,         49,         49,        1,   307200, 0xbd32b115
+0,         50,         50,        1,   307200, 0xb4283663
+0,         51,         51,        1,   307200, 0x9fd04c1f
+0,         52,         52,        1,   307200, 0x1d605e27
+0,         53,         53,        1,   307200, 0x155cac69
+0,         54,         54,        1,   307200, 0xfc3a7fc0
+0,         55,         55,        1,   307200, 0x801462a2
+0,         56,         56,        1,   307200, 0xd1db5657
+0,         57,         57,        1,   307200, 0x42cbf5b8
+0,         58,         58,        1,   307200, 0x7b239eae
+0,         59,         59,        1,   307200, 0x4d6d0da4
diff --git a/tests/ref/fate/filter-framerate-down b/tests/ref/fate/filter-framerate-down
index 4eab7aab85..c298de0779 100644
--- a/tests/ref/fate/filter-framerate-down
+++ b/tests/ref/fate/filter-framerate-down
@@ -3,4 +3,4 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
+0,          0,          0,        1,   115200, 0xeba70ff3
diff --git a/tests/ref/fate/filter-framerate-up b/tests/ref/fate/filter-framerate-up
index a276bf660d..30d1679327 100644
--- a/tests/ref/fate/filter-framerate-up
+++ b/tests/ref/fate/filter-framerate-up
@@ -3,13 +3,13 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0xec1fdfa0
-0,          2,          2,        1,   115200, 0xa17f0d74
-0,          3,          3,        1,   115200, 0xd72532a9
-0,          4,          4,        1,   115200, 0x032e60f8
-0,          5,          5,        1,   115200, 0x6e318ba0
-0,          6,          6,        1,   115200, 0x76018292
-0,          7,          7,        1,   115200, 0x89e27599
-0,          8,          8,        1,   115200, 0x68536eac
-0,          9,          9,        1,   115200, 0xc3ac62a8
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xd7523c5f
+0,          2,          2,        1,   115200, 0xd93564b0
+0,          3,          3,        1,   115200, 0xfd819089
+0,          4,          4,        1,   115200, 0x7f15b966
+0,          5,          5,        1,   115200, 0xa764e4d5
+0,          6,          6,        1,   115200, 0x8dc4da52
+0,          7,          7,        1,   115200, 0x7be2d1eb
+0,          8,          8,        1,   115200, 0x8be7c6b2
+0,          9,          9,        1,   115200, 0xd560bee9
diff --git a/tests/ref/fate/filter-metadata-signalstats-yuv420p10 b/tests/ref/fate/filter-metadata-signalstats-yuv420p10
index 69693e8480..93d3ca2c97 100644
--- a/tests/ref/fate/filter-metadata-signalstats-yuv420p10
+++ b/tests/ref/fate/filter-metadata-signalstats-yuv420p10
@@ -1 +1 @@ 
-pts=0|tag:lavfi.signalstats.YMIN=940|tag:lavfi.signalstats.YLOW=940|tag:lavfi.signalstats.YAVG=940|tag:lavfi.signalstats.YHIGH=940|tag:lavfi.signalstats.YMAX=940|tag:lavfi.signalstats.UMIN=512|tag:lavfi.signalstats.ULOW=512|tag:lavfi.signalstats.UAVG=512|tag:lavfi.signalstats.UHIGH=512|tag:lavfi.signalstats.UMAX=512|tag:lavfi.signalstats.VMIN=512|tag:lavfi.signalstats.VLOW=512|tag:lavfi.signalstats.VAVG=512|tag:lavfi.signalstats.VHIGH=512|tag:lavfi.signalstats.VMAX=512|tag:lavfi.signalstats.SATMIN=0|tag:lavfi.signalstats.SATLOW=0|tag:lavfi.signalstats.SATAVG=0|tag:lavfi.signalstats.SATHIGH=0|tag:lavfi.signalstats.SATMAX=0|tag:lavfi.signalstats.HUEMED=180|tag:lavfi.signalstats.HUEAVG=180|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.YBITDEPTH=6|tag:lavfi.signalstats.UBITDEPTH=1|tag:lavfi.signalstats.VBITDEPTH=1
+pts=0|tag:lavfi.signalstats.YMIN=943|tag:lavfi.signalstats.YLOW=943|tag:lavfi.signalstats.YAVG=943|tag:lavfi.signalstats.YHIGH=943|tag:lavfi.signalstats.YMAX=943|tag:lavfi.signalstats.UMIN=514|tag:lavfi.signalstats.ULOW=514|tag:lavfi.signalstats.UAVG=514|tag:lavfi.signalstats.UHIGH=514|tag:lavfi.signalstats.UMAX=514|tag:lavfi.signalstats.VMIN=514|tag:lavfi.signalstats.VLOW=514|tag:lavfi.signalstats.VAVG=514|tag:lavfi.signalstats.VHIGH=514|tag:lavfi.signalstats.VMAX=514|tag:lavfi.signalstats.SATMIN=2|tag:lavfi.signalstats.SATLOW=2|tag:lavfi.signalstats.SATAVG=2|tag:lavfi.signalstats.SATHIGH=2|tag:lavfi.signalstats.SATMAX=2|tag:lavfi.signalstats.HUEMED=225|tag:lavfi.signalstats.HUEAVG=225|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.YBITDEPTH=8|tag:lavfi.signalstats.UBITDEPTH=2|tag:lavfi.signalstats.VBITDEPTH=2
diff --git a/tests/ref/fate/filter-minterpolate-down b/tests/ref/fate/filter-minterpolate-down
index 4eab7aab85..c298de0779 100644
--- a/tests/ref/fate/filter-minterpolate-down
+++ b/tests/ref/fate/filter-minterpolate-down
@@ -3,4 +3,4 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
+0,          0,          0,        1,   115200, 0xeba70ff3
diff --git a/tests/ref/fate/filter-minterpolate-up b/tests/ref/fate/filter-minterpolate-up
index 1862990783..11fe47e63b 100644
--- a/tests/ref/fate/filter-minterpolate-up
+++ b/tests/ref/fate/filter-minterpolate-up
@@ -3,13 +3,13 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0xf54dba9a
-0,          2,          2,        1,   115200, 0xd0b30f49
-0,          3,          3,        1,   115200, 0x61720dac
-0,          4,          4,        1,   115200, 0xb93a0baa
-0,          5,          5,        1,   115200, 0x6e318ba0
-0,          6,          6,        1,   115200, 0xbce5157a
-0,          7,          7,        1,   115200, 0xe16418a3
-0,          8,          8,        1,   115200, 0xdd91079c
-0,          9,          9,        1,   115200, 0xdf69f73c
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0x56a01933
+0,          2,          2,        1,   115200, 0x14836efb
+0,          3,          3,        1,   115200, 0xb77c6df6
+0,          4,          4,        1,   115200, 0xa9726839
+0,          5,          5,        1,   115200, 0xa764e4d5
+0,          6,          6,        1,   115200, 0xc4b77097
+0,          7,          7,        1,   115200, 0xa371787a
+0,          8,          8,        1,   115200, 0xf7676910
+0,          9,          9,        1,   115200, 0xe95f575f
diff --git a/tests/ref/fate/filter-mpdecimate b/tests/ref/fate/filter-mpdecimate
index d438dacc2e..76359bbc77 100644
--- a/tests/ref/fate/filter-mpdecimate
+++ b/tests/ref/fate/filter-mpdecimate
@@ -3,23 +3,23 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x6e318ba0
-0,          3,          3,        1,   115200, 0x48d65876
-0,          5,          5,        1,   115200, 0x9087e4f1
-0,          6,          6,        1,   115200, 0xc58d5c94
-0,          8,          8,        1,   115200, 0x8c4ad4f4
-0,          9,          9,        1,   115200, 0xf96f6755
-0,         11,         11,        1,   115200, 0x90beb7ba
-0,         12,         12,        1,   115200, 0xa8f4f31b
-0,         14,         14,        1,   115200, 0x21441a03
-0,         15,         15,        1,   115200, 0x393b3494
-0,         17,         17,        1,   115200, 0xc7aeec1d
-0,         18,         18,        1,   115200, 0x2bd24a0e
-0,         20,         20,        1,   115200, 0xea66d804
-0,         21,         21,        1,   115200, 0x237953c3
-0,         23,         23,        1,   115200, 0xff98a9b1
-0,         24,         24,        1,   115200, 0x056d40ca
-0,         26,         26,        1,   115200, 0xa4374737
-0,         27,         27,        1,   115200, 0x3eaa3ae8
-0,         29,         29,        1,   115200, 0x7551e9ee
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0xa764e4d5
+0,          3,          3,        1,   115200, 0x1dadb3a3
+0,          5,          5,        1,   115200, 0x2edb3aa4
+0,          6,          6,        1,   115200, 0xb8cdb7ac
+0,          8,          8,        1,   115200, 0x72f1289d
+0,          9,          9,        1,   115200, 0xb789c3ba
+0,         11,         11,        1,   115200, 0xd779fa6d
+0,         12,         12,        1,   115200, 0xd1084e35
+0,         14,         14,        1,   115200, 0xbbc3728b
+0,         15,         15,        1,   115200, 0x7bbb8ede
+0,         17,         17,        1,   115200, 0x045740bf
+0,         18,         18,        1,   115200, 0x939ba4bd
+0,         20,         20,        1,   115200, 0x3f712b13
+0,         21,         21,        1,   115200, 0x64f1af30
+0,         23,         23,        1,   115200, 0xbe2fec7d
+0,         24,         24,        1,   115200, 0x782e9c2b
+0,         26,         26,        1,   115200, 0x48e5a005
+0,         27,         27,        1,   115200, 0xfcdc9615
+0,         29,         29,        1,   115200, 0xa4473eed
diff --git a/tests/ref/fate/filter-overlay_yuv420p10 b/tests/ref/fate/filter-overlay_yuv420p10
index b431dc6ccb..b3ebee8037 100644
--- a/tests/ref/fate/filter-overlay_yuv420p10
+++ b/tests/ref/fate/filter-overlay_yuv420p10
@@ -3,6 +3,6 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 352x288
 #sar 0: 0/1
-0,          0,          0,        1,   304128, 0x29a6ca86
-0,          1,          1,        1,   304128, 0x82950e6f
-0,          2,          2,        1,   304128, 0x8363d1d8
+0,          0,          0,        1,   304128, 0x524bcfc6
+0,          1,          1,        1,   304128, 0xab3a13af
+0,          2,          2,        1,   304128, 0xac08d718
diff --git a/tests/ref/fate/filter-overlay_yuv422p10 b/tests/ref/fate/filter-overlay_yuv422p10
index 393c08169e..68d7be2ab8 100644
--- a/tests/ref/fate/filter-overlay_yuv422p10
+++ b/tests/ref/fate/filter-overlay_yuv422p10
@@ -3,6 +3,6 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 352x288
 #sar 0: 0/1
-0,          0,          0,        1,   405504, 0x11108b36
-0,          1,          1,        1,   405504, 0x9d5f7c2a
-0,          2,          2,        1,   405504, 0x25373098
+0,          0,          0,        1,   405504, 0x58546ee8
+0,          1,          1,        1,   405504, 0xe9d654b7
+0,          2,          2,        1,   405504, 0x8fb60c61
diff --git a/tests/ref/fate/filter-pixfmts-pad b/tests/ref/fate/filter-pixfmts-pad
index 519473032e..a30658bed3 100644
--- a/tests/ref/fate/filter-pixfmts-pad
+++ b/tests/ref/fate/filter-pixfmts-pad
@@ -6,9 +6,9 @@  bgr0                025d4d5e5691801ba39bc9de70e39df0
 bgr24               f8b65ad845905c7d0c93ca28dfbb826f
 bgra                929aac15e848038e367c250037575f9f
 gbrap               5f16cccab5a17cb766c882e865995167
-gbrap10le           a677322100409f9b1d22136b14bfb534
-gbrap12le           e0e43f838cfbe98086042ba54b5f70be
-gbrap16le           0f4414db67b84a720106d7a3b2435766
+gbrap10le           e63e0a1ae9afd7e6a732f18be194e761
+gbrap12le           eb7a5ff44a9b5b46bb9829838224ed8e
+gbrap16le           d0f6fc33cb75588327aec1b5ad6ab4f0
 gbrp                3c94d39256db2409015df913fd330a90
 gbrp10le            5b356737cd8a396f39bbdadb7cb35e06
 gbrp12le            91fdad0d1edf7bfa2805e2041e8da3cd
@@ -17,63 +17,63 @@  gbrp16le            a6156d1a37e05ee621b2a343fb158bd6
 gbrp9le             9e827f438e081d334a6cae7e282698b0
 gray                ddc663a0491df3959d9c5795dceaa72e
 gray10le            e6559c1c8c05ce89f44b465573db44e7
-gray12le            1e6c6757658c7ae8a1f830432c5b7722
-gray14le            af3f2f911c71cb34a8179a3291b5c90f
-gray16le            468bda6155bdc7a7a20c34d6e599fd16
+gray12le            b066dd276b1698ee77d0c7eb95ff78c5
+gray14le            6d6b293b5d50944c5aa422245987c78e
+gray16le            2734ce1793a2216c5be30816689cd2fe
 gray9le             f8f3dfe31ca5fcba828285bceefdab9a
 nv12                381574979cb04be10c9168540310afad
 nv21                0fdeb2cdd56cf5a7147dc273456fa217
 nv24                193b9eadcc06ad5081609f76249b3e47
 nv42                1738ad3c31c6c16e17679f5b09ce4677
-p010le              c57224f2dc09601c66aa3365b3cd7254
-p016le              c57224f2dc09601c66aa3365b3cd7254
-p210le              abc02945a9b9585f0914716e4787cefb
-p216le              1b43feb94b8a030c0c699aa0deff017b
-p410le              1f0294141ae1657d6c10c6a0d46a879f
-p416le              320e558b7ee8d598231ae0763ecca275
+p010le              fbbc23cc1d764a5e6fb71883d985f3ed
+p016le              fbbc23cc1d764a5e6fb71883d985f3ed
+p210le              680912c059de39c3401cac856bd1b0c1
+p216le              8718662e226a4581561e7bb532af2d83
+p410le              5ca28f2bcc849987810e1f3437b12feb
+p416le              fa4e023d0bf4b03b0ffef3d4d35abf7e
 rgb0                0984eb985dabbe757ed6beb53db84eff
 rgb24               17f9e2e0c609009acaf2175c42d4a2a5
 rgba                b157c90191463d34fb3ce77b36c96386
-xyz12le             85abf80b77a9236a76ba0b00fcbdea2d
-ya16le              d85740ba2cac9fa9ea8aaea8a5864407
+xyz12le             23dadbbba70b2925ce75fb8ba8080ba3
+ya16le              8dbfcb586abf626da7d1aca887a581b9
 ya8                 495daaca2dcb4f7aeba7652768b41ced
 yuv410p             cb871dcc1e84a7ef1d21f9237b88cf6e
 yuv411p             aec2c1740de9a62db0d41f4dda9121b0
 yuv420p             4398e408fc35436ce4b20468946f58b6
-yuv420p10le         74518a7d68457c54da3300e80c683e9c
-yuv420p12le         32086c64c814315aa9253580708a192e
-yuv420p14le         265e9fefb8b92f3cae678eb3cf4e00b4
-yuv420p16le         1ca89e47164d5f2481e39d4ac6eab2ed
-yuv420p9le          59f0209084d1d1dd2861e058d1df63f4
+yuv420p10le         a7d29bbe4e103fc0fb62b465f9540efa
+yuv420p12le         dafaf94e8d16cd846623dcaba0bc81b3
+yuv420p14le         ec80062819bc67f8866ba5105d8378ad
+yuv420p16le         83e437e3d6b7418c4163c24d41e199fa
+yuv420p9le          98a3bede99321386b9abab7926a9f553
 yuv422p             e43d68568d9f782908ba56bf1e09d5d5
-yuv422p10le         18667cf7f87d8ffe1c4cc3db2100c559
-yuv422p12le         71e32220fa1bbdcac95fb57ba0dbd4f0
-yuv422p14le         a0064be4d29079a811e5a315341da09a
-yuv422p16le         836057e9999c763697c66c21869492b8
-yuv422p9le          3213bed797e7b4cefa4f174dc33bf246
+yuv422p10le         e3ec30aacff6c8abf6fe035a195ccd26
+yuv422p12le         921b8d532cf5d0eca4ab0fe9c6d4fef5
+yuv422p14le         dc41548f336883e9fd9664f329bd2a0c
+yuv422p16le         04c87d2fd42cba290a4d4099760e3ee4
+yuv422p9le          994a41c11610075c7b0c466f738f49e7
 yuv440p             a7e34de74c96b0224fe1381ec1db2ba7
-yuv440p10le         f91a481e27be7ea4a38a878e5e4330a3
-yuv440p12le         0e9953a09ac09fe5f1523b350cf7cb72
+yuv440p10le         55787c7260462e50e96f316856adf9dc
+yuv440p12le         869d3d9e0e12df253b79949d2b2c0561
 yuv444p             6bfd89286dc36f2789b77d747ed8fa22
-yuv444p10le         b10afb5fda970dbce8aac5aab981a8cb
-yuv444p12le         8f1b4b0f91d309fdaaec8a1ba6c7107f
-yuv444p14le         2a87a84fa01237de9c08dd7e9ffbf78d
-yuv444p16le         28508867fe7470c3539f8a84e8fb8271
-yuv444p9le          99d39ef897c6037d6c7aa6e7a0398f84
+yuv444p10le         ac3142be3d7b0ec4c1e4450cb8c376ef
+yuv444p12le         4c7f29501e46f4d041222536697941d0
+yuv444p14le         13631aa3ecc332aee3b3360db45011c9
+yuv444p16le         613ec343b593dda43af15f015c193d0a
+yuv444p9le          96fa344943468b5cd36be92b1c05f17f
 yuva420p            842c27169ecdcf6de79f2b787367b51c
-yuva420p10le        336fcb42c5b665c2028661e73325b359
-yuva420p16le        ff45de790e7bdd3c25d8aad51289aba9
-yuva420p9le         8ef1f3b3e01b5ce222e4caeec3dec396
+yuva420p10le        01083d6f0f0c1fc0f76dc46da7f32e50
+yuva420p16le        53d2ea80c2f19b297e3601c06642f97f
+yuva420p9le         8df807c68b0afe6d3d4753752886bb06
 yuva422p            91dcecc4bfdff1f0db9ef8b9b5b9ac2a
-yuva422p10le        1ba292c74c8646fd077a6116142b1bc8
-yuva422p12le        50e59879a9b64ac0fc7f76a110537baa
-yuva422p16le        383226550fe9c93d6e8bf0d45d1423d1
-yuva422p9le         0fb76788c905c6d448143aa3c5eae116
+yuva422p10le        27cb87faf1e8f96a04bed8440862f4eb
+yuva422p12le        ec0cfda381a1044f7af25d993d4b68a0
+yuva422p16le        8b616c87ea907167d27743acfba06d71
+yuva422p9le         eb8b4803e85b5a5c64003c3f713c156f
 yuva444p            fb60941a57596b277417a3c7c00aa194
-yuva444p10le        251ea4ead8300d752eb355a08cbb0352
-yuva444p12le        f38b7c5747b43bcc6d647f143cb069cf
-yuva444p16le        5b65287e1862d2d9f1ad2cfdcde94661
-yuva444p9le         e6946c10b94c271e7ea24b3bcff314e1
+yuva444p10le        89491ef450706faf23341e401750d907
+yuva444p12le        06c47dba21328165dbb7ebb3da0a2fde
+yuva444p16le        d089b119c8dc964de9af12bfb38f89a0
+yuva444p9le         b824d34ac49a1dc483c772e15310afcd
 yuvj411p            87dbac57b211ab4823c1abbd702f1516
 yuvj420p            1abef62bce65131ca4913eb2006fd860
 yuvj422p            198c57b519e2be14b150889bd7f94898
diff --git a/tests/ref/fate/filter-pixfmts-tinterlace_pad b/tests/ref/fate/filter-pixfmts-tinterlace_pad
index 8f6b1c42e2..81a6961215 100644
--- a/tests/ref/fate/filter-pixfmts-tinterlace_pad
+++ b/tests/ref/fate/filter-pixfmts-tinterlace_pad
@@ -2,23 +2,23 @@  gray                7ef396fecd8d1c9fe32173e4415ba671
 yuv410p             35bc11d0d32efc9e9a969be7d720f4e6
 yuv411p             17ef3cd22a74f7368b5e02f68779f294
 yuv420p             93d5b6a4c44d67e4d4447e8dd0bf3d33
-yuv420p10le         14e754c6e9d41cb048ce3c93512d7d35
-yuv420p12le         ce54a2e38d121a7575dff30542facaad
+yuv420p10le         88ad182fc4e29270938512464be38260
+yuv420p12le         11fe824c29883301e54daad1d0e0dc8f
 yuv422p             3ee40b0b6533b9183764b85c853ec3f9
-yuv422p10le         d4b61a84b93e74b07b7020ceed40e39e
-yuv422p12le         8fd90be12a97307645ecfcd09d576643
+yuv422p10le         9e2cf74a9a6fe34243a4e50766d47d5e
+yuv422p12le         82358ff3766b61444c69602d2a042bee
 yuv440p             1d3c1258a51d09e778cd8368b1a4126f
-yuv440p10le         29d116cb550a05920e5619ab58284d30
-yuv440p12le         d7518f941a3b2c137f944afe9da816a1
+yuv440p10le         89ece83dea4a50567109d851b100b982
+yuv440p12le         357b1f84199ef86680d8b86fc876e04b
 yuv444p             1093568ad8f479ec20e738d018dd3f8f
-yuv444p10le         c65233e1d8b01f3369c20738f7386801
-yuv444p12le         70dc51a857bfb215b3a81fceb114b74c
+yuv444p10le         6a34ecd89704817849e89c388503c27e
+yuv444p12le         6a311c441646a084653019d85ad7f839
 yuva420p            4588aef20c0010e514550c9391219724
-yuva420p10le        3181e84fd7aaed606bb86eecd2e13f20
+yuva420p10le        380f36ae2450fbc6e20aea3ad6abb163
 yuva422p            3426ed1ac9429202d8c29fa62a04d4c3
-yuva422p10le        c00acd7c437d41755dff09c5ca3642cf
+yuva422p10le        5c62eaf71afec3f7bc7ae5a327431434
 yuva444p            1b9fc791c7d774b4ba8c9dc836f78cf5
-yuva444p10le        616b42a232c83b8f9e5c5168ec4b5da5
+yuva444p10le        b6161c0f6f5548ba4346a9fda20ea8a8
 yuvj420p            9a872e0c1b3c0b6fe856415696b758bd
 yuvj422p            da3c9ef25528a2ee96746ce44e6969f3
 yuvj440p            a9a5495c6b0e2bf6e561998ea1c356a7
diff --git a/tests/ref/fate/filter-testsrc2-yuv420p b/tests/ref/fate/filter-testsrc2-yuv420p
index aaf93ba02d..4aab3955b8 100644
--- a/tests/ref/fate/filter-testsrc2-yuv420p
+++ b/tests/ref/fate/filter-testsrc2-yuv420p
@@ -3,73 +3,73 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   115200, 0x3744b3ed
-0,          1,          1,        1,   115200, 0x0c1062d6
-0,          2,          2,        1,   115200, 0x201b9db1
-0,          3,          3,        1,   115200, 0x278d887e
-0,          4,          4,        1,   115200, 0x309b9c06
-0,          5,          5,        1,   115200, 0x75e1a17b
-0,          6,          6,        1,   115200, 0xa14e9aca
-0,          7,          7,        1,   115200, 0xb73857e2
-0,          8,          8,        1,   115200, 0x686b77e7
-0,          9,          9,        1,   115200, 0x02b6ab21
-0,         10,         10,        1,   115200, 0x1fc2d693
-0,         11,         11,        1,   115200, 0x296dd4a5
-0,         12,         12,        1,   115200, 0x2d0ba5a4
-0,         13,         13,        1,   115200, 0x59e85f83
-0,         14,         14,        1,   115200, 0xc95a675e
-0,         15,         15,        1,   115200, 0x40426f99
-0,         16,         16,        1,   115200, 0xf040bf35
-0,         17,         17,        1,   115200, 0xc705ccd9
-0,         18,         18,        1,   115200, 0xa76dcd9d
-0,         19,         19,        1,   115200, 0x5635daa5
-0,         20,         20,        1,   115200, 0x3af5d306
-0,         21,         21,        1,   115200, 0x0caf7172
-0,         22,         22,        1,   115200, 0x7161ef8f
-0,         23,         23,        1,   115200, 0xc8ce7fb1
-0,         24,         24,        1,   115200, 0xccf02fed
-0,         25,         25,        1,   115200, 0x81cdf49f
-0,         26,         26,        1,   115200, 0xb9170ee1
-0,         27,         27,        1,   115200, 0x7e7d78d0
-0,         28,         28,        1,   115200, 0xfe4c0185
-0,         29,         29,        1,   115200, 0x9dde4256
-0,         30,         30,        1,   115200, 0x1eb35d69
-0,         31,         31,        1,   115200, 0xad3d2e3f
-0,         32,         32,        1,   115200, 0xf3282aa1
-0,         33,         33,        1,   115200, 0x1cef3c17
-0,         34,         34,        1,   115200, 0x688a442c
-0,         35,         35,        1,   115200, 0x2cdb327a
-0,         36,         36,        1,   115200, 0xe6c16f00
-0,         37,         37,        1,   115200, 0x6f8fac56
-0,         38,         38,        1,   115200, 0x54e8d2a1
-0,         39,         39,        1,   115200, 0x29afc657
-0,         40,         40,        1,   115200, 0xb3138f57
-0,         41,         41,        1,   115200, 0x169041ca
-0,         42,         42,        1,   115200, 0x9e3e4e2b
-0,         43,         43,        1,   115200, 0x192977ac
-0,         44,         44,        1,   115200, 0x4aefe354
-0,         45,         45,        1,   115200, 0xc575c060
-0,         46,         46,        1,   115200, 0xfe3ec033
-0,         47,         47,        1,   115200, 0xab53a3e7
-0,         48,         48,        1,   115200, 0xbe229fcb
-0,         49,         49,        1,   115200, 0x088e58c3
-0,         50,         50,        1,   115200, 0x79eaf2db
-0,         51,         51,        1,   115200, 0xb32489ab
-0,         52,         52,        1,   115200, 0x125d1db7
-0,         53,         53,        1,   115200, 0x81efd887
-0,         54,         54,        1,   115200, 0x0eb22945
-0,         55,         55,        1,   115200, 0x46cca5d0
-0,         56,         56,        1,   115200, 0x636c4203
-0,         57,         57,        1,   115200, 0x3d3074a6
-0,         58,         58,        1,   115200, 0xe92f787e
-0,         59,         59,        1,   115200, 0xd0cd4ecf
-0,         60,         60,        1,   115200, 0xf3ac6472
-0,         61,         61,        1,   115200, 0xac8063b4
-0,         62,         62,        1,   115200, 0x2b0c68f2
-0,         63,         63,        1,   115200, 0xc6173b40
-0,         64,         64,        1,   115200, 0x12c35e41
-0,         65,         65,        1,   115200, 0x57c48fdd
-0,         66,         66,        1,   115200, 0x1079be75
-0,         67,         67,        1,   115200, 0xc8e7d33e
-0,         68,         68,        1,   115200, 0x79cdac12
-0,         69,         69,        1,   115200, 0x8dbe5a5f
+0,          0,          0,        1,   115200, 0xeba70ff3
+0,          1,          1,        1,   115200, 0xb986bcbd
+0,          2,          2,        1,   115200, 0x8567f6cf
+0,          3,          3,        1,   115200, 0xed18e21f
+0,          4,          4,        1,   115200, 0x0054f5dd
+0,          5,          5,        1,   115200, 0x6fedfa63
+0,          6,          6,        1,   115200, 0x3226f459
+0,          7,          7,        1,   115200, 0x04cab318
+0,          8,          8,        1,   115200, 0xa4e0d22b
+0,          9,          9,        1,   115200, 0xc2c4037c
+0,         10,         10,        1,   115200, 0x32332c36
+0,         11,         11,        1,   115200, 0x93892b01
+0,         12,         12,        1,   115200, 0xa611fd70
+0,         13,         13,        1,   115200, 0xc875b905
+0,         14,         14,        1,   115200, 0xe4e2c25a
+0,         15,         15,        1,   115200, 0x0fa5c984
+0,         16,         16,        1,   115200, 0x7f601649
+0,         17,         17,        1,   115200, 0x127c21d0
+0,         18,         18,        1,   115200, 0x5cef2244
+0,         19,         19,        1,   115200, 0x4194305c
+0,         20,         20,        1,   115200, 0xe1342b12
+0,         21,         21,        1,   115200, 0x7c13cdb3
+0,         22,         22,        1,   115200, 0x274845a7
+0,         23,         23,        1,   115200, 0x57d4cca0
+0,         24,         24,        1,   115200, 0x9aa1765a
+0,         25,         25,        1,   115200, 0x939e3b09
+0,         26,         26,        1,   115200, 0xf0045ba2
+0,         27,         27,        1,   115200, 0xc74ace89
+0,         28,         28,        1,   115200, 0x19725c72
+0,         29,         29,        1,   115200, 0x21aa9b86
+0,         30,         30,        1,   115200, 0x1714b5da
+0,         31,         31,        1,   115200, 0xe2fd85e2
+0,         32,         32,        1,   115200, 0x1b498308
+0,         33,         33,        1,   115200, 0xab1994a0
+0,         34,         34,        1,   115200, 0x1cf29d03
+0,         35,         35,        1,   115200, 0x7a068cd1
+0,         36,         36,        1,   115200, 0x5afac88e
+0,         37,         37,        1,   115200, 0x72680431
+0,         38,         38,        1,   115200, 0xe982288c
+0,         39,         39,        1,   115200, 0xcd3d1c48
+0,         40,         40,        1,   115200, 0x05a4e5f5
+0,         41,         41,        1,   115200, 0x14eb99ee
+0,         42,         42,        1,   115200, 0x0fc1a8cc
+0,         43,         43,        1,   115200, 0x460ed0ca
+0,         44,         44,        1,   115200, 0xcaf53a3e
+0,         45,         45,        1,   115200, 0x90dd14e0
+0,         46,         46,        1,   115200, 0xe9531496
+0,         47,         47,        1,   115200, 0xda57f8d6
+0,         48,         48,        1,   115200, 0xb932f7cc
+0,         49,         49,        1,   115200, 0x4669b433
+0,         50,         50,        1,   115200, 0xb59e4897
+0,         51,         51,        1,   115200, 0xc51dd6a1
+0,         52,         52,        1,   115200, 0x0549630f
+0,         53,         53,        1,   115200, 0xbd671e9b
+0,         54,         54,        1,   115200, 0x0e2e7627
+0,         55,         55,        1,   115200, 0x6213fc0b
+0,         56,         56,        1,   115200, 0x58ee9d54
+0,         57,         57,        1,   115200, 0xa5c3ce29
+0,         58,         58,        1,   115200, 0x38b7d09b
+0,         59,         59,        1,   115200, 0x0539a7b6
+0,         60,         60,        1,   115200, 0x2f28bd54
+0,         61,         61,        1,   115200, 0x5a60bc58
+0,         62,         62,        1,   115200, 0x4f8fc1a3
+0,         63,         63,        1,   115200, 0x58169676
+0,         64,         64,        1,   115200, 0x9662b826
+0,         65,         65,        1,   115200, 0x2e92e7c5
+0,         66,         66,        1,   115200, 0x470214d5
+0,         67,         67,        1,   115200, 0xd20929be
+0,         68,         68,        1,   115200, 0xfbb40344
+0,         69,         69,        1,   115200, 0xb55cb3a9
diff --git a/tests/ref/fate/filter-testsrc2-yuv444p b/tests/ref/fate/filter-testsrc2-yuv444p
index 4b60e6afa4..dea8300ee8 100644
--- a/tests/ref/fate/filter-testsrc2-yuv444p
+++ b/tests/ref/fate/filter-testsrc2-yuv444p
@@ -3,73 +3,73 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   230400, 0xbfb96366
-0,          1,          1,        1,   230400, 0xe63ca6e9
-0,          2,          2,        1,   230400, 0xc6acccc8
-0,          3,          3,        1,   230400, 0x6ea1b629
-0,          4,          4,        1,   230400, 0x508477ed
-0,          5,          5,        1,   230400, 0x49d4d57c
-0,          6,          6,        1,   230400, 0xd601a939
-0,          7,          7,        1,   230400, 0x0a0288f3
-0,          8,          8,        1,   230400, 0xa6da89f8
-0,          9,          9,        1,   230400, 0x0490ac8e
-0,         10,         10,        1,   230400, 0x1873ccd2
-0,         11,         11,        1,   230400, 0x64ef9885
-0,         12,         12,        1,   230400, 0x6b8fa2f0
-0,         13,         13,        1,   230400, 0x8d9657a4
-0,         14,         14,        1,   230400, 0xb4af4f21
-0,         15,         15,        1,   230400, 0x64137e0e
-0,         16,         16,        1,   230400, 0xb8b26ce2
-0,         17,         17,        1,   230400, 0xee1e7b00
-0,         18,         18,        1,   230400, 0x1c9b25d8
-0,         19,         19,        1,   230400, 0xe0c761ab
-0,         20,         20,        1,   230400, 0xe1cf0c14
-0,         21,         21,        1,   230400, 0xea380055
-0,         22,         22,        1,   230400, 0x6537716f
-0,         23,         23,        1,   230400, 0x8d9b9380
-0,         24,         24,        1,   230400, 0x9a04e333
-0,         25,         25,        1,   230400, 0x78005375
-0,         26,         26,        1,   230400, 0xc1cc9b9e
-0,         27,         27,        1,   230400, 0x84fda020
-0,         28,         28,        1,   230400, 0x711ef4ab
-0,         29,         29,        1,   230400, 0xccd04c02
-0,         30,         30,        1,   230400, 0xcf2a4bbd
-0,         31,         31,        1,   230400, 0x6d0ef0c0
-0,         32,         32,        1,   230400, 0x46141d09
-0,         33,         33,        1,   230400, 0x3a3d3f71
-0,         34,         34,        1,   230400, 0xe9e7f98f
-0,         35,         35,        1,   230400, 0x0f618ebb
-0,         36,         36,        1,   230400, 0x9c7d07b2
-0,         37,         37,        1,   230400, 0x90f8e960
-0,         38,         38,        1,   230400, 0xe3a856aa
-0,         39,         39,        1,   230400, 0xc66dcd53
-0,         40,         40,        1,   230400, 0xe7c1a281
-0,         41,         41,        1,   230400, 0xff484046
-0,         42,         42,        1,   230400, 0x1f56e486
-0,         43,         43,        1,   230400, 0x46bba179
-0,         44,         44,        1,   230400, 0x05a05e03
-0,         45,         45,        1,   230400, 0x552d3d32
-0,         46,         46,        1,   230400, 0x0899531d
-0,         47,         47,        1,   230400, 0x6321c950
-0,         48,         48,        1,   230400, 0xed67b3cc
-0,         49,         49,        1,   230400, 0x37ec807d
-0,         50,         50,        1,   230400, 0xc6af1344
-0,         51,         51,        1,   230400, 0x2bc9132b
-0,         52,         52,        1,   230400, 0x6024e553
-0,         53,         53,        1,   230400, 0xd7cef4f3
-0,         54,         54,        1,   230400, 0xf7f6eb0d
-0,         55,         55,        1,   230400, 0x0a2ed09e
-0,         56,         56,        1,   230400, 0x8c6883aa
-0,         57,         57,        1,   230400, 0x8542f554
-0,         58,         58,        1,   230400, 0xbebf972f
-0,         59,         59,        1,   230400, 0xf6f5f05f
-0,         60,         60,        1,   230400, 0xa4047f4a
-0,         61,         61,        1,   230400, 0x2b3f3d82
-0,         62,         62,        1,   230400, 0x99d9049a
-0,         63,         63,        1,   230400, 0xe74e5520
-0,         64,         64,        1,   230400, 0x04e2cd3d
-0,         65,         65,        1,   230400, 0x2324e05e
-0,         66,         66,        1,   230400, 0x4e4e3400
-0,         67,         67,        1,   230400, 0xdd547c3e
-0,         68,         68,        1,   230400, 0x1c6c13e4
-0,         69,         69,        1,   230400, 0xf7d2d98b
+0,          0,          0,        1,   230400, 0x8246c007
+0,          1,          1,        1,   230400, 0xd2d501cf
+0,          2,          2,        1,   230400, 0xdf1f26c3
+0,          3,          3,        1,   230400, 0x382310b6
+0,          4,          4,        1,   230400, 0x8f91d242
+0,          5,          5,        1,   230400, 0x5dbb2f6f
+0,          6,          6,        1,   230400, 0x604503bb
+0,          7,          7,        1,   230400, 0x6df5e4e5
+0,          8,          8,        1,   230400, 0x659de4a1
+0,          9,          9,        1,   230400, 0x987b0539
+0,         10,         10,        1,   230400, 0xaaab2384
+0,         11,         11,        1,   230400, 0x5810efe0
+0,         12,         12,        1,   230400, 0x6199fb72
+0,         13,         13,        1,   230400, 0x66d6b1d1
+0,         14,         14,        1,   230400, 0x9fc4ab0d
+0,         15,         15,        1,   230400, 0x5acfd8e5
+0,         16,         16,        1,   230400, 0x7eacc4ea
+0,         17,         17,        1,   230400, 0xd000d086
+0,         18,         18,        1,   230400, 0x80ec7b3c
+0,         19,         19,        1,   230400, 0x9e33b7fb
+0,         20,         20,        1,   230400, 0x31ad6518
+0,         21,         21,        1,   230400, 0x652a5d45
+0,         22,         22,        1,   230400, 0xce5bc872
+0,         23,         23,        1,   230400, 0xade7e144
+0,         24,         24,        1,   230400, 0x537e2a7d
+0,         25,         25,        1,   230400, 0x0e759a3a
+0,         26,         26,        1,   230400, 0xcd93e921
+0,         27,         27,        1,   230400, 0x2153f6a3
+0,         28,         28,        1,   230400, 0xc1bb504c
+0,         29,         29,        1,   230400, 0xfb7ea59e
+0,         30,         30,        1,   230400, 0x1400a4b2
+0,         31,         31,        1,   230400, 0x04494972
+0,         32,         32,        1,   230400, 0x10397662
+0,         33,         33,        1,   230400, 0x748f9891
+0,         34,         34,        1,   230400, 0xb84c52fa
+0,         35,         35,        1,   230400, 0x9cebe9f2
+0,         36,         36,        1,   230400, 0x40a4620f
+0,         37,         37,        1,   230400, 0x03194269
+0,         38,         38,        1,   230400, 0x9ad8ad4f
+0,         39,         39,        1,   230400, 0x3b9d2447
+0,         40,         40,        1,   230400, 0x989df99d
+0,         41,         41,        1,   230400, 0x83e0993e
+0,         42,         42,        1,   230400, 0xf8fc3fd9
+0,         43,         43,        1,   230400, 0x4203fbc1
+0,         44,         44,        1,   230400, 0x22c3b599
+0,         45,         45,        1,   230400, 0x1be8926e
+0,         46,         46,        1,   230400, 0xdc2fa7e1
+0,         47,         47,        1,   230400, 0x0dca1f48
+0,         48,         48,        1,   230400, 0x1b850c96
+0,         49,         49,        1,   230400, 0x08efdcac
+0,         50,         50,        1,   230400, 0xaf3c6970
+0,         51,         51,        1,   230400, 0xe06e609b
+0,         52,         52,        1,   230400, 0xb2b52bce
+0,         53,         53,        1,   230400, 0xbbf53c13
+0,         54,         54,        1,   230400, 0x434d38e1
+0,         55,         55,        1,   230400, 0x64582812
+0,         56,         56,        1,   230400, 0xe40adfec
+0,         57,         57,        1,   230400, 0xb3144fb2
+0,         58,         58,        1,   230400, 0x0ea4f04d
+0,         59,         59,        1,   230400, 0x982249e9
+0,         60,         60,        1,   230400, 0x3c36d921
+0,         61,         61,        1,   230400, 0xe75a96ad
+0,         62,         62,        1,   230400, 0xb7055e41
+0,         63,         63,        1,   230400, 0x90d0b0f3
+0,         64,         64,        1,   230400, 0xa0ae280c
+0,         65,         65,        1,   230400, 0x67bf38f7
+0,         66,         66,        1,   230400, 0x211d8b11
+0,         67,         67,        1,   230400, 0x0463d344
+0,         68,         68,        1,   230400, 0xa3306bec
+0,         69,         69,        1,   230400, 0x784833cc
diff --git a/tests/ref/fate/filter-tpad-add b/tests/ref/fate/filter-tpad-add
index 42386a4765..10e01655a1 100644
--- a/tests/ref/fate/filter-tpad-add
+++ b/tests/ref/fate/filter-tpad-add
@@ -4,8 +4,8 @@ 
 #dimensions 0: 320x240
 #sar 0: 1/1
 0,          0,          0,        1,   115200, 0x2213b502
-0,          1,          1,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x6e318ba0
+0,          1,          1,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0xa764e4d5
 0,          3,          3,        1,   115200, 0x2213b502
 0,          4,          4,        1,   115200, 0x2213b502
 0,          5,          5,        1,   115200, 0x2213b502
diff --git a/tests/ref/fate/filter-tpad-clone b/tests/ref/fate/filter-tpad-clone
index a6893d245f..fceab34b78 100644
--- a/tests/ref/fate/filter-tpad-clone
+++ b/tests/ref/fate/filter-tpad-clone
@@ -4,7 +4,7 @@ 
 #dimensions 0: 320x240
 #sar 0: 1/1
 0,          0,          0,        1,   115200, 0x375ec573
-0,          1,          1,        1,   115200, 0x3744b3ed
-0,          2,          2,        1,   115200, 0x6e318ba0
-0,          3,          3,        1,   115200, 0x6e318ba0
-0,          4,          4,        1,   115200, 0x6e318ba0
+0,          1,          1,        1,   115200, 0xeba70ff3
+0,          2,          2,        1,   115200, 0xa764e4d5
+0,          3,          3,        1,   115200, 0xa764e4d5
+0,          4,          4,        1,   115200, 0xa764e4d5
diff --git a/tests/ref/fate/filter-unsharp-yuv420p10 b/tests/ref/fate/filter-unsharp-yuv420p10
index 513ee78943..302becaa34 100644
--- a/tests/ref/fate/filter-unsharp-yuv420p10
+++ b/tests/ref/fate/filter-unsharp-yuv420p10
@@ -3,23 +3,23 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 320x240
 #sar 0: 1/1
-0,          0,          0,        1,   230400, 0x091f3ed7
-0,          1,          1,        1,   230400, 0x4151292d
-0,          2,          2,        1,   230400, 0xe7066e96
-0,          3,          3,        1,   230400, 0x57c20d15
-0,          4,          4,        1,   230400, 0x01269a37
-0,          5,          5,        1,   230400, 0xb2b04e5c
-0,          6,          6,        1,   230400, 0x98fc479f
-0,          7,          7,        1,   230400, 0x561915bb
-0,          8,          8,        1,   230400, 0xd60c45f7
-0,          9,          9,        1,   230400, 0x747d8a28
-0,         10,         10,        1,   230400, 0x92505d36
-0,         11,         11,        1,   230400, 0x9476af1f
-0,         12,         12,        1,   230400, 0x1382c3d0
-0,         13,         13,        1,   230400, 0x94ea40bd
-0,         14,         14,        1,   230400, 0x8d46229a
-0,         15,         15,        1,   230400, 0xe5736654
-0,         16,         16,        1,   230400, 0x04bd4db2
-0,         17,         17,        1,   230400, 0x4d721ad2
-0,         18,         18,        1,   230400, 0xebe151a2
-0,         19,         19,        1,   230400, 0xa1263f01
+0,          0,          0,        1,   230400, 0x5166b2b0
+0,          1,          1,        1,   230400, 0x1fcc8e0e
+0,          2,          2,        1,   230400, 0xce04db47
+0,          3,          3,        1,   230400, 0xc25661af
+0,          4,          4,        1,   230400, 0x727f06aa
+0,          5,          5,        1,   230400, 0x2e0f9cc5
+0,          6,          6,        1,   230400, 0x407fb93b
+0,          7,          7,        1,   230400, 0xc19c2087
+0,          8,          8,        1,   230400, 0xacacb223
+0,          9,          9,        1,   230400, 0x1277e355
+0,         10,         10,        1,   230400, 0xcd36c65d
+0,         11,         11,        1,   230400, 0x6c530182
+0,         12,         12,        1,   230400, 0x803b2da3
+0,         13,         13,        1,   230400, 0x82638dc2
+0,         14,         14,        1,   230400, 0x2064904b
+0,         15,         15,        1,   230400, 0xce3a7092
+0,         16,         16,        1,   230400, 0x374abb39
+0,         17,         17,        1,   230400, 0xf8b37d16
+0,         18,         18,        1,   230400, 0xb3d1c642
+0,         19,         19,        1,   230400, 0xc9b392d1
diff --git a/tests/ref/fate/filter-untile b/tests/ref/fate/filter-untile
index 42c741acf1..9180bf8bae 100644
--- a/tests/ref/fate/filter-untile
+++ b/tests/ref/fate/filter-untile
@@ -3,11 +3,11 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 160x120
 #sar 0: 1/1
-0,          0,          0,        1,    28800, 0xb3725302
-0,          1,          1,        1,    28800, 0xf9612057
-0,          2,          2,        1,    28800, 0x9b207db0
-0,          3,          3,        1,    28800, 0x1331c2d5
-0,          4,          4,        1,    28800, 0x2edf3ee4
-0,          5,          5,        1,    28800, 0x84105711
-0,          6,          6,        1,    28800, 0xa7a35f25
-0,          7,          7,        1,    28800, 0xa9c49677
+0,          0,          0,        1,    28800, 0xcb69686a
+0,          1,          1,        1,    28800, 0xb9c13766
+0,          2,          2,        1,    28800, 0xeb439680
+0,          3,          3,        1,    28800, 0x16e9d985
+0,          4,          4,        1,    28800, 0x2f985496
+0,          5,          5,        1,    28800, 0xf71f6f72
+0,          6,          6,        1,    28800, 0x0d447518
+0,          7,          7,        1,    28800, 0xf990aba6