tests: Convert lavf pixfmt conversion tests to non-legacy test scripts
authorDiego Biurrun <diego@biurrun.de>
Tue, 14 Aug 2018 09:07:10 +0000 (11:07 +0200)
committerDiego Biurrun <diego@biurrun.de>
Sat, 16 Feb 2019 17:15:38 +0000 (18:15 +0100)
Also split monolithic lavf-pixfmt test into individual tests.

25 files changed:
tests/Makefile
tests/fate-run.sh
tests/fate/avformat.mak
tests/fate/pixfmt.mak [new file with mode: 0644]
tests/lavf-regression.sh
tests/ref/lavf/pixfmt [deleted file]
tests/ref/pixfmt/bgr24 [new file with mode: 0644]
tests/ref/pixfmt/gray [new file with mode: 0644]
tests/ref/pixfmt/monob [new file with mode: 0644]
tests/ref/pixfmt/monow [new file with mode: 0644]
tests/ref/pixfmt/rgb24 [new file with mode: 0644]
tests/ref/pixfmt/rgb32 [new file with mode: 0644]
tests/ref/pixfmt/rgb555 [new file with mode: 0644]
tests/ref/pixfmt/rgb565 [new file with mode: 0644]
tests/ref/pixfmt/yuv410p [new file with mode: 0644]
tests/ref/pixfmt/yuv411p [new file with mode: 0644]
tests/ref/pixfmt/yuv420p [new file with mode: 0644]
tests/ref/pixfmt/yuv422p [new file with mode: 0644]
tests/ref/pixfmt/yuv440p [new file with mode: 0644]
tests/ref/pixfmt/yuv444p [new file with mode: 0644]
tests/ref/pixfmt/yuvj420p [new file with mode: 0644]
tests/ref/pixfmt/yuvj422p [new file with mode: 0644]
tests/ref/pixfmt/yuvj440p [new file with mode: 0644]
tests/ref/pixfmt/yuvj444p [new file with mode: 0644]
tests/ref/pixfmt/yuyv422 [new file with mode: 0644]

index ce7b58b..b64a8dc 100644 (file)
@@ -109,6 +109,7 @@ include $(SRC_PATH)/tests/fate/mpc.mak
 include $(SRC_PATH)/tests/fate/mpeg4.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/probe.mak
 include $(SRC_PATH)/tests/fate/prores.mak
 include $(SRC_PATH)/tests/fate/qt.mak
index a9dfebc..89eef12 100755 (executable)
@@ -223,6 +223,17 @@ lavftest(){
     ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
 }
 
+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
index 9dbdff7..033e5c9 100644 (file)
@@ -16,7 +16,6 @@ FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2,       MPEGTS)             += ts
 FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)                               += yuv4mpeg
 
 FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)
-FATE_LAVF += fate-lavf-pixfmt
 
 $(FATE_LAVF): $(AREF) $(VREF)
 $(FATE_LAVF): CMD = lavftest
diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak
new file mode 100644 (file)
index 0000000..469aebd
--- /dev/null
@@ -0,0 +1,28 @@
+FATE_PIXFMT =           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): 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 493083b..47c1580 100755 (executable)
@@ -95,19 +95,3 @@ 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_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 -c:v 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
diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt
deleted file mode 100644 (file)
index 186dde5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv420p.yuv
-304128 ./tests/data/pixfmt/yuv420p.yuv
-ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuv422p.yuv
-304128 ./tests/data/pixfmt/yuv422p.yuv
-5641dba168ff665af1cdb4a91e1afdd6 *./tests/data/pixfmt/yuv444p.yuv
-304128 ./tests/data/pixfmt/yuv444p.yuv
-ac68f9fdd9d55efd0306d9b004038761 *./tests/data/pixfmt/yuyv422.yuv
-304128 ./tests/data/pixfmt/yuyv422.yuv
-507c7e9f0c97660385df977469ca9e6d *./tests/data/pixfmt/yuv410p.yuv
-304128 ./tests/data/pixfmt/yuv410p.yuv
-8594ea0b8d7c2c964525b0801b5351de *./tests/data/pixfmt/yuv411p.yuv
-304128 ./tests/data/pixfmt/yuv411p.yuv
-e176bd14185788110e055f945de7f95f *./tests/data/pixfmt/yuvj420p.yuv
-304128 ./tests/data/pixfmt/yuvj420p.yuv
-472028e46a81c98d9b2477507def4723 *./tests/data/pixfmt/yuvj422p.yuv
-304128 ./tests/data/pixfmt/yuvj422p.yuv
-c10442da177c9f1d12be3c53be6fa12c *./tests/data/pixfmt/yuvj444p.yuv
-304128 ./tests/data/pixfmt/yuvj444p.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb24.yuv
-304128 ./tests/data/pixfmt/rgb24.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/bgr24.yuv
-304128 ./tests/data/pixfmt/bgr24.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *./tests/data/pixfmt/rgb32.yuv
-304128 ./tests/data/pixfmt/rgb32.yuv
-66d39d464bd89ded2a124897f0a75ade *./tests/data/pixfmt/rgb565.yuv
-304128 ./tests/data/pixfmt/rgb565.yuv
-c894c3bd8d2631ed1964500b90a0c350 *./tests/data/pixfmt/rgb555.yuv
-304128 ./tests/data/pixfmt/rgb555.yuv
-6be306b0cce5f8e6c271ea17fef9745b *./tests/data/pixfmt/gray.yuv
-304128 ./tests/data/pixfmt/gray.yuv
-31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monow.yuv
-304128 ./tests/data/pixfmt/monow.yuv
-31398104d2349dd48328a6862bc6711f *./tests/data/pixfmt/monob.yuv
-304128 ./tests/data/pixfmt/monob.yuv
-00b85790df5740bab95e2559d81603a7 *./tests/data/pixfmt/yuv440p.yuv
-304128 ./tests/data/pixfmt/yuv440p.yuv
-4d8d402c45d913038d4b725396719111 *./tests/data/pixfmt/yuvj440p.yuv
-304128 ./tests/data/pixfmt/yuvj440p.yuv
diff --git a/tests/ref/pixfmt/bgr24 b/tests/ref/pixfmt/bgr24
new file mode 100644 (file)
index 0000000..ac723db
--- /dev/null
@@ -0,0 +1,2 @@
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
+304128 tests/data/pixfmt/bgr24.yuv
diff --git a/tests/ref/pixfmt/gray b/tests/ref/pixfmt/gray
new file mode 100644 (file)
index 0000000..bc38438
--- /dev/null
@@ -0,0 +1,2 @@
+6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
+304128 tests/data/pixfmt/gray.yuv
diff --git a/tests/ref/pixfmt/monob b/tests/ref/pixfmt/monob
new file mode 100644 (file)
index 0000000..010739a
--- /dev/null
@@ -0,0 +1,2 @@
+31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
+304128 tests/data/pixfmt/monob.yuv
diff --git a/tests/ref/pixfmt/monow b/tests/ref/pixfmt/monow
new file mode 100644 (file)
index 0000000..1b5143a
--- /dev/null
@@ -0,0 +1,2 @@
+31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
+304128 tests/data/pixfmt/monow.yuv
diff --git a/tests/ref/pixfmt/rgb24 b/tests/ref/pixfmt/rgb24
new file mode 100644 (file)
index 0000000..c0d0026
--- /dev/null
@@ -0,0 +1,2 @@
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
+304128 tests/data/pixfmt/rgb24.yuv
diff --git a/tests/ref/pixfmt/rgb32 b/tests/ref/pixfmt/rgb32
new file mode 100644 (file)
index 0000000..b1a4ab1
--- /dev/null
@@ -0,0 +1,2 @@
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
+304128 tests/data/pixfmt/rgb32.yuv
diff --git a/tests/ref/pixfmt/rgb555 b/tests/ref/pixfmt/rgb555
new file mode 100644 (file)
index 0000000..a22a271
--- /dev/null
@@ -0,0 +1,2 @@
+c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
+304128 tests/data/pixfmt/rgb555.yuv
diff --git a/tests/ref/pixfmt/rgb565 b/tests/ref/pixfmt/rgb565
new file mode 100644 (file)
index 0000000..b81bb04
--- /dev/null
@@ -0,0 +1,2 @@
+66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
+304128 tests/data/pixfmt/rgb565.yuv
diff --git a/tests/ref/pixfmt/yuv410p b/tests/ref/pixfmt/yuv410p
new file mode 100644 (file)
index 0000000..0f1dcfd
--- /dev/null
@@ -0,0 +1,2 @@
+507c7e9f0c97660385df977469ca9e6d *tests/data/pixfmt/yuv410p.yuv
+304128 tests/data/pixfmt/yuv410p.yuv
diff --git a/tests/ref/pixfmt/yuv411p b/tests/ref/pixfmt/yuv411p
new file mode 100644 (file)
index 0000000..0122b68
--- /dev/null
@@ -0,0 +1,2 @@
+8594ea0b8d7c2c964525b0801b5351de *tests/data/pixfmt/yuv411p.yuv
+304128 tests/data/pixfmt/yuv411p.yuv
diff --git a/tests/ref/pixfmt/yuv420p b/tests/ref/pixfmt/yuv420p
new file mode 100644 (file)
index 0000000..9adf81f
--- /dev/null
@@ -0,0 +1,2 @@
+5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv420p.yuv
+304128 tests/data/pixfmt/yuv420p.yuv
diff --git a/tests/ref/pixfmt/yuv422p b/tests/ref/pixfmt/yuv422p
new file mode 100644 (file)
index 0000000..4240ec9
--- /dev/null
@@ -0,0 +1,2 @@
+ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuv422p.yuv
+304128 tests/data/pixfmt/yuv422p.yuv
diff --git a/tests/ref/pixfmt/yuv440p b/tests/ref/pixfmt/yuv440p
new file mode 100644 (file)
index 0000000..4e6ee4d
--- /dev/null
@@ -0,0 +1,2 @@
+00b85790df5740bab95e2559d81603a7 *tests/data/pixfmt/yuv440p.yuv
+304128 tests/data/pixfmt/yuv440p.yuv
diff --git a/tests/ref/pixfmt/yuv444p b/tests/ref/pixfmt/yuv444p
new file mode 100644 (file)
index 0000000..85c8712
--- /dev/null
@@ -0,0 +1,2 @@
+5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv444p.yuv
+304128 tests/data/pixfmt/yuv444p.yuv
diff --git a/tests/ref/pixfmt/yuvj420p b/tests/ref/pixfmt/yuvj420p
new file mode 100644 (file)
index 0000000..47a729e
--- /dev/null
@@ -0,0 +1,2 @@
+e176bd14185788110e055f945de7f95f *tests/data/pixfmt/yuvj420p.yuv
+304128 tests/data/pixfmt/yuvj420p.yuv
diff --git a/tests/ref/pixfmt/yuvj422p b/tests/ref/pixfmt/yuvj422p
new file mode 100644 (file)
index 0000000..6ab97d5
--- /dev/null
@@ -0,0 +1,2 @@
+472028e46a81c98d9b2477507def4723 *tests/data/pixfmt/yuvj422p.yuv
+304128 tests/data/pixfmt/yuvj422p.yuv
diff --git a/tests/ref/pixfmt/yuvj440p b/tests/ref/pixfmt/yuvj440p
new file mode 100644 (file)
index 0000000..2beeae5
--- /dev/null
@@ -0,0 +1,2 @@
+4d8d402c45d913038d4b725396719111 *tests/data/pixfmt/yuvj440p.yuv
+304128 tests/data/pixfmt/yuvj440p.yuv
diff --git a/tests/ref/pixfmt/yuvj444p b/tests/ref/pixfmt/yuvj444p
new file mode 100644 (file)
index 0000000..63fb813
--- /dev/null
@@ -0,0 +1,2 @@
+c10442da177c9f1d12be3c53be6fa12c *tests/data/pixfmt/yuvj444p.yuv
+304128 tests/data/pixfmt/yuvj444p.yuv
diff --git a/tests/ref/pixfmt/yuyv422 b/tests/ref/pixfmt/yuyv422
new file mode 100644 (file)
index 0000000..0978690
--- /dev/null
@@ -0,0 +1,2 @@
+ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuyv422.yuv
+304128 tests/data/pixfmt/yuyv422.yuv