Merge commit '03b052c023e1f58d879cb7eeb6421ed39262d39d'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Apr 2013 10:29:06 +0000 (12:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 28 Apr 2013 10:34:55 +0000 (12:34 +0200)
* commit '03b052c023e1f58d879cb7eeb6421ed39262d39d':
  fate: Invoke standard lavfi tests through fate-run.sh

Conflicts:
tests/fate/avfilter.mak
tests/lavfi-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
14 files changed:
1  2 
tests/fate-run.sh
tests/fate/avfilter.mak
tests/fate/filter-video.mak
tests/lavfi-regression.sh
tests/ref/fate/filter-crop
tests/ref/fate/filter-crop_scale
tests/ref/fate/filter-crop_scale_vflip
tests/ref/fate/filter-crop_vflip
tests/ref/fate/filter-null
tests/ref/fate/filter-scale200
tests/ref/fate/filter-scale500
tests/ref/fate/filter-vflip
tests/ref/fate/filter-vflip_crop
tests/ref/fate/filter-vflip_vflip

@@@ -165,12 -161,18 +165,22 @@@ lavfitest()
      regtest lavfi lavfi tests/vsynth1
  }
  
 -    avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \
+ 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
 +# must be kept verbatim
 +set -f
 +
  exec 3>&2
  eval $command >"$outfile" 2>$errfile
  err=$?
@@@ -1,62 -1,11 +1,52 @@@
 -FATE_LAVFI = fate-lavfi-pixdesc                                         \
 +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                                  \
 +             fate-lavfi-pad                                             \
               fate-lavfi-pixfmts_copy                                    \
               fate-lavfi-pixfmts_crop                                    \
               fate-lavfi-pixfmts_hflip                                   \
               fate-lavfi-pixfmts_null                                    \
               fate-lavfi-pixfmts_pad                                     \
 +             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                                          \
 +             fate-lavfi-thumbnail                                       \
 +             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                   \
 +                                 fate-lavfi-testsrc                     \
 +
 +FATE_LAVFI-$(CONFIG_GPL) += fate-lavfi-colormatrix1                     \
 +                            fate-lavfi-colormatrix2                     \
 +                            fate-lavfi-hue                              \
 +                            fate-lavfi-kerndeint                        \
 +                            fate-lavfi-pixfmts_super2xsai               \
 +                            fate-lavfi-pp                               \
 +                            fate-lavfi-pp2                              \
 +                            fate-lavfi-pp3                              \
 +                            fate-lavfi-pp4                              \
 +                            fate-lavfi-pp5                              \
 +                            fate-lavfi-pp6                              \
 +                            fate-lavfi-tinterlace_merge                 \
 +                            fate-lavfi-tinterlace_pad                   \
 +
 +FATE_LAVFI += $(FATE_LAVFI-yes)
  
  $(FATE_LAVFI): $(VREF) libavfilter/filtfmts-test$(EXESUF)
  $(FATE_LAVFI): CMD = lavfitest
@@@ -51,18 -45,38 +51,49 @@@ fate-filter-transpose: CMD = framecrc -
  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, SMJPEG_DEMUXER MJPEG_DECODER PERMS_FILTER HQDN3D_FILTER) += 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-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-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
 +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
  
@@@ -20,89 -20,25 +20,82 @@@ do_video_filter() 
          $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5:
  }
  
