diff --git a/tests/fate-run.sh b/tests/fate-run.sh index ed99387b15..a69d2945a2 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -165,6 +165,16 @@ lavfitest(){ regtest lavfi lavfi tests/vsynth1 } +video_filter(){ + filters=$1 + shift + label=${test#filter-} + raw_src="${target_path}/tests/vsynth1/%02d.pgm" + printf '%-20s' $label + ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ + $FLAGS $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: +} + mkdir -p "$outdir" # Disable globbing: command arguments may contain globbing characters and diff --git a/tests/fate/avfilter.mak b/tests/fate/avfilter.mak index d68757de87..a0565b6974 100644 --- a/tests/fate/avfilter.mak +++ b/tests/fate/avfilter.mak @@ -2,17 +2,12 @@ FATE_LAVFI = fate-lavfi-alphaextract_rgb \ fate-lavfi-alphaextract_yuv \ fate-lavfi-alphamerge_rgb \ fate-lavfi-alphamerge_yuv \ - fate-lavfi-crop \ - fate-lavfi-crop_scale \ - fate-lavfi-crop_scale_vflip \ - fate-lavfi-crop_vflip \ fate-lavfi-drawbox \ fate-lavfi-edgedetect \ fate-lavfi-fade \ fate-lavfi-field \ fate-lavfi-idet \ fate-lavfi-il \ - fate-lavfi-null \ fate-lavfi-overlay_rgb \ fate-lavfi-overlay_yuv420 \ fate-lavfi-overlay_yuv444 \ @@ -25,8 +20,6 @@ FATE_LAVFI = fate-lavfi-alphaextract_rgb \ fate-lavfi-pixfmts_pixdesctest \ fate-lavfi-pixfmts_scale \ fate-lavfi-pixfmts_vflip \ - fate-lavfi-scale200 \ - fate-lavfi-scale500 \ fate-lavfi-select \ fate-lavfi-setdar \ fate-lavfi-setsar \ @@ -34,9 +27,6 @@ FATE_LAVFI = fate-lavfi-alphaextract_rgb \ fate-lavfi-tile \ fate-lavfi-transpose \ fate-lavfi-unsharp \ - fate-lavfi-vflip \ - fate-lavfi-vflip_crop \ - fate-lavfi-vflip_vflip \ FATE_LAVFI-$(CONFIG_AVDEVICE) += fate-lavfi-life \ fate-lavfi-scalenorm \ diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index cc83d8bb1e..12ca955efa 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -63,6 +63,37 @@ fate-filter-gradfun-sample: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -filter_scri FATE_FILTER-$(call ALLYES, TESTSRC_FILTER SINE_FILTER CONCAT_FILTER) += fate-filter-concat fate-filter-concat: CMD = framecrc -filter_complex_script $(SRC_PATH)/tests/filtergraphs/concat +FATE_FILTER_VSYNTH-$(CONFIG_CROP_FILTER) += fate-filter-crop +fate-filter-crop: CMD = video_filter "crop=iw-100:ih-100:100:100" + +FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER SCALE_FILTER) += fate-filter-crop_scale +fate-filter-crop_scale: CMD = video_filter "crop=iw-100:ih-100:100:100,scale=400:-1" + +FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER SCALE_FILTER VFLIP_FILTER) += fate-filter-crop_scale_vflip +fate-filter-crop_scale_vflip: CMD = video_filter "null,null,crop=iw-200:ih-200:200:200,crop=iw-20:ih-20:20:20,scale=200:200,scale=250:250,vflip,vflip,null,scale=200:200,crop=iw-100:ih-100:100:100,vflip,scale=200:200,null,vflip,crop=iw-100:ih-100:100:100,null" + +FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER VFLIP_FILTER) += fate-filter-crop_vflip +fate-filter-crop_vflip: CMD = video_filter "crop=iw-100:ih-100:100:100,vflip" + +FATE_FILTER_VSYNTH-$(CONFIG_NULL_FILTER) += fate-filter-null +fate-filter-null: CMD = video_filter "null" + +FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scale200 +fate-filter-scale200: CMD = video_filter "scale=200:200" + +FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scale500 +fate-filter-scale500: CMD = video_filter "scale=500:500" + +FATE_FILTER_VSYNTH-$(CONFIG_VFLIP_FILTER) += fate-filter-vflip +fate-filter-vflip: CMD = video_filter "vflip" + +FATE_FILTER_VSYNTH-$(call ALLYES, CROP_FILTER VFLIP_FILTER) += fate-filter-vflip_crop +fate-filter-vflip_crop: CMD = video_filter "vflip,crop=iw-100:ih-100:100:100" + +FATE_FILTER_VSYNTH-$(CONFIG_VFLIP_FILTER) += fate-filter-vflip_vflip +fate-filter-vflip_vflip: CMD = video_filter "vflip,vflip" + + $(FATE_FILTER_VSYNTH-yes): $(VREF) $(FATE_FILTER_VSYNTH-yes): SRC = $(TARGET_PATH)/tests/vsynth1/%02d.pgm diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index d3e95d7754..b4cc220944 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -20,6 +20,7 @@ do_video_filter() { $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: } +#should be removed do_lavfi_plain() { vfilters="$2" @@ -28,25 +29,22 @@ do_lavfi_plain() { fi } +#should be removed do_lavfi() { do_lavfi_plain $1 "$2" } +#should be removed do_lavfi_colormatrix() { do_lavfi "${1}1" "$1=$4:$5,$1=$5:$3,$1=$3:$4,$1=$4:$3,$1=$3:$5,$1=$5:$2" do_lavfi "${1}2" "$1=$2:$3,$1=$3:$2,$1=$2:$4,$1=$4:$2,$1=$2:$5,$1=$5:$4" } -do_lavfi "crop" "crop=iw-100:ih-100:100:100" -do_lavfi "crop_scale" "crop=iw-100:ih-100:100:100,scale=400:-1" -do_lavfi "crop_scale_vflip" "null,null,crop=iw-200:ih-200:200:200,crop=iw-20:ih-20:20:20,scale=200:200,scale=250:250,vflip,vflip,null,scale=200:200,crop=iw-100:ih-100:100:100,vflip,scale=200:200,null,vflip,crop=iw-100:ih-100:100:100,null" -do_lavfi "crop_vflip" "crop=iw-100:ih-100:100:100,vflip" do_lavfi "drawbox" "drawbox=224:24:88:72:#FF8010@0.5" do_lavfi "edgedetect" "format=gray,perms=random,edgedetect" do_lavfi "fade" "fade=in:5:15,fade=out:30:15" do_lavfi "hue" "perms=random,hue=s=sin(2*PI*t)+1" do_lavfi "idet" "idet" -do_lavfi "null" "null" do_lavfi "overlay_rgb" "split[m],scale=88:72,pad=96:80:4:4[o2];[m]fifo[o1],[o1][o2]overlay=240:16:format=rgb" do_lavfi "overlay_yuv420" "split[m],scale=88:72,pad=96:80:4:4[o2];[m]fifo[o1],[o1][o2]overlay=240:16:format=yuv420" do_lavfi "overlay_yuv444" "split[m],scale=88:72,pad=96:80:4:4[o2];[m]fifo[o1],[o1][o2]overlay=240:16:format=yuv444" @@ -57,8 +55,6 @@ do_lavfi "pp3" "pp=be/fq|8/ha|128|7/va/li" do_lavfi "pp4" "pp=be/ci" do_lavfi "pp5" "pp=md" do_lavfi "pp6" "pp=be/fd" -do_lavfi "scale200" "scale=200:200" -do_lavfi "scale500" "scale=500:500" do_lavfi "select" "select=not(eq(mod(n\,2)\,0)+eq(mod(n\,3)\,0))" do_lavfi "setdar" "setdar=dar=16/9" do_lavfi "setsar" "setsar=sar=16/11" @@ -66,9 +62,6 @@ do_lavfi "thumbnail" "thumbnail=10" do_lavfi "tile" "tile=3x3:nb_frames=5:padding=7:margin=2" do_lavfi "transpose" "transpose" do_lavfi "unsharp" "unsharp=11:11:-1.5:11:11:-1.5" -do_lavfi "vflip" "vflip" -do_lavfi "vflip_crop" "vflip,crop=iw-100:ih-100:100:100" -do_lavfi "vflip_vflip" "vflip,vflip" do_lavfi_plain "alphamerge_rgb" "[in]format=bgra,split,alphamerge[out]" do_lavfi_plain "alphamerge_yuv" "[in]format=yuv420p,split,alphamerge[out]" diff --git a/tests/ref/lavfi/crop b/tests/ref/fate/filter-crop similarity index 100% rename from tests/ref/lavfi/crop rename to tests/ref/fate/filter-crop diff --git a/tests/ref/lavfi/crop_scale b/tests/ref/fate/filter-crop_scale similarity index 100% rename from tests/ref/lavfi/crop_scale rename to tests/ref/fate/filter-crop_scale diff --git a/tests/ref/lavfi/crop_scale_vflip b/tests/ref/fate/filter-crop_scale_vflip similarity index 100% rename from tests/ref/lavfi/crop_scale_vflip rename to tests/ref/fate/filter-crop_scale_vflip diff --git a/tests/ref/lavfi/crop_vflip b/tests/ref/fate/filter-crop_vflip similarity index 100% rename from tests/ref/lavfi/crop_vflip rename to tests/ref/fate/filter-crop_vflip diff --git a/tests/ref/lavfi/null b/tests/ref/fate/filter-null similarity index 100% rename from tests/ref/lavfi/null rename to tests/ref/fate/filter-null diff --git a/tests/ref/lavfi/scale200 b/tests/ref/fate/filter-scale200 similarity index 100% rename from tests/ref/lavfi/scale200 rename to tests/ref/fate/filter-scale200 diff --git a/tests/ref/lavfi/scale500 b/tests/ref/fate/filter-scale500 similarity index 100% rename from tests/ref/lavfi/scale500 rename to tests/ref/fate/filter-scale500 diff --git a/tests/ref/lavfi/vflip b/tests/ref/fate/filter-vflip similarity index 100% rename from tests/ref/lavfi/vflip rename to tests/ref/fate/filter-vflip diff --git a/tests/ref/lavfi/vflip_crop b/tests/ref/fate/filter-vflip_crop similarity index 100% rename from tests/ref/lavfi/vflip_crop rename to tests/ref/fate/filter-vflip_crop diff --git a/tests/ref/lavfi/vflip_vflip b/tests/ref/fate/filter-vflip_vflip similarity index 100% rename from tests/ref/lavfi/vflip_vflip rename to tests/ref/fate/filter-vflip_vflip