]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '896fe15dbb7b78de495c4a7dd75e7faec66778da'
authorJames Almer <jamrial@gmail.com>
Thu, 14 Mar 2019 17:31:48 +0000 (14:31 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 14 Mar 2019 17:31:48 +0000 (14:31 -0300)
* commit '896fe15dbb7b78de495c4a7dd75e7faec66778da':
  tests: Convert lavf pixfmt conversion tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
13 files changed:
1  2 
tests/Makefile
tests/fate-run.sh
tests/fate/avformat.mak
tests/fate/pixfmt.mak
tests/lavf-regression.sh
tests/ref/pixfmt/bgr24
tests/ref/pixfmt/gray
tests/ref/pixfmt/monob
tests/ref/pixfmt/monow
tests/ref/pixfmt/rgb24
tests/ref/pixfmt/rgb32
tests/ref/pixfmt/rgb555
tests/ref/pixfmt/rgb565

diff --cc tests/Makefile
index 628d4bb8fe2b646e15e419e2a7dbc7c76c80db20,b64a8dc9680cc6cce692957709059867e8c21e0b..99ea0fe20bbed7637b0f28e88b92e25c3c6afa9f
@@@ -156,12 -107,9 +156,13 @@@ include $(SRC_PATH)/tests/fate/mov.ma
  include $(SRC_PATH)/tests/fate/mp3.mak
  include $(SRC_PATH)/tests/fate/mpc.mak
  include $(SRC_PATH)/tests/fate/mpeg4.mak
 +include $(SRC_PATH)/tests/fate/mpegps.mak
 +include $(SRC_PATH)/tests/fate/mpegts.mak
 +include $(SRC_PATH)/tests/fate/mxf.mak
  include $(SRC_PATH)/tests/fate/opus.mak
  include $(SRC_PATH)/tests/fate/pcm.mak
+ include $(SRC_PATH)/tests/fate/pixfmt.mak
 +include $(SRC_PATH)/tests/fate/pixlet.mak
  include $(SRC_PATH)/tests/fate/probe.mak
  include $(SRC_PATH)/tests/fate/prores.mak
  include $(SRC_PATH)/tests/fate/qt.mak
index a141488b33b7acf0ff127e136e589e0505644d99,89eef1230f3d74b31e6cfae424a776c7537bba25..a2ccc65a630fbcacee0c555a17574d111d55a36c
@@@ -319,18 -220,20 +319,29 @@@ lavffatetest()
  lavftest(){
      t="${test#lavf-}"
      ref=${base}/ref/lavf/$t
 -    ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
 +    ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$target_samples"
 +}
 +
 +refcmp_metadata(){
 +    refcmp=$1
 +    pixfmt=$2
 +    fuzz=${3:-0.001}
 +    ffmpeg $FLAGS $ENC_OPTS \
 +        -lavfi "testsrc2=size=300x200:rate=1:duration=5,format=${pixfmt},split[ref][tmp];[tmp]avgblur=4[enc];[enc][ref]${refcmp},metadata=print:file=-" \
 +        -f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
  }
  
+ pixfmt_conversion(){
+     conversion="${test#pixfmt-}"
+     outdir="tests/data/pixfmt"
+     raw_dst="$outdir/$conversion.out.yuv"
+     file=${outdir}/${conversion}.yuv
+     run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
+                $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst
+     do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \
+               $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
+ }
  video_filter(){
      filters=$1
      shift
Simple merge
index 0000000000000000000000000000000000000000,469aebdd66e055622b9f1838ebf227e2eaa1b7fc..46fd888ac9f736e58a3ce2c1dd14d8bda5dbd311
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,28 +1,28 @@@
 -FATE_PIXFMT =           bgr24           \
++FATE_PIXFMT-$(CONFIG_SCALE_FILTER) =           bgr24           \
+                         gray            \
+                         monob           \
+                         monow           \
+                         rgb24           \
+                         rgb32           \
+                         rgb555          \
+                         rgb565          \
+                         yuv410p         \
+                         yuv411p         \
+                         yuv420p         \
+                         yuv422p         \
+                         yuv440p         \
+                         yuv444p         \
+                         yuvj420p        \
+                         yuvj422p        \
+                         yuvj440p        \
+                         yuvj444p        \
+                         yuyv422         \
 -FATE_PIXFMT := $(FATE_PIXFMT:%=fate-pixfmt-%)
++FATE_PIXFMT := $(FATE_PIXFMT-yes:%=fate-pixfmt-%)
+ $(FATE_PIXFMT): CMD = pixfmt_conversion
+ $(FATE_PIXFMT): REF = $(SRC_PATH)/tests/ref/pixfmt/$(@:fate-pixfmt-%=%)
+ $(FATE_PIXFMT): $(VREF)
+ FATE_AVCONV += $(FATE_PIXFMT)
+ fate-pixfmt:   $(FATE_PIXFMT)
index f3f6dc4e85cc8f1605608db06ac78fde744d5674,47c158076ba7b19754931af25ad7ad68bbd8e274..f703cb9c0ea5dcfab7f5e9e3b473fcc43ad728be
@@@ -193,35 -92,6 +193,19 @@@ f
  
  if [ -n "$do_yuv4mpeg" ] ; then
  file=${outfile}lavf.y4m
 -do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
 +do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
  do_avconv_crc $file -i $target_path/$file
  fi
- # pix_fmt conversions
- if [ -n "$do_pixfmt" ] ; then
- outfile="$datadir/pixfmt/"
- conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
-              yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \
-              monob yuv440p yuvj440p"
- for pix_fmt in $conversions ; do
-     file=${outfile}${pix_fmt}.yuv
-     run_avconv $DEC_OPTS -r 1 -f image2 -vcodec pgmyuv -i $raw_src \
-                $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst
-     do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
-                     $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
- done
- fi
 +
 +if [ -n "$do_fits" ] ; then
 +pix_fmts="gray gray16be gbrp gbrap gbrp16be gbrap16be"
 +for pix_fmt in $pix_fmts ; do
 +    file=${outfile}${pix_fmt}lavf.fits
 +    do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -pix_fmt $pix_fmt
 +    do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt $pix_fmt
 +done
 +fi
 +
 +if [ -n "$do_smjpeg" ] ; then
 +do_lavf smjpeg "" "-f smjpeg"
 +fi
index 0000000000000000000000000000000000000000,ac723db7b3fbb29b7970715aaa2875a82b9b6d6a..43af80b8a50bd9b5745c1f7cf60e501ee8460e21
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
++6bb61113e7b70eb09dbcec356122a0e2 *tests/data/pixfmt/bgr24.yuv
+ 304128 tests/data/pixfmt/bgr24.yuv
index 0000000000000000000000000000000000000000,bc3843897e0a7ce66aa1a03f7f66aa0a08afabac..fe5e5464f88ca1f4534058906702f17f190b4d3d
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
++1e080c12bd9755c41ecb8e19b756f406 *tests/data/pixfmt/gray.yuv
+ 304128 tests/data/pixfmt/gray.yuv
index 0000000000000000000000000000000000000000,010739a5c77fdb53e53381410ed73752d3077d54..002dda1d3d8101620f7692deadedc1388fa7c798
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
++d87cf0c2e7a13cc693fe6ece22461c83 *tests/data/pixfmt/monob.yuv
+ 304128 tests/data/pixfmt/monob.yuv
index 0000000000000000000000000000000000000000,1b5143ab2a98ea7b3c9f8a80809e338a677e04fb..485f256bbaf57efe6118e128d0206719533f0378
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
++d87cf0c2e7a13cc693fe6ece22461c83 *tests/data/pixfmt/monow.yuv
+ 304128 tests/data/pixfmt/monow.yuv
index 0000000000000000000000000000000000000000,c0d0026715a647e52b129800b46a7cda3d5dc41e..b38611343bddf3748d96810cf9e2260dae2acaca
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
++6bb61113e7b70eb09dbcec356122a0e2 *tests/data/pixfmt/rgb24.yuv
+ 304128 tests/data/pixfmt/rgb24.yuv
index 0000000000000000000000000000000000000000,b1a4ab1dd1ecc4852bf315f10d5587b9727bdd69..741e60a4e1d69edba3faf017d6cdd56cce836751
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
++6bb61113e7b70eb09dbcec356122a0e2 *tests/data/pixfmt/rgb32.yuv
+ 304128 tests/data/pixfmt/rgb32.yuv
index 0000000000000000000000000000000000000000,a22a271a980af1258832c02770e162f0c55cc4c6..eecc974d1c2dc0dfd6069c001ee602f8daa7d843
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
++0df2a477af1415a1b8fbf2a3e552bc39 *tests/data/pixfmt/rgb555.yuv
+ 304128 tests/data/pixfmt/rgb555.yuv
index 0000000000000000000000000000000000000000,b81bb045f03063f220f0e512c0b2bb079953d42a..b249f4a0efcf3314df6c7c09759f4d9afc0dca69
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,2 +1,2 @@@
 -66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
++efa7c0337cc00c796c6df615223716f1 *tests/data/pixfmt/rgb565.yuv
+ 304128 tests/data/pixfmt/rgb565.yuv