[FFmpeg-devel,2/3] FATE/filter-video: fix high-bit-depth yadif tests

Submitted by Rodger Combs on Jan. 23, 2019, 2:39 a.m.

Details

Message ID 20190123023914.20619-2-rodger.combs@gmail.com
State New
Headers show

Commit Message

Rodger Combs Jan. 23, 2019, 2:39 a.m.
These previously upconverted the video _after_ applying the filter, so they
didn't actually test the high-bit-depth code paths at all, which is why the
PMINSD issue in the previous commit wasn't caught. I also added variants with
the spatial check enabled and disabled, so both of those paths are tested (as
with the 8-bit path).

The chroma upconversion to 4:4:4 is deliberate; the upscale results in some
non-multiple-of-4 input values in the 10-bit case, and non-multiple-of-256
values in the 16-bit case, so that the tests would catch problems resulting in
lossy output in the low bits.
---
 tests/fate/filter-video.mak             | 10 ++++-
 tests/ref/fate/filter-yadif10           | 60 ++++++++++++-------------
 tests/ref/fate/filter-yadif10-nospatial | 35 +++++++++++++++
 tests/ref/fate/filter-yadif16           | 60 ++++++++++++-------------
 tests/ref/fate/filter-yadif16-nospatial | 35 +++++++++++++++
 5 files changed, 138 insertions(+), 62 deletions(-)
 create mode 100644 tests/ref/fate/filter-yadif10-nospatial
 create mode 100644 tests/ref/fate/filter-yadif16-nospatial

Patch hide | download patch | download mbox

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 1042e96e54..a71ad318b1 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -15,10 +15,16 @@  FATE_YADIF += fate-filter-yadif-mode1
 fate-filter-yadif-mode1: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -frames:v 59 -vf yadif=1
 
 FATE_YADIF += fate-filter-yadif10
-fate-filter-yadif10: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -pix_fmt yuv420p10le -frames:v 30 -vf yadif=0
+fate-filter-yadif10: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -frames:v 30 -vf format=pix_fmts=yuv444p10,yadif=send_frame
+
+FATE_YADIF += fate-filter-yadif10-nospatial
+fate-filter-yadif10-nospatial: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -frames:v 30 -vf format=pix_fmts=yuv444p10,yadif=send_frame_nospatial
 
 FATE_YADIF += fate-filter-yadif16
-fate-filter-yadif16: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -pix_fmt yuv420p16le -frames:v 30 -vf yadif=0
+fate-filter-yadif16: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -frames:v 30 -vf format=pix_fmts=yuv444p16,yadif=send_frame
+
+FATE_YADIF += fate-filter-yadif16-nospatial
+fate-filter-yadif16-nospatial: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_SAMPLES)/mpeg2/mpeg2_field_encoding.ts -flags bitexact -frames:v 30 -vf format=pix_fmts=yuv444p16,yadif=send_frame_nospatial
 
 FATE_FILTER_SAMPLES-$(call FILTERDEMDEC, YADIF, MPEGTS, MPEG2VIDEO) += $(FATE_YADIF)
 
diff --git a/tests/ref/fate/filter-yadif10 b/tests/ref/fate/filter-yadif10
index 28e799fc1f..fe59198a28 100644
--- a/tests/ref/fate/filter-yadif10
+++ b/tests/ref/fate/filter-yadif10
@@ -3,33 +3,33 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 720x576
 #sar 0: 16/15
