[FFmpeg-devel] [PATCH v2] fate: add vf_overlay test for main source with alpha channel
Peter Große
pegro at friiks.de
Thu Jul 20 19:58:51 EEST 2017
Signed-off-by: Peter Große <pegro at friiks.de>
---
This depends on patch "lavfi/testsrc2: fix completely transparent alpha."
The test fails without the patch "avfilter/vf_overlay: fix alpha blending when
main source has an alpha channel".
tests/fate/filter-video.mak | 4 ++++
tests/filtergraphs/overlay_main_alpha | 4 ++++
tests/ref/fate/filter-overlay_main-alpha | 30 ++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+)
create mode 100644 tests/filtergraphs/overlay_main_alpha
create mode 100644 tests/ref/fate/filter-overlay_main-alpha
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 53fc7a6528..ee2e7aff50 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -379,6 +379,10 @@ fate-filter-concat: CMD = framecrc -filter_complex_script $(TARGET_PATH)/tests/d
FATE_FILTER-$(call ALLYES, TESTSRC2_FILTER FPS_FILTER MPDECIMATE_FILTER) += fate-filter-mpdecimate
fate-filter-mpdecimate: CMD = framecrc -lavfi testsrc2=r=2:d=10,fps=3,mpdecimate -r 3 -pix_fmt yuv420p
+FATE_FILTER-$(call ALLYES, TESTSRC2_FILTER, OVERLAY_FILTER) += fate-filter-overlay_main-alpha
+fate-filter-overlay_main-alpha: tests/data/filtergraphs/overlay_main_alpha
+fate-filter-overlay_main-alpha: CMD = framecrc -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/overlay_main_alpha
+
FATE_FILTER_SAMPLES-$(call ALLYES, MOV_DEMUXER FPS_FILTER QTRLE_DECODER) += fate-filter-fps-cfr fate-filter-fps fate-filter-fps-r
fate-filter-fps-cfr: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/apple-animation-variable-fps-bug.mov -r 30 -vsync cfr -pix_fmt yuv420p
fate-filter-fps-r: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/apple-animation-variable-fps-bug.mov -r 30 -vf fps -pix_fmt yuv420p
diff --git a/tests/filtergraphs/overlay_main_alpha b/tests/filtergraphs/overlay_main_alpha
new file mode 100644
index 0000000000..95cc1d4c61
--- /dev/null
+++ b/tests/filtergraphs/overlay_main_alpha
@@ -0,0 +1,4 @@
+sws_flags=+accurate_rnd+bitexact;
+testsrc2=d=1:s=1024x768:alpha=255[a];
+testsrc2=d=1:alpha=128[b];
+[a][b]overlay=x=100:y=50
\ No newline at end of file
diff --git a/tests/ref/fate/filter-overlay_main-alpha b/tests/ref/fate/filter-overlay_main-alpha
new file mode 100644
index 0000000000..071c7435ae
--- /dev/null
+++ b/tests/ref/fate/filter-overlay_main-alpha
@@ -0,0 +1,30 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1024x768
+#sar 0: 1/1
+0, 0, 0, 1, 1966080, 0xbb0752de
+0, 1, 1, 1, 1966080, 0x2eaa3ef1
+0, 2, 2, 1, 1966080, 0x6159c6b2
+0, 3, 3, 1, 1966080, 0x03403179
+0, 4, 4, 1, 1966080, 0x905a86ce
+0, 5, 5, 1, 1966080, 0x5c95b051
+0, 6, 6, 1, 1966080, 0xd0989f23
+0, 7, 7, 1, 1966080, 0x2f345dc0
+0, 8, 8, 1, 1966080, 0x2d854f97
+0, 9, 9, 1, 1966080, 0xc589e999
+0, 10, 10, 1, 1966080, 0x8c2d7938
+0, 11, 11, 1, 1966080, 0x457b26ad
+0, 12, 12, 1, 1966080, 0x5ee36f1e
+0, 13, 13, 1, 1966080, 0x2947c30c
+0, 14, 14, 1, 1966080, 0x5a031a29
+0, 15, 15, 1, 1966080, 0xc278a4d0
+0, 16, 16, 1, 1966080, 0x849a0f9d
+0, 17, 17, 1, 1966080, 0xaea83654
+0, 18, 18, 1, 1966080, 0xd3054386
+0, 19, 19, 1, 1966080, 0x1fae5492
+0, 20, 20, 1, 1966080, 0xc8b95b6b
+0, 21, 21, 1, 1966080, 0x8634fdf9
+0, 22, 22, 1, 1966080, 0x3627c5cb
+0, 23, 23, 1, 1966080, 0x8c1c5b90
+0, 24, 24, 1, 1966080, 0x2c54109d
--
2.13.0
More information about the ffmpeg-devel
mailing list