diff mbox

[FFmpeg-devel,1/2] libavfilter/vf_fps: Add more fate tests

Message ID 1518811322.23857.5.camel@kepstin.ca
State Accepted
Commit d2fc244293b531cf1ce175155f74202b697a7a23
Headers show

Commit Message

Calvin Walton Feb. 16, 2018, 8:02 p.m. UTC
These tests cover specific rounding behaviour, to ensure that I don't
introduce any regressions with the rewritten "activate" callback based
fps filter.
---
 tests/fate/filter-video.mak               | 10 +++++++++-
 tests/ref/fate/filter-fps-down            | 15 +++++++++++++++
 tests/ref/fate/filter-fps-down-eof-pass   | 16 ++++++++++++++++
 tests/ref/fate/filter-fps-down-round-down | 15 +++++++++++++++
 tests/ref/fate/filter-fps-down-round-up   | 16 ++++++++++++++++
 tests/ref/fate/filter-fps-up              | 17 +++++++++++++++++
 tests/ref/fate/filter-fps-up-round-down   | 16 ++++++++++++++++
 tests/ref/fate/filter-fps-up-round-up     | 17 +++++++++++++++++
 8 files changed, 121 insertions(+), 1 deletion(-)
 create mode 100644 tests/ref/fate/filter-fps-down
 create mode 100644 tests/ref/fate/filter-fps-down-eof-pass
 create mode 100644 tests/ref/fate/filter-fps-down-round-down
 create mode 100644 tests/ref/fate/filter-fps-down-round-up
 create mode 100644 tests/ref/fate/filter-fps-up
 create mode 100644 tests/ref/fate/filter-fps-up-round-down
 create mode 100644 tests/ref/fate/filter-fps-up-round-up

Comments

Michael Niedermayer Feb. 17, 2018, 7:30 p.m. UTC | #1
On Fri, Feb 16, 2018 at 03:02:02PM -0500, Calvin Walton wrote:
> These tests cover specific rounding behaviour, to ensure that I don't
> introduce any regressions with the rewritten "activate" callback based
> fps filter.
> ---
>  tests/fate/filter-video.mak               | 10 +++++++++-
>  tests/ref/fate/filter-fps-down            | 15 +++++++++++++++
>  tests/ref/fate/filter-fps-down-eof-pass   | 16 ++++++++++++++++
>  tests/ref/fate/filter-fps-down-round-down | 15 +++++++++++++++
>  tests/ref/fate/filter-fps-down-round-up   | 16 ++++++++++++++++
>  tests/ref/fate/filter-fps-up              | 17 +++++++++++++++++
>  tests/ref/fate/filter-fps-up-round-down   | 16 ++++++++++++++++
>  tests/ref/fate/filter-fps-up-round-up     | 17 +++++++++++++++++
>  8 files changed, 121 insertions(+), 1 deletion(-)
>  create mode 100644 tests/ref/fate/filter-fps-down
>  create mode 100644 tests/ref/fate/filter-fps-down-eof-pass
>  create mode 100644 tests/ref/fate/filter-fps-down-round-down
>  create mode 100644 tests/ref/fate/filter-fps-down-round-up
>  create mode 100644 tests/ref/fate/filter-fps-up
>  create mode 100644 tests/ref/fate/filter-fps-up-round-down
>  create mode 100644 tests/ref/fate/filter-fps-up-round-up

more tests are good, will apply

thx

[...]
diff mbox