-0,          9,          9,        1,  1244160, 0xe0c2231b
-0,         10,         10,        1,  1244160, 0xdc7caa43
-0,         11,         11,        1,  1244160, 0x52c4dfbf
-0,         12,         12,        1,  1244160, 0x7c577f07
-0,         13,         13,        1,  1244160, 0x5b6ad7ce
-0,         14,         14,        1,  1244160, 0x6f15ce76
-0,         15,         15,        1,  1244160, 0xf120034a
-0,         16,         16,        1,  1244160, 0x9c65ba64
-0,         17,         17,        1,  1244160, 0x883b237e
-0,         18,         18,        1,  1244160, 0xb8292e0d
-0,         19,         19,        1,  1244160, 0xbc392721
-0,         20,         20,        1,  1244160, 0x7cd82ec9
-0,         21,         21,        1,  1244160, 0x167325eb
-0,         22,         22,        1,  1244160, 0x49bafa73
-0,         23,         23,        1,  1244160, 0xe1ff6dbf
-0,         24,         24,        1,  1244160, 0x85f710b6
-0,         25,         25,        1,  1244160, 0xd1fd4cdb
-0,         26,         26,        1,  1244160, 0xafee03c5
-0,         27,         27,        1,  1244160, 0x566be070
-0,         28,         28,        1,  1244160, 0xb6abbd01
-0,         29,         29,        1,  1244160, 0xa98f38fd
-0,         30,         30,        1,  1244160, 0x00f4736b
-0,         31,         31,        1,  1244160, 0x6b0f9dd2
-0,         32,         32,        1,  1244160, 0x15810b92
-0,         33,         33,        1,  1244160, 0x0b516465
-0,         34,         34,        1,  1244160, 0x927d15e6
-0,         35,         35,        1,  1244160, 0xd102f2bf
-0,         36,         36,        1,  1244160, 0xdd8b3b20
-0,         37,         37,        1,  1244160, 0x229ac529
-0,         38,         38,        1,  1244160, 0xf844e0a2
+0,          9,          9,        1,  2488320, 0x1ad5d04c
+0,         10,         10,        1,  2488320, 0x81a5bc44
+0,         11,         11,        1,  2488320, 0x3ff2e751
+0,         12,         12,        1,  2488320, 0x50f346f4
+0,         13,         13,        1,  2488320, 0x4de253ff
+0,         14,         14,        1,  2488320, 0xb6e20e32
+0,         15,         15,        1,  2488320, 0x36d4e814
+0,         16,         16,        1,  2488320, 0xac45afb1
+0,         17,         17,        1,  2488320, 0x2b59bf7a
+0,         18,         18,        1,  2488320, 0x9ad9cb62
+0,         19,         19,        1,  2488320, 0x032b7858
+0,         20,         20,        1,  2488320, 0x89db7bc6
+0,         21,         21,        1,  2488320, 0xfcc10b48
+0,         22,         22,        1,  2488320, 0xc1ec6425
+0,         23,         23,        1,  2488320, 0x1ed1abd3
+0,         24,         24,        1,  2488320, 0x180ecb47
+0,         25,         25,        1,  2488320, 0x0e4cd4f5
+0,         26,         26,        1,  2488320, 0x3b6b7e5b
+0,         27,         27,        1,  2488320, 0x6a0e7b72
+0,         28,         28,        1,  2488320, 0xc8805042
+0,         29,         29,        1,  2488320, 0x1af37657
+0,         30,         30,        1,  2488320, 0xbae9f356
+0,         31,         31,        1,  2488320, 0x6c31a844
+0,         32,         32,        1,  2488320, 0xa9db6890
+0,         33,         33,        1,  2488320, 0xb30dc595
+0,         34,         34,        1,  2488320, 0xe7ccc324
+0,         35,         35,        1,  2488320, 0x4b294e68
+0,         36,         36,        1,  2488320, 0xc139ae94
+0,         37,         37,        1,  2488320, 0x2ed3171c
+0,         38,         38,        1,  2488320, 0xe7fd6071
diff --git a/tests/ref/fate/filter-yadif10-nospatial b/tests/ref/fate/filter-yadif10-nospatial
new file mode 100644
index 0000000000..3c924b6ee2
--- /dev/null
+++ b/tests/ref/fate/filter-yadif10-nospatial
@@ -0,0 +1,35 @@ 
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x576
+#sar 0: 16/15
+0,          9,          9,        1,  2488320, 0xf702518b
+0,         10,         10,        1,  2488320, 0x6bd98e5c
+0,         11,         11,        1,  2488320, 0xda377506
+0,         12,         12,        1,  2488320, 0xb0bdd842
+0,         13,         13,        1,  2488320, 0xec5ba916
+0,         14,         14,        1,  2488320, 0x2d7c809f
+0,         15,         15,        1,  2488320, 0x92031846
+0,         16,         16,        1,  2488320, 0x76fd0082
+0,         17,         17,        1,  2488320, 0x6286fd31
+0,         18,         18,        1,  2488320, 0x955609c0
+0,         19,         19,        1,  2488320, 0x8a04c8e9
+0,         20,         20,        1,  2488320, 0x86b1bf8a
+0,         21,         21,        1,  2488320, 0x9ce5c68d
+0,         22,         22,        1,  2488320, 0x62451c84
+0,         23,         23,        1,  2488320, 0x2abc188a
+0,         24,         24,        1,  2488320, 0x3c7f30d3
+0,         25,         25,        1,  2488320, 0xb14c3b9a
+0,         26,         26,        1,  2488320, 0x450bbc14
+0,         27,         27,        1,  2488320, 0x5896bd2c
+0,         28,         28,        1,  2488320, 0x0ef09309
+0,         29,         29,        1,  2488320, 0xe4dbcace
+0,         30,         30,        1,  2488320, 0xc0a84831
+0,         31,         31,        1,  2488320, 0x48400d76
+0,         32,         32,        1,  2488320, 0x7e66ae1d
+0,         33,         33,        1,  2488320, 0xdcf2bc9e
+0,         34,         34,        1,  2488320, 0x8dcf9290
+0,         35,         35,        1,  2488320, 0xba34ac00
+0,         36,         36,        1,  2488320, 0xba421c87
+0,         37,         37,        1,  2488320, 0xcd3e65b7
+0,         38,         38,        1,  2488320, 0x1bf501f3
diff --git a/tests/ref/fate/filter-yadif16 b/tests/ref/fate/filter-yadif16
index 0c856ab37a..2c61015a35 100644
--- a/tests/ref/fate/filter-yadif16
+++ b/tests/ref/fate/filter-yadif16
@@ -3,33 +3,33 @@ 
 #codec_id 0: rawvideo
 #dimensions 0: 720x576
 #sar 0: 16/15
