From ddba05afe4d325bf8e545b8f1777d6010cc25e93 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Thu, 25 Jun 2020 20:45:53 +0200 Subject: lavfi/vsrc_testsrc: switch to activate. Allow to set the EOF timestamp. Also: doc/filters/testsrc*: specify the rounding of the duration option. The changes in the ref files are right. For filter-fps-down, the graph is testsrc2=r=7:d=3.5,fps=3. 3.5=24.5/7, so the EOF of testsrc2 will have PTS 25/7. 25/7=(10+5/7)/3, so the EOF PTS for fps should be 11/7, and the output should contain a frame at PTS 10. For filter-fps-up, the graph is testsrc2=r=3:d=2,fps=7, for filter-fps-up-round-down and filter-fps-up-round-up it is the same with explicit rounding options. But there is no rounding: testsrc2 produces exactly 6 frames and 2 seconds, fps converts it into exactly 14 frames. The tests should probably be adjusted to restore them to a useful coverage. --- tests/ref/fate/filter-fps-down | 1 + tests/ref/fate/filter-fps-up | 2 ++ tests/ref/fate/filter-fps-up-round-down | 3 +++ tests/ref/fate/filter-fps-up-round-up | 2 ++ tests/ref/fate/filter-mpdecimate | 1 + 5 files changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/ref/fate/filter-fps-down b/tests/ref/fate/filter-fps-down index eb8b368985..0b6725f037 100644 --- a/tests/ref/fate/filter-fps-down +++ b/tests/ref/fate/filter-fps-down @@ -13,3 +13,4 @@ 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-up b/tests/ref/fate/filter-fps-up index f1a847864f..dfb957c63a 100644 --- a/tests/ref/fate/filter-fps-up +++ b/tests/ref/fate/filter-fps-up @@ -15,3 +15,5 @@ 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 diff --git a/tests/ref/fate/filter-fps-up-round-down b/tests/ref/fate/filter-fps-up-round-down index daecb125e3..b68e4fe972 100644 --- a/tests/ref/fate/filter-fps-up-round-down +++ b/tests/ref/fate/filter-fps-up-round-down @@ -14,3 +14,6 @@ 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 diff --git a/tests/ref/fate/filter-fps-up-round-up b/tests/ref/fate/filter-fps-up-round-up index d69dbf67ff..692c1d6c69 100644 --- a/tests/ref/fate/filter-fps-up-round-up +++ b/tests/ref/fate/filter-fps-up-round-up @@ -15,3 +15,5 @@ 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 diff --git a/tests/ref/fate/filter-mpdecimate b/tests/ref/fate/filter-mpdecimate index 9c1dc36562..d438dacc2e 100644 --- a/tests/ref/fate/filter-mpdecimate +++ b/tests/ref/fate/filter-mpdecimate @@ -22,3 +22,4 @@ 0, 24, 24, 1, 115200, 0x056d40ca 0, 26, 26, 1, 115200, 0xa4374737 0, 27, 27, 1, 115200, 0x3eaa3ae8 +0, 29, 29, 1, 115200, 0x7551e9ee -- cgit v1.2.3