Patch

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 221ae81fdc..e3e128cf67 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -108,7 +108,6 @@  FATE_FILTER-$(call ALLYES, AVDEVICE TESTSRC_FILTER FORMAT_FILTER CONCAT_FILTER S
 fate-filter-lavd-scalenorm: tests/data/filtergraphs/scalenorm
 fate-filter-lavd-scalenorm: CMD = framecrc -f lavfi -graph_file $(TARGET_PATH)/tests/data/filtergraphs/scalenorm -i dummy
 
-
 FATE_FILTER-$(call ALLYES, FRAMERATE_FILTER TESTSRC2_FILTER) += fate-filter-framerate-up fate-filter-framerate-down
 fate-filter-framerate-up: CMD = framecrc -lavfi testsrc2=r=2:d=10,framerate=fps=10 -t 1
 fate-filter-framerate-down: CMD = framecrc -lavfi testsrc2=r=2:d=10,framerate=fps=1 -t 1
@@ -426,6 +425,15 @@  fate-filter-concat: CMD = framecrc -filter_complex_script $(TARGET_PATH)/tests/d
 FATE_FILTER-$(call ALLYES, TESTSRC2_FILTER FPS_FILTER MPDECIMATE_FILTER) += fate-filter-mpdecimate
 fate-filter-mpdecimate: CMD = framecrc -lavfi testsrc2=r=2:d=10,fps=3,mpdecimate -r 3 -pix_fmt yuv420p
 
+FATE_FILTER-$(call ALLYES, FPS_FILTER TESTSRC2_FILTER) += fate-filter-fps-up fate-filter-fps-up-round-down fate-filter-fps-up-round-up fate-filter-fps-down fate-filter-fps-down-round-down fate-filter-fps-down-round-up fate-filter-fps-down-eof-pass
+fate-filter-fps-up: CMD = framecrc -lavfi testsrc2=r=3:d=2,fps=7
+fate-filter-fps-up-round-down: CMD = framecrc -lavfi testsrc2=r=3:d=2,fps=7:round=down
+fate-filter-fps-up-round-up: CMD = framecrc -lavfi testsrc2=r=3:d=2,fps=7:round=up
+fate-filter-fps-down: CMD = framecrc -lavfi testsrc2=r=7:d=3.5,fps=3
+fate-filter-fps-down-round-down: CMD = framecrc -lavfi testsrc2=r=7:d=3.5,fps=3:round=down
+fate-filter-fps-down-round-up: CMD = framecrc -lavfi testsrc2=r=7:d=3.5,fps=3:round=up
+fate-filter-fps-down-eof-pass: CMD = framecrc -lavfi testsrc2=r=7:d=3.5,fps=3:eof_action=pass
+
 FATE_FILTER_SAMPLES-$(call ALLYES, MOV_DEMUXER FPS_FILTER QTRLE_DECODER) += fate-filter-fps-cfr fate-filter-fps fate-filter-fps-r
 fate-filter-fps-cfr: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/apple-animation-variable-fps-bug.mov -r 30 -vsync cfr -pix_fmt yuv420p
 fate-filter-fps-r:   CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/apple-animation-variable-fps-bug.mov -r 30 -vf fps -pix_fmt yuv420p
diff --git a/tests/ref/fate/filter-fps-down b/tests/ref/fate/filter-fps-down
new file mode 100644
index 0000000000..eb8b368985
--- /dev/null
+++ b/tests/ref/fate/filter-fps-down
@@ -0,0 +1,15 @@ 
+#tb 0: 1/3
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-down-eof-pass b/tests/ref/fate/filter-fps-down-eof-pass
new file mode 100644
index 0000000000..0b6725f037
--- /dev/null
+++ b/tests/ref/fate/filter-fps-down-eof-pass
@@ -0,0 +1,16 @@ 
+#tb 0: 1/3
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-down-round-down b/tests/ref/fate/filter-fps-down-round-down
new file mode 100644
index 0000000000..4440539b6f
--- /dev/null
+++ b/tests/ref/fate/filter-fps-down-round-down
@@ -0,0 +1,15 @@ 
+#tb 0: 1/3
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-down-round-up b/tests/ref/fate/filter-fps-down-round-up
new file mode 100644
index 0000000000..c3cf02fd24
--- /dev/null
+++ b/tests/ref/fate/filter-fps-down-round-up
@@ -0,0 +1,16 @@ 
+#tb 0: 1/3
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-up b/tests/ref/fate/filter-fps-up
new file mode 100644
index 0000000000..f1a847864f
--- /dev/null
+++ b/tests/ref/fate/filter-fps-up
@@ -0,0 +1,17 @@ 
+#tb 0: 1/7
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-up-round-down b/tests/ref/fate/filter-fps-up-round-down
new file mode 100644
index 0000000000..daecb125e3
--- /dev/null
+++ b/tests/ref/fate/filter-fps-up-round-down
@@ -0,0 +1,16 @@ 
+#tb 0: 1/7
+#media_type 0: video
+#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
diff --git a/tests/ref/fate/filter-fps-up-round-up b/tests/ref/fate/filter-fps-up-round-up
new file mode 100644
index 0000000000..d69dbf67ff
--- /dev/null
+++ b/tests/ref/fate/filter-fps-up-round-up
@@ -0,0 +1,17 @@ 
+#tb 0: 1/7
+#media_type 0: video
+#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