From c87da61f034d8a84273eb389879b9b8b239caa27 Mon Sep 17 00:00:00 2001
From: Martin Vignali <martin.vignali@gmail.com>
Date: Sat, 17 Nov 2018 23:49:44 +0100
Subject: [PATCH 13/13] fate/proresdec : add test for 12b decoding

---
 tests/fate/prores.mak                       | 18 ++++++++++++++++++
 tests/ref/fate/prores-422-12b               |  7 +++++++
 tests/ref/fate/prores-422_hq-12b            |  7 +++++++
 tests/ref/fate/prores-422_lt-12b            |  7 +++++++
 tests/ref/fate/prores-422_proxy-12b         |  7 +++++++
 tests/ref/fate/prores-alpha-12b             |  7 +++++++
 tests/ref/fate/prores-alpha_skip-12b        |  7 +++++++
 tests/ref/fate/prores-gray-12b              | 16 ++++++++++++++++
 tests/ref/fate/prores-transparency-12b      | 14 ++++++++++++++
 tests/ref/fate/prores-transparency_skip-12b | 14 ++++++++++++++
 10 files changed, 104 insertions(+)
 create mode 100644 tests/ref/fate/prores-422-12b
 create mode 100644 tests/ref/fate/prores-422_hq-12b
 create mode 100644 tests/ref/fate/prores-422_lt-12b
 create mode 100644 tests/ref/fate/prores-422_proxy-12b
 create mode 100644 tests/ref/fate/prores-alpha-12b
 create mode 100644 tests/ref/fate/prores-alpha_skip-12b
 create mode 100644 tests/ref/fate/prores-gray-12b
 create mode 100644 tests/ref/fate/prores-transparency-12b
 create mode 100644 tests/ref/fate/prores-transparency_skip-12b

diff --git a/tests/fate/prores.mak b/tests/fate/prores.mak
index b23714b65b..2c8eb725d7 100644
--- a/tests/fate/prores.mak
+++ b/tests/fate/prores.mak
@@ -1,25 +1,43 @@
 FATE_PRORES = fate-prores-422                                           \
+              fate-prores-422-12b                                       \
               fate-prores-422_hq                                        \
+              fate-prores-422_hq-12b                                    \
               fate-prores-422_lt                                        \
+              fate-prores-422_lt-12b                                    \
               fate-prores-422_proxy                                     \
+              fate-prores-422_proxy-12b                                 \
               fate-prores-alpha                                         \
+              fate-prores-alpha-12b                                     \
               fate-prores-alpha_skip                                    \
+              fate-prores-alpha_skip-12b                                \
               fate-prores-transparency                                  \
+              fate-prores-transparency-12b                              \
               fate-prores-transparency_skip                             \
+              fate-prores-transparency_skip-12b                         \
               fate-prores-gray                                          \
+              fate-prores-gray-12b                                      \
 
 FATE_SAMPLES_AVCONV-$(call DEMDEC, MOV, PRORES) += $(FATE_PRORES)
 fate-prores: $(FATE_PRORES)
 
 fate-prores-422:       CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov -pix_fmt yuv422p10le
+fate-prores-422-12b:   CMD = framecrc -flags +bitexact -precision 12 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422.mov -pix_fmt yuv422p12le
 fate-prores-422_hq:    CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov -pix_fmt yuv422p10le
+fate-prores-422_hq-12b:    CMD = framecrc -flags +bitexact -precision 12 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov -pix_fmt yuv422p12le
 fate-prores-422_lt:    CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov -pix_fmt yuv422p10le
+fate-prores-422_lt-12b:    CMD = framecrc -flags +bitexact -precision 12 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov -pix_fmt yuv422p12le
 fate-prores-422_proxy: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov -pix_fmt yuv422p10le
+fate-prores-422_proxy-12b: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov -pix_fmt yuv422p12le
 fate-prores-alpha:     CMD = framecrc -flags +bitexact -precision 10 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuva444p10le
+fate-prores-alpha-12b:     CMD = framecrc -flags +bitexact -precision 12 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuva444p12le
 fate-prores-alpha_skip: CMD = framecrc -flags +bitexact -precision 10 -skip_alpha 1 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuv444p10le
