[FFmpeg-devel] [PATCH] tests: add tinterlace tests

Stefano Sabatini stefasab at gmail.com
Wed Sep 5 11:31:46 CEST 2012


Only the merge and pad mode are tested.

Also extend do_lavfi_pixfmts() to make it possible to specify the name of
the test to run.
---
 tests/lavfi-regression.sh        |   11 ++++++++++-
 tests/ref/lavfi/tinterlace_merge |   10 ++++++++++
 tests/ref/lavfi/tinterlace_pad   |   10 ++++++++++
 3 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 tests/ref/lavfi/tinterlace_merge
 create mode 100644 tests/ref/lavfi/tinterlace_pad

diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh
index 0496d8a..afb015d 100755
--- a/tests/lavfi-regression.sh
+++ b/tests/lavfi-regression.sh
@@ -74,7 +74,14 @@ do_lavfi_plain "alphaextract_yuv"   "[in]slicify=random,format=yuv420p,split,alp
 do_lavfi_colormatrix "colormatrix" bt709 fcc bt601 smpte240m
 
 do_lavfi_pixfmts(){
-    test ${test%_[bl]e} = pixfmts_$1 || return 0
+    # if there are three parameters, the first params is the test name
+    if [ -n "$3" ]; then
+        testname=$1;
+        shift;
+    else
+        testname=pixfmts_$1;
+    fi
+    test ${test%_[bl]e} = $testname || return 0
     filter=$1
     filter_args=$2
 
@@ -108,6 +115,8 @@ do_lavfi_pixfmts "pad"     "500:400:20:20"
 do_lavfi_pixfmts "pixdesctest" ""
 do_lavfi_pixfmts "scale"   "200:100"
 do_lavfi_pixfmts "super2xsai" ""
+do_lavfi_pixfmts "tinterlace_merge" "tinterlace" "merge"
+do_lavfi_pixfmts "tinterlace_pad"   "tinterlace" "pad"
 do_lavfi_pixfmts "vflip"   ""
 
 do_lavfi_lavd() {
diff --git a/tests/ref/lavfi/tinterlace_merge b/tests/ref/lavfi/tinterlace_merge
new file mode 100644
index 0000000..42675a4
--- /dev/null
+++ b/tests/ref/lavfi/tinterlace_merge
@@ -0,0 +1,10 @@
+gray                26b6b9e89fe1f32695f726639351504c
+yuv410p             3634d715f95aecceba00c96f40c121b6
+yuv420p             62339167a917a51e4d528ccf2d26de0f
+yuv422p             de3480004bdb8e7b711f5b465014aeab
+yuv444p             9c9847984402eaefde910ad8a088e356
+yuva420p            65f7fd965c848713ecb84e462722b173
+yuvj420p            a32361014887cda411c64253be37e020
+yuvj422p            2e2252ecb9d98b355f0cadd8495b340d
+yuvj440p            fff44eb68a5bfc9815637d0706b9b23c
+yuvj444p            23f3c3bbe1cb263202c366b8a2abc649
diff --git a/tests/ref/lavfi/tinterlace_pad b/tests/ref/lavfi/tinterlace_pad
new file mode 100644
index 0000000..2e41c41
--- /dev/null
+++ b/tests/ref/lavfi/tinterlace_pad
@@ -0,0 +1,10 @@
+gray                9258e5cf66725a1814302cff34d4e765
+yuv410p             4557c54e14f761e3cafae7681d696d90
+yuv420p             d9dee6c4f0eaedc55819fda8e2fd43a3
+yuv422p             531cfaad53e2fe4021286075ca0987e0
+yuv444p             7aff195b2d5a5390f8e83f64c4c66789
+yuva420p            5260ee1f1088eb1df6a671b10229c8c8
+yuvj420p            bc1ddf876ee211a8b6ef684b66f90a02
+yuvj422p            7ff40b351f2b11d901e9ffefe9fa9e45
+yuvj440p            aa4ad715791d02e2b4a62b2a083429ef
+yuvj444p            b1b5967c63467b415acdd7d653b2cef4
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list