tests: Move all test programs to a subdirectory
[libav.git] / tests / fate / filter-video.mak
CommitLineData
bc7fbd36 1FATE_FILTER-$(call FILTERDEMDEC, DELOGO, RM, RV30) += fate-filter-delogo
ba13606c 2fate-filter-delogo: CMD = framecrc -i $(TARGET_SAMPLES)/real/rv30.rm -vf delogo=show=0:x=290:y=25:w=26:h=16 -an
8112710f 3
bc7fbd36 4FATE_YADIF += fate-filter-yadif-mode0
ba13606c 5fate-filter-yadif-mode0: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -vf yadif=0
bc7fbd36
DB
6
7FATE_YADIF += fate-filter-yadif-mode1
ba13606c 8fate-filter-yadif-mode1: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -vf yadif=1
bc7fbd36
DB
9
10FATE_FILTER-$(call FILTERDEMDEC, YADIF, MPEGTS, MPEG2VIDEO) += $(FATE_YADIF)
11
12FATE_SAMPLES_AVCONV += $(FATE_FILTER-yes)
13
14
15FATE_FILTER_VSYNTH-$(CONFIG_BOXBLUR_FILTER) += fate-filter-boxblur
16fate-filter-boxblur: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf boxblur=2:1
8112710f 17
feb4922b
AK
18FATE_FILTER_VSYNTH-$(CONFIG_DRAWBOX_FILTER) += fate-filter-drawbox
19fate-filter-drawbox: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf drawbox=10:20:200:60:red@0.5
20
1a6d4bd7
AK
21FATE_FILTER_VSYNTH-$(CONFIG_FADE_FILTER) += fate-filter-fade
22fate-filter-fade: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf fade=in:0:25,fade=out:25:25
23
157dc0b4 24FATE_FILTER_VSYNTH-$(call ALLYES, INTERLACE_FILTER FIELDORDER_FILTER) += fate-filter-fieldorder
79ef4b19 25fate-filter-fieldorder: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf interlace=tff,fieldorder=bff -sws_flags +accurate_rnd+bitexact
157dc0b4 26
11d704dc
VG
27define FATE_FPFILTER_SUITE
28FATE_FILTER_VSYNTH-$(CONFIG_FRAMEPACK_FILTER) += fate-filter-framepack-$(1)
29fate-filter-framepack-$(1): CMD = framecrc -c:v pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -c:v pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -filter_complex framepack=$(1) -frames 15
30endef
31
32FPMODES = columns frameseq lines sbs tab
33$(foreach MODE,$(FPMODES),$(eval $(call FATE_FPFILTER_SUITE,$(MODE))))
34
7cec1274
AK
35FATE_FILTER_VSYNTH-$(CONFIG_GRADFUN_FILTER) += fate-filter-gradfun
36fate-filter-gradfun: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf gradfun
37
71f3ede2
AK
38FATE_FILTER_VSYNTH-$(CONFIG_HQDN3D_FILTER) += fate-filter-hqdn3d
39fate-filter-hqdn3d: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf hqdn3d
40
25882a7f
VG
41FATE_FILTER_VSYNTH-$(CONFIG_INTERLACE_FILTER) += fate-filter-interlace
42fate-filter-interlace: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf interlace
43
f9174203
AK
44FATE_FILTER_VSYNTH-$(CONFIG_NEGATE_FILTER) += fate-filter-negate
45fate-filter-negate: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf negate
46
3d8c80b6 47FATE_FILTER_VSYNTH-$(CONFIG_OVERLAY_FILTER) += fate-filter-overlay
4a27a52a
MS
48fate-filter-overlay: tests/data/filtergraphs/overlay
49fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/overlay
3d8c80b6 50
874838dc
VG
51FATE_FILTER_VSYNTH-$(CONFIG_SELECT_FILTER) += fate-filter-select-alternate
52fate-filter-select-alternate: tests/data/filtergraphs/select-alternate
53fate-filter-select-alternate: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(TARGET_PATH)/tests/data/filtergraphs/select-alternate
54
ea290d91 55FATE_FILTER_VSYNTH-$(call ALLYES, SETPTS_FILTER SETTB_FILTER) += fate-filter-setpts
4a27a52a
MS
56fate-filter-setpts: tests/data/filtergraphs/setpts
57fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(TARGET_PATH)/tests/data/filtergraphs/setpts
ea290d91 58
e1f2987b
AK
59FATE_SHUFFLEPLANES += fate-filter-shuffleplanes-dup-luma
60fate-filter-shuffleplanes-dup-luma: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf format=yuva444p,shuffleplanes=0:0:0:0
61
62FATE_SHUFFLEPLANES += fate-filter-shuffleplanes-swapuv
63fate-filter-shuffleplanes-swapuv: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf shuffleplanes=0:2:1
64
65FATE_FILTER_VSYNTH-$(CONFIG_SHUFFLEPLANES_FILTER) += $(FATE_SHUFFLEPLANES)
66
0bdbd85e
AK
67FATE_FILTER_VSYNTH-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-transpose
68fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose
69
a1e05b04
AK
70FATE_TRIM += fate-filter-trim-duration
71fate-filter-trim-duration: CMD = framecrc -i $(SRC) -vf trim=start=0.4:duration=0.05
72
73FATE_TRIM += fate-filter-trim-frame
74fate-filter-trim-frame: CMD = framecrc -i $(SRC) -vf trim=start_frame=3:end_frame=10
75
76FATE_TRIM += fate-filter-trim-mixed
77fate-filter-trim-mixed: CMD = framecrc -i $(SRC) -vf trim=start=0.2:end=0.4:start_frame=1:end_frame=3
78
79FATE_TRIM += fate-filter-trim-time
cd4bfe3a 80fate-filter-trim-time: CMD = framecrc -i $(SRC) -vf trim=0:0.09
a1e05b04
AK
81
82FATE_FILTER_VSYNTH-$(CONFIG_TRIM_FILTER) += $(FATE_TRIM)
83
ad85e8d9
AK
84FATE_FILTER_VSYNTH-$(CONFIG_UNSHARP_FILTER) += fate-filter-unsharp
85fate-filter-unsharp: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf unsharp
86
8f9537f3 87
03b052c0
DB
88FATE_FILTER_VSYNTH-$(CONFIG_CROP_FILTER) += fate-filter-crop
89fate-filter-crop: CMD = video_filter "crop=iw-100:ih-100:100:100"
90
91FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER SCALE_FILTER) += fate-filter-crop_scale
52ea2986 92fate-filter-crop_scale: CMD = video_filter "crop=iw-100:ih-100:100:100,scale=w=400:h=-1"
03b052c0
DB
93
94FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER SCALE_FILTER VFLIP_FILTER) += fate-filter-crop_scale_vflip
52ea2986 95fate-filter-crop_scale_vflip: CMD = video_filter "null,null,crop=iw-200:ih-200:200:200,crop=iw-20:ih-20:20:20,scale=w=200:h=200,scale=w=250:h=250,vflip,vflip,null,scale=w=200:h=200,crop=iw-100:ih-100:100:100,vflip,scale=w=200:h=200,null,vflip,crop=iw-100:ih-100:100:100,null"
03b052c0
DB
96
97FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER VFLIP_FILTER) += fate-filter-crop_vflip
98fate-filter-crop_vflip: CMD = video_filter "crop=iw-100:ih-100:100:100,vflip"
99
100FATE_FILTER_VSYNTH-$(CONFIG_NULL_FILTER) += fate-filter-null
101fate-filter-null: CMD = video_filter "null"
102
103FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scale200
52ea2986 104fate-filter-scale200: CMD = video_filter "scale=w=200:h=200"
03b052c0
DB
105
106FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scale500
52ea2986 107fate-filter-scale500: CMD = video_filter "scale=w=500:h=500"
03b052c0
DB
108
109FATE_FILTER_VSYNTH-$(CONFIG_VFLIP_FILTER) += fate-filter-vflip
110fate-filter-vflip: CMD = video_filter "vflip"
111
112FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER VFLIP_FILTER) += fate-filter-vflip_crop
113fate-filter-vflip_crop: CMD = video_filter "vflip,crop=iw-100:ih-100:100:100"
114
115FATE_FILTER_VSYNTH-$(CONFIG_VFLIP_FILTER) += fate-filter-vflip_vflip
116fate-filter-vflip_vflip: CMD = video_filter "vflip,vflip"
117
118
706208ef
DB
119tests/pixfmts.mak: TAG = GEN
120tests/pixfmts.mak: avconv$(EXESUF)
121 $(M)printf "PIXFMTS = " > $@
122 $(Q)$(TARGET_EXEC) $(TARGET_PATH)/$< -pix_fmts list 2> /dev/null | awk 'NR > 8 && /^IO/ { printf $$2 " " }' >> $@
123 $(Q)printf "\n" >> $@
124
d395895c 125RUNNING_PIXFMTS_TESTS := $(filter check fate fate-list fate-filter fate-vfilter fate-filter-pixdesc%,$(MAKECMDGOALS))
eee813ee
DB
126
127ifneq (,$(RUNNING_PIXFMTS_TESTS))
706208ef
DB
128-include tests/pixfmts.mak
129endif
130
131define PIXDESC_TEST
132FATE_FILTER_PIXDESC-$(CONFIG_FORMAT_FILTER) += fate-filter-pixdesc-$(1)
133fate-filter-pixdesc-$(1): CMD = video_filter "format=$(1),pixdesctest" -pix_fmt $(1)
134endef
135
136$(foreach fmt, $(PIXFMTS), $(eval $(call PIXDESC_TEST,$(fmt))))
137
138fate-filter-pixdesc: $(FATE_FILTER_PIXDESC-yes)
139FATE_FILTER_VSYNTH-yes += $(FATE_FILTER_PIXDESC-yes)
28663511
DB
140
141
b963f021
DB
142FATE_FILTER_PIXFMTS += fate-filter-pixfmts-copy
143fate-filter-pixfmts-copy: CMD = pixfmts
144
145FATE_FILTER_PIXFMTS += fate-filter-pixfmts-crop
146fate-filter-pixfmts-crop: CMD = pixfmts "100:100:100:100"
147
148FATE_FILTER_PIXFMTS += fate-filter-pixfmts-hflip
149fate-filter-pixfmts-hflip: CMD = pixfmts
150
151FATE_FILTER_PIXFMTS += fate-filter-pixfmts-null
152fate-filter-pixfmts-null: CMD = pixfmts
153
154FATE_FILTER_PIXFMTS += fate-filter-pixfmts-pad
155fate-filter-pixfmts-pad: CMD = pixfmts "500:400:20:20"
156
157FATE_FILTER_PIXFMTS += fate-filter-pixfmts-scale
158fate-filter-pixfmts-scale: CMD = pixfmts "200:100"
159
160FATE_FILTER_PIXFMTS += fate-filter-pixfmts-vflip
161fate-filter-pixfmts-vflip: CMD = pixfmts
162
a6a750c7 163$(FATE_FILTER_PIXFMTS): libavfilter/tests/filtfmts$(EXESUF)
b963f021
DB
164FATE_FILTER_VSYNTH-$(CONFIG_FORMAT_FILTER) += $(FATE_FILTER_PIXFMTS)
165
166
3eec1d41 167$(FATE_FILTER_VSYNTH-yes): $(VREF)
7cec1274 168$(FATE_FILTER_VSYNTH-yes): SRC = $(TARGET_PATH)/tests/vsynth1/%02d.pgm
bc7fbd36 169
7cec1274
AK
170FATE_AVCONV-$(call DEMDEC, IMAGE2, PGMYUV) += $(FATE_FILTER_VSYNTH-yes)
171
a77aed14
DB
172fate-vfilter: $(FATE_FILTER-yes) $(FATE_FILTER_VSYNTH-yes)
173
174fate-filter: fate-afilter fate-vfilter