summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-04-02 19:30:11 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-30 11:24:57 +0200
commita1e05b0487a1939334c2920fc7f9936bc9efe876 (patch)
tree6aec5577b04f68d9a6d42176f7d9f489911ac2cb /tests
parentb472938233b98178ed6c1353c37e0dc7ab585902 (diff)
lavfi: add trim and atrim filters.
Diffstat (limited to 'tests')
-rw-r--r--tests/fate/filter-audio.mak16
-rw-r--r--tests/fate/filter-video.mak14
-rw-r--r--tests/ref/fate/filter-atrim-duration2
-rw-r--r--tests/ref/fate/filter-atrim-mixed5
-rw-r--r--tests/ref/fate/filter-atrim-samples2
-rw-r--r--tests/ref/fate/filter-atrim-time6
-rw-r--r--tests/ref/fate/filter-trim-duration2
-rw-r--r--tests/ref/fate/filter-trim-frame8
-rw-r--r--tests/ref/fate/filter-trim-mixed10
-rw-r--r--tests/ref/fate/filter-trim-time3
10 files changed, 68 insertions, 0 deletions
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 7f1a056f9a..ac025c4b08 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -25,6 +25,22 @@ fate-filter-asyncts: CMD = pcm -analyzeduration 10000000 -i $(SRC) -af asyncts
fate-filter-asyncts: CMP = oneoff
fate-filter-asyncts: REF = $(SAMPLES)/nellymoser/nellymoser-discont.pcm
+FATE_ATRIM += fate-filter-atrim-duration
+fate-filter-atrim-duration: CMD = framecrc -i $(SRC) -af atrim=start=0.1:duration=0.01
+FATE_ATRIM += fate-filter-atrim-mixed
+fate-filter-atrim-mixed: CMD = framecrc -i $(SRC) -af atrim=start=0.05:start_sample=1025:end=0.1:end_sample=4411
+
+FATE_ATRIM += fate-filter-atrim-samples
+fate-filter-atrim-samples: CMD = framecrc -i $(SRC) -af atrim=start_sample=26:end_sample=80
+
+FATE_ATRIM += fate-filter-atrim-time
+fate-filter-atrim-time: CMD = framecrc -i $(SRC) -af atrim=0.1:0.2
+
+$(FATE_ATRIM): tests/data/asynth-44100-2.wav
+$(FATE_ATRIM): SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+
+FATE_FILTER-$(call FILTERDEMDECENCMUX, ATRIM, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_ATRIM)
+
FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-channelmap
fate-filter-channelmap: SRC = $(TARGET_PATH)/tests/data/asynth-44100-6.wav
fate-filter-channelmap: tests/data/asynth-44100-6.wav
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index c85161ac81..ed4c70af15 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -42,6 +42,20 @@ fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(SRC_PA
FATE_FILTER_VSYNTH-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-transpose
fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose
+FATE_TRIM += fate-filter-trim-duration
+fate-filter-trim-duration: CMD = framecrc -i $(SRC) -vf trim=start=0.4:duration=0.05
+
+FATE_TRIM += fate-filter-trim-frame
+fate-filter-trim-frame: CMD = framecrc -i $(SRC) -vf trim=start_frame=3:end_frame=10
+
+FATE_TRIM += fate-filter-trim-mixed
+fate-filter-trim-mixed: CMD = framecrc -i $(SRC) -vf trim=start=0.2:end=0.4:start_frame=1:end_frame=3
+
+FATE_TRIM += fate-filter-trim-time
+fate-filter-trim-time: CMD = framecrc -i $(SRC) -vf trim=0:0.1
+
+FATE_FILTER_VSYNTH-$(CONFIG_TRIM_FILTER) += $(FATE_TRIM)
+
FATE_FILTER_VSYNTH-$(CONFIG_UNSHARP_FILTER) += fate-filter-unsharp
fate-filter-unsharp: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf unsharp
diff --git a/tests/ref/fate/filter-atrim-duration b/tests/ref/fate/filter-atrim-duration
new file mode 100644
index 0000000000..a51dff7dfd
--- /dev/null
+++ b/tests/ref/fate/filter-atrim-duration
@@ -0,0 +1,2 @@
+#tb 0: 1/44100
+0, 4410, 4410, 441, 1764, 0x61e374f7
diff --git a/tests/ref/fate/filter-atrim-mixed b/tests/ref/fate/filter-atrim-mixed
new file mode 100644
index 0000000000..ae3281a1a8
--- /dev/null
+++ b/tests/ref/fate/filter-atrim-mixed
@@ -0,0 +1,5 @@
+#tb 0: 1/44100
+0, 1025, 1025, 1023, 4092, 0x78560a4c
+0, 2048, 2048, 1024, 4096, 0xc477fa99
+0, 3072, 3072, 1024, 4096, 0x3bc0f14f
+0, 4096, 4096, 315, 1260, 0xe4b26b50
diff --git a/tests/ref/fate/filter-atrim-samples b/tests/ref/fate/filter-atrim-samples
new file mode 100644
index 0000000000..3461666394
--- /dev/null
+++ b/tests/ref/fate/filter-atrim-samples
@@ -0,0 +1,2 @@
+#tb 0: 1/44100
+0, 26, 26, 54, 216, 0x6b376c6c
diff --git a/tests/ref/fate/filter-atrim-time b/tests/ref/fate/filter-atrim-time
new file mode 100644
index 0000000000..a3682101ce
--- /dev/null
+++ b/tests/ref/fate/filter-atrim-time
@@ -0,0 +1,6 @@
+#tb 0: 1/44100
+0, 4410, 4410, 710, 2840, 0x658982a3
+0, 5120, 5120, 1024, 4096, 0xfd6a0070
+0, 6144, 6144, 1024, 4096, 0x0b01f4cf
+0, 7168, 7168, 1024, 4096, 0x6716fd93
+0, 8192, 8192, 628, 2512, 0xda5ddff8
diff --git a/tests/ref/fate/filter-trim-duration b/tests/ref/fate/filter-trim-duration
new file mode 100644
index 0000000000..db74add00e
--- /dev/null
+++ b/tests/ref/fate/filter-trim-duration
@@ -0,0 +1,2 @@
+#tb 0: 1/25
+0, 10, 10, 1, 152064, 0xb45c4760
diff --git a/tests/ref/fate/filter-trim-frame b/tests/ref/fate/filter-trim-frame
new file mode 100644
index 0000000000..1749afd38b
--- /dev/null
+++ b/tests/ref/fate/filter-trim-frame
@@ -0,0 +1,8 @@
+#tb 0: 1/25
+0, 3, 3, 1, 152064, 0xceb080b0
+0, 4, 4, 1, 152064, 0x473db652
+0, 5, 5, 1, 152064, 0x287da8e6
+0, 6, 6, 1, 152064, 0x68b47c23
+0, 7, 7, 1, 152064, 0xe9028bac
+0, 8, 8, 1, 152064, 0x28ff8026
+0, 9, 9, 1, 152064, 0x2d7c3915
diff --git a/tests/ref/fate/filter-trim-mixed b/tests/ref/fate/filter-trim-mixed
new file mode 100644
index 0000000000..5e003f665a
--- /dev/null
+++ b/tests/ref/fate/filter-trim-mixed
@@ -0,0 +1,10 @@
+#tb 0: 1/25
+0, 1, 1, 1, 152064, 0x7f5f6551
+0, 2, 2, 1, 152064, 0xc566f64a
+0, 3, 3, 1, 152064, 0xceb080b0
+0, 4, 4, 1, 152064, 0x473db652
+0, 5, 5, 1, 152064, 0x287da8e6
+0, 6, 6, 1, 152064, 0x68b47c23
+0, 7, 7, 1, 152064, 0xe9028bac
+0, 8, 8, 1, 152064, 0x28ff8026
+0, 9, 9, 1, 152064, 0x2d7c3915
diff --git a/tests/ref/fate/filter-trim-time b/tests/ref/fate/filter-trim-time
new file mode 100644
index 0000000000..2f860258bd
--- /dev/null
+++ b/tests/ref/fate/filter-trim-time
@@ -0,0 +1,3 @@
+#tb 0: 1/25
+0, 0, 0, 1, 152064, 0x6e4f89ef
+0, 1, 1, 1, 152064, 0x7f5f6551