-0,          9,          9,        1,  1244160, 0x24eeca92
-0,         10,         10,        1,  1244160, 0x96b8e646
-0,         11,         11,        1,  1244160, 0xc11fc5da
-0,         12,         12,        1,  1244160, 0xc15f9168
-0,         13,         13,        1,  1244160, 0xba1c738e
-0,         14,         14,        1,  1244160, 0x56b59681
-0,         15,         15,        1,  1244160, 0x14ad778d
-0,         16,         16,        1,  1244160, 0x18dc584b
-0,         17,         17,        1,  1244160, 0xe4c11635
-0,         18,         18,        1,  1244160, 0x85cc0dc0
-0,         19,         19,        1,  1244160, 0x2d6a65a4
-0,         20,         20,        1,  1244160, 0x4054d8f9
-0,         21,         21,        1,  1244160, 0xebce97d3
-0,         22,         22,        1,  1244160, 0x79437c93
-0,         23,         23,        1,  1244160, 0x6438ed40
-0,         24,         24,        1,  1244160, 0x9121928c
-0,         25,         25,        1,  1244160, 0xb8731075
-0,         26,         26,        1,  1244160, 0xfb01310e
-0,         27,         27,        1,  1244160, 0x97be489c
-0,         28,         28,        1,  1244160, 0xa5b4b8aa
-0,         29,         29,        1,  1244160, 0x00a7ae0f
-0,         30,         30,        1,  1244160, 0x514fa990
-0,         31,         31,        1,  1244160, 0xd73c3f66
-0,         32,         32,        1,  1244160, 0x3602e6c3
-0,         33,         33,        1,  1244160, 0xa16ad8ab
-0,         34,         34,        1,  1244160, 0xdf11ac80
-0,         35,         35,        1,  1244160, 0x1f084421
-0,         36,         36,        1,  1244160, 0x9fc1bd32
-0,         37,         37,        1,  1244160, 0x1389f6cf
-0,         38,         38,        1,  1244160, 0x6fc5f0e5
+0,          9,          9,        1,  2488320, 0xe2648b6e
+0,         10,         10,        1,  2488320, 0xf5d4fa23
+0,         11,         11,        1,  2488320, 0x166f0d58
+0,         12,         12,        1,  2488320, 0x4d45a8fd
+0,         13,         13,        1,  2488320, 0x44217da8
+0,         14,         14,        1,  2488320, 0xad3f2719
+0,         15,         15,        1,  2488320, 0x82f5b330
+0,         16,         16,        1,  2488320, 0x5e628288
+0,         17,         17,        1,  2488320, 0x88c92e48
+0,         18,         18,        1,  2488320, 0x0e0d4147
+0,         19,         19,        1,  2488320, 0x976064ec
+0,         20,         20,        1,  2488320, 0x9e9b8708
+0,         21,         21,        1,  2488320, 0x19baf2ae
+0,         22,         22,        1,  2488320, 0x2bced12f
+0,         23,         23,        1,  2488320, 0x56aaa66e
+0,         24,         24,        1,  2488320, 0xee1a7cc0
+0,         25,         25,        1,  2488320, 0xa8f39cdb
+0,         26,         26,        1,  2488320, 0x6680e537
+0,         27,         27,        1,  2488320, 0xc16028a1
+0,         28,         28,        1,  2488320, 0xb6b0e1f3
+0,         29,         29,        1,  2488320, 0xcccae3d0
+0,         30,         30,        1,  2488320, 0x340b3e74
+0,         31,         31,        1,  2488320, 0x4929e018
+0,         32,         32,        1,  2488320, 0x36f3b509
+0,         33,         33,        1,  2488320, 0x02e79433
+0,         34,         34,        1,  2488320, 0x03f30f1f
+0,         35,         35,        1,  2488320, 0x8b0ad7ae
+0,         36,         36,        1,  2488320, 0xc79f24a9
+0,         37,         37,        1,  2488320, 0x3b0f32c7
+0,         38,         38,        1,  2488320, 0xe1c10a50
diff --git a/tests/ref/fate/filter-yadif16-nospatial b/tests/ref/fate/filter-yadif16-nospatial
new file mode 100644
index 0000000000..ade23a3c9b
--- /dev/null
+++ b/tests/ref/fate/filter-yadif16-nospatial
@@ -0,0 +1,35 @@ 
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x576
+#sar 0: 16/15
+0,          9,          9,        1,  2488320, 0xd547cd9d
+0,         10,         10,        1,  2488320, 0x4391d4a5
+0,         11,         11,        1,  2488320, 0x0bbdb3a2
+0,         12,         12,        1,  2488320, 0xa8404800
+0,         13,         13,        1,  2488320, 0xa8ab3703
+0,         14,         14,        1,  2488320, 0x1e60263e
+0,         15,         15,        1,  2488320, 0x2c0b4f0e
+0,         16,         16,        1,  2488320, 0xfb5d4f00
+0,         17,         17,        1,  2488320, 0xfe787f2f
+0,         18,         18,        1,  2488320, 0x130d3ca9
+0,         19,         19,        1,  2488320, 0xb6ae35da
+0,         20,         20,        1,  2488320, 0xb6a5d5fc
+0,         21,         21,        1,  2488320, 0x300ea629
+0,         22,         22,        1,  2488320, 0x06d099ed
+0,         23,         23,        1,  2488320, 0xa83b7cbb
+0,         24,         24,        1,  2488320, 0x076e089d
+0,         25,         25,        1,  2488320, 0x46b10d36
+0,         26,         26,        1,  2488320, 0xfa93a0f7
+0,         27,         27,        1,  2488320, 0xd85c71a8
+0,         28,         28,        1,  2488320, 0xb3e5bd8e
+0,         29,         29,        1,  2488320, 0xd45cb026
+0,         30,         30,        1,  2488320, 0xe411e804
+0,         31,         31,        1,  2488320, 0x3585652f
+0,         32,         32,        1,  2488320, 0x83f60a43
+0,         33,         33,        1,  2488320, 0xf40719a0
+0,         34,         34,        1,  2488320, 0x19127303
+0,         35,         35,        1,  2488320, 0x51f36b06
+0,         36,         36,        1,  2488320, 0x0bd6898e
+0,         37,         37,        1,  2488320, 0xa0d2520e
+0,         38,         38,        1,  2488320, 0x993db28f