[FFmpeg-devel] [PATCH 3/3] fate/filter: factorize tests using (a)perms filters.

Stefano Sabatini stefasab at gmail.com
Sat Mar 30 21:43:42 CET 2013


On date Friday 2013-03-29 12:27:47 +0100, Clément Bœsch encoded:
> ---
>  tests/fate/filter.mak | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/fate/filter.mak b/tests/fate/filter.mak
> index 43e9fc4..6c9dd7e 100644
> --- a/tests/fate/filter.mak
> +++ b/tests/fate/filter.mak
> @@ -91,7 +91,7 @@ fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose
>  FATE_FILTER_VSYNTH-$(CONFIG_UNSHARP_FILTER) += fate-filter-unsharp
>  fate-filter-unsharp: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf unsharp
>  

> -FATE_FILTER-$(call ALLYES, WAV_DEMUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER PCM_S16LE_MUXER APERMS_FILTER VOLUME_FILTER) += fate-filter-volume
> +FATE_APERMS_FILTER-$(call FILTERDEMDECENCMUX, VOLUME, WAV, PCM_S16LE, PCM_S16LE, PCM_S16LE) += fate-filter-volume
>  fate-filter-volume: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
>  fate-filter-volume: tests/data/asynth-44100-2.wav
>  fate-filter-volume: CMD = md5 -i $(SRC) -af aperms=random,volume=precision=fixed:volume=0.5 -f s16le
> @@ -106,13 +106,14 @@ fate-filter-yadif-mode1: CMD = framecrc -flags bitexact -idct simple -i $(SAMPLE
>  
>  FATE_FILTER-$(call FILTERDEMDEC, YADIF, MPEGTS, MPEG2VIDEO) += $(FATE_YADIF)
>  
> -FATE_FILTER-$(call ALLYES, SMJPEG_DEMUXER MJPEG_DECODER PERMS_FILTER HQDN3D_FILTER) += fate-filter-hqdn3d-sample
> +FATE_PERMS_FILTER-$(call FILTERDEMDEC, HQDN3D, SMJPEG, MJPEG) += fate-filter-hqdn3d-sample
>  fate-filter-hqdn3d-sample: CMD = framecrc -idct simple -i $(SAMPLES)/smjpeg/scenwin.mjpg -vf perms=random,hqdn3d -an
>  
> -FATE_FILTER-$(call ALLYES, UTVIDEO_DECODER AVI_DEMUXER PERMS_FILTER CURVES_FILTER) += fate-filter-curves
> +FATE_PERMS_FILTER-$(call FILTERDEMDEC, CURVES, AVI, UTVIDEO) += fate-filter-curves
>  fate-filter-curves: CMD = framecrc -i $(SAMPLES)/utvideo/utvideo_rgb_median.avi -vf perms=random,curves=vintage
>  

> -FATE_FILTER-$(call ALLYES, VMD_DEMUXER VMDVIDEO_DECODER FORMAT_FILTER PERMS_FILTER GRADFUN_FILTER) += fate-filter-gradfun-sample
> +FATE_GRADFUN_SAMPLE_FILTER-$(CONFIG_FORMAT_FILTER) += fate-filter-gradfun-sample
> +FATE_PERMS_FILTER-$(call FILTERDEMDEC, GRADFUN, VMD, VMDVIDEO) += $(FATE_GRADFUN_SAMPLE_FILTER-yes)

Why the indirection level?

Why not:
FATE_PERMS_FILTER-$(call ALLYES FORMAT_FILTER GRADFUN_FILTER VMD_DEMUXER VMDVIDEO_DECODER) += fate-filter-gradfun-sample
?

>  fate-filter-gradfun-sample: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -filter_script $(SRC_PATH)/tests/filtergraphs/gradfun -an -frames:v 20
>  
>  FATE_FILTER-$(call ALLYES, TESTSRC_FILTER SINE_FILTER CONCAT_FILTER) += fate-filter-concat
> @@ -122,6 +123,8 @@ $(FATE_FILTER_VSYNTH-yes): tests/vsynth1/00.pgm
>  $(FATE_FILTER_VSYNTH-yes): SRC = $(TARGET_PATH)/tests/vsynth1/%02d.pgm
>  FATE_AVCONV-$(call DEMDEC, IMAGE2, PGMYUV) += $(FATE_FILTER_VSYNTH-yes)
>  
> +FATE_FILTER-$(CONFIG_APERMS_FILTER) += $(FATE_APERMS_FILTER-yes)
> +FATE_FILTER-$(CONFIG_PERMS_FILTER)  += $(FATE_PERMS_FILTER-yes)

I'm still a bit skeptical about the usefulness of this, which at least
for me is complicating the logic, moving from:

add this test to FATE_FILTER-yes if its dependencies are honored

to:

add this test which makes use of perms to a special
FATE_PERMS_FILTER-yes list, and then add this list to FATE_FILTER-yes

which is doing the assumption that perm/aperm is somehow special.
-- 
FFmpeg = Fabulous Frenzy Minimalistic Political Ecumenical God


More information about the ffmpeg-devel mailing list