+fate-prores-alpha_skip-12b: CMD = framecrc -flags +bitexact -precision 12 -skip_alpha 1 -i $(TARGET_SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuv444p12le
 fate-prores-transparency: CMD = framecrc -flags +bitexact -precision 10 -i $(TARGET_SAMPLES)/prores/prores4444_with_transparency.mov -pix_fmt yuva444p10le
+fate-prores-transparency-12b: CMD = framecrc -flags +bitexact -precision 12 -i $(TARGET_SAMPLES)/prores/prores4444_with_transparency.mov -pix_fmt yuva444p12le
 fate-prores-transparency_skip: CMD = framecrc -flags +bitexact -precision 10 -skip_alpha 1 -i $(TARGET_SAMPLES)/prores/prores4444_with_transparency.mov -pix_fmt yuv444p10le
+fate-prores-transparency_skip-12b: CMD = framecrc -flags +bitexact -precision 12 -skip_alpha 1 -i $(TARGET_SAMPLES)/prores/prores4444_with_transparency.mov -pix_fmt yuv444p12le
 fate-prores-gray:      CMD = framecrc -flags +bitexact -c:a aac_fixed -i $(TARGET_SAMPLES)/prores/gray.mov -pix_fmt yuv422p10le
+fate-prores-gray-12b:  CMD = framecrc -flags +bitexact -c:a aac_fixed -i $(TARGET_SAMPLES)/prores/gray.mov -pix_fmt yuv422p12le
 
 #Test bsf prores-metadata
 FATE_PRORES_METADATA_BSF += fate-prores-metadata
diff --git a/tests/ref/fate/prores-422-12b b/tests/ref/fate/prores-422-12b
new file mode 100644
index 0000000000..3a0e5fa901
--- /dev/null
+++ b/tests/ref/fate/prores-422-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1,  8294400, 0xdee1e845
+0,          1,          1,        1,  8294400, 0xdee1e845
diff --git a/tests/ref/fate/prores-422_hq-12b b/tests/ref/fate/prores-422_hq-12b
new file mode 100644
index 0000000000..8de45c12b7
--- /dev/null
+++ b/tests/ref/fate/prores-422_hq-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1,  8294400, 0x651dec6b
+0,          1,          1,        1,  8294400, 0x651dec6b
diff --git a/tests/ref/fate/prores-422_lt-12b b/tests/ref/fate/prores-422_lt-12b
new file mode 100644
index 0000000000..989a7db85b
--- /dev/null
+++ b/tests/ref/fate/prores-422_lt-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1,  8294400, 0x828c9786
+0,          1,          1,        1,  8294400, 0x828c9786
diff --git a/tests/ref/fate/prores-422_proxy-12b b/tests/ref/fate/prores-422_proxy-12b
new file mode 100644
index 0000000000..17147df8c7
--- /dev/null
+++ b/tests/ref/fate/prores-422_proxy-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1,  8294400, 0x3c8fb71a
+0,          1,          1,        1,  8294400, 0x3c8fb71a
diff --git a/tests/ref/fate/prores-alpha-12b b/tests/ref/fate/prores-alpha-12b
new file mode 100644
index 0000000000..d5e3e6877d
--- /dev/null
+++ b/tests/ref/fate/prores-alpha-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1, 16588800, 0xb035f658
+0,          1,          1,        1, 16588800, 0xb035f658
diff --git a/tests/ref/fate/prores-alpha_skip-12b b/tests/ref/fate/prores-alpha_skip-12b
new file mode 100644
index 0000000000..09691310ed
--- /dev/null
+++ b/tests/ref/fate/prores-alpha_skip-12b
@@ -0,0 +1,7 @@
+#tb 0: 100/2997
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1, 12441600, 0x65e009b8
+0,          1,          1,        1, 12441600, 0x65e009b8
diff --git a/tests/ref/fate/prores-gray-12b b/tests/ref/fate/prores-gray-12b
new file mode 100644
index 0000000000..20b68b8a0e
--- /dev/null
+++ b/tests/ref/fate/prores-gray-12b
@@ -0,0 +1,16 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x576
+#sar 0: 16/15
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s16le
+#sample_rate 1: 48000
+#channel_layout 1: 3
+#channel_layout_name 1: stereo
+0,          0,          0,        1,  1658880, 0xdb1d41e9
+1,          0,          0,     1024,     4096, 0x6c8a9a18
+1,       1024,       1024,     1024,     4096, 0x960dadcf
+0,          1,          1,        1,  1658880, 0x3563c589
+1,       2048,       2048,     1024,     4096, 0xa913cd55
diff --git a/tests/ref/fate/prores-transparency-12b b/tests/ref/fate/prores-transparency-12b
new file mode 100644
index 0000000000..4e88152834
--- /dev/null
+++ b/tests/ref/fate/prores-transparency-12b
@@ -0,0 +1,14 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 1/1
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s16le
+#sample_rate 1: 48000
+#channel_layout 1: 3
+#channel_layout_name 1: stereo
+0,          0,          0,        1, 16588800, 0xcfb3d806
+1,          0,          0,     1024,     4096, 0x00000000
+1,       1024,       1024,      896,     3584, 0x00000000
diff --git a/tests/ref/fate/prores-transparency_skip-12b b/tests/ref/fate/prores-transparency_skip-12b
new file mode 100644
index 0000000000..82c180d174
--- /dev/null
+++ b/tests/ref/fate/prores-transparency_skip-12b
@@ -0,0 +1,14 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 1/1
+#tb 1: 1/48000
+#media_type 1: audio
+#codec_id 1: pcm_s16le
+#sample_rate 1: 48000
+#channel_layout 1: 3
+#channel_layout_name 1: stereo
+0,          0,          0,        1, 12441600, 0x74f53304
+1,          0,          0,     1024,     4096, 0x00000000
+1,       1024,       1024,      896,     3584, 0x00000000
-- 
2.14.3 (Apple Git-98)