- 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"
++#should be removed
 +do_lavfi_plain() {
 +    vfilters="$2"
 +
 +    if [ $test = $1 ] ; then
 +        do_video_filter $test "$2"
 +    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 "null"               "null"
 +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 "scale200"           "scale=200:200"
- do_lavfi "scale500"           "scale=500:500"
 +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"
 +do_lavfi "pad"                "pad=iw*1.5:ih*1.5:iw*0.3:ih*0.2"
 +do_lavfi "pp"                 "pp=be/hb/vb/tn/l5/al"
 +do_lavfi "pp2"                "pp=be/fq|16/h1/v1/lb"
 +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 "vflip"              "vflip"
- do_lavfi "vflip_crop"         "vflip,crop=iw-100:ih-100:100:100"
- do_lavfi "vflip_vflip"        "vflip,vflip"
 +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"
 +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_plain "alphamerge_rgb"     "[in]format=bgra,split,alphamerge[out]"
 +do_lavfi_plain "alphamerge_yuv"     "[in]format=yuv420p,split,alphamerge[out]"
 +do_lavfi_plain "alphaextract_rgb"   "[in]format=bgra,split,alphamerge,split[o3][o4];[o4]alphaextract[alpha];[o3][alpha]alphamerge[out]"
 +do_lavfi_plain "alphaextract_yuv"   "[in]format=yuv420p,split,alphamerge,split[o3][o4];[o4]alphaextract[alpha];[o3][alpha]alphamerge[out]"
 +
 +do_lavfi_colormatrix "colormatrix" bt709 fcc bt601 smpte240m
 +
  do_lavfi_pixfmts(){
 -    test ${test%_[bl]e} = pixfmts_$1 || return 0
 -    filter=$1
 -    filter_args=$2
 +    testname=$1;
 +    test ${test%_[bl]e} = $testname || return 0
 +    filter=$2
 +    filter_args=$3
 +    prefilter_chain=$4
  
      showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test"
 -    exclude_fmts=${outfile}${1}_exclude_fmts
 -    out_fmts=${outfile}${1}_out_fmts
 +    scale_exclude_fmts=${outfile}${testname}_scale_exclude_fmts
 +    scale_in_fmts=${outfile}${testname}_scale_in_fmts
 +    scale_out_fmts=${outfile}${testname}_scale_out_fmts
 +    in_fmts=${outfile}${testname}_in_fmts
  
      # exclude pixel formats which are not supported as input
 -    $avconv -pix_fmts list 2>/dev/null | awk 'NR > 8 && /^\..\./ { print $2 }' | sort >$exclude_fmts
 -    $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ print $3 }' | sort | comm -23 - $exclude_fmts >$out_fmts
 +    $showfiltfmts scale | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$scale_in_fmts
 +    $showfiltfmts scale | awk -F '[ \r]' '/^OUTPUT/{ fmt=substr($3, 5); print fmt }' | sort >$scale_out_fmts
 +    comm -12 $scale_in_fmts $scale_out_fmts >$scale_exclude_fmts
 +
 +    $showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ fmt=substr($3, 5); print fmt }' | sort >$in_fmts
 +    pix_fmts=$(comm -12 $scale_exclude_fmts $in_fmts)
  
 -    pix_fmts=$($showfiltfmts $filter | awk -F '[ \r]' '/^INPUT/{ print $3 }' | sort | comm -12 - $out_fmts)
      for pix_fmt in $pix_fmts; do
 -        do_video_filter $pix_fmt "format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
 +        do_video_filter $pix_fmt "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" -pix_fmt $pix_fmt
      done
  
 -    rm $exclude_fmts $out_fmts
 +    rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts
  }
  
  # all these filters have exactly one input and exactly one output
index 0000000,32041c2..dec7f29
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -crop                3d163f156eaddf41d2be20736f973539
++crop                f7b5236ddf88224188051c7c43503a14
index 0000000,82e5394..e692a8a
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -crop_scale          0a3d45d58b805b8c47416b9239535f94
++crop_scale          c298d61e731a97d0a9600e7fde80b6b4
index 0000000,29574f7..9a7d326
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -crop_scale_vflip    3e2c7694d37733ca52e1723d5262af36
++crop_scale_vflip    56b8204e72d0680b139a8d9dd756e332
index 0000000,a3f8200..d6d6bad
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -crop_vflip          628542e17b6900ee79b1429183ae01b0
++crop_vflip          8368eb12fa29acc5826bade961257375
index 0000000,3c3b7b7..0b9b9b8
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -null                eba2f135a08829387e2f698ff72a2939
++null                61fffd2d8425759a33ae07e718d0242d
index 0000000,17103a2..f267522
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -scale200            aebdc1c3e08da2a925ba7212b1fadee0
++scale200            e84ce966038a9f8f915704959f64278d
index 0000000,93ba4f2..ec4a699
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -scale500            ef865c51156e55ce1ce38c8f90a709e6
++scale500            24e89b23ba4286162c2026181db8d2b7
index 0000000,66b8732..ee49247
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -vflip               2e6d6062e8cad37fb3ab2c433b55f382
++vflip               c59b35b82b5a195128736021913b35a4
index 0000000,6bb832f..43c944a
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -vflip_crop          72ee0d0dfc8af0cd94a466760313654d
++vflip_crop          cd56578bb7e89ca0853467dfecab244b
index 0000000,b719745..f401fc7
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,1 +1,1 @@@
 -vflip_vflip         eba2f135a08829387e2f698ff72a2939
++vflip_vflip         61fffd2d8425759a33ae07e718d0242d