OSDN Git Service

test: jpeg/enc: move input creators to data file
[android-x86/hardware-intel-common-vaapi.git] / test / i965_jpeg_test_data.cpp
1 /*
2  * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25 #include "i965_jpeg_test_data.h"
26 #include "i965_drv_video.h"
27 #include "i965_streamable.h"
28 #include "test_utils.h"
29
30 #include <algorithm>
31
32 namespace JPEG {
33 namespace Decode {
34
35     /**
36      * Test Pattern 1
37      *
38      * Solid Black 10x10
39      *
40      */
41     template<> const bool TestPatternData<1>::m_valid =
42         TestPatternData<1>::initialize<10, 10>(
43
44             generateSolid({0x00, 0x80, 0x80}, {10, 10}),
45
46             {{VA_FOURCC_IMC3, {
47                 0xff,0x00,0x3f,0xfa,0x28,0xa2,0x80,0x3f,0xff,
48             }},
49             {VA_FOURCC_422H, {
50                 0xff,0x00,0x3f,0xfa,0x28,0x00,0xa2,0x80,0x3f,0xff,
51             }},
52             {VA_FOURCC_422V, {
53                 0xff,0x00,0x3f,0xfa,0x28,0x00,0xa2,0x80,0x3f,0xff,
54             }},
55             {VA_FOURCC_411P, {
56                 0xff,0x00,0x3f,0xfa,0x28,0xa2,0x80,0x0a,0x28,0xa2,0x80,0x3f,
57                 0xff,
58             }},
59             {VA_FOURCC_444P, {
60               0xff,0x00,0x3f,0xfa,0x00,0x28,0x00,0xa0,0x02,0x80,0x3f,0xff,
61             }}}
62         );
63
64
65     /**
66      * Test Pattern 2
67      *
68      * R = red
69      * G = green
70      * B = blue
71      * W = white
72      * K = black
73      * -------------------
74      * R R G G B B W W K K
75      * R R G G B B W W K K
76      * K K R R G G B B W W
77      * K K R R G G B B W W
78      * W W K K R R G G B B
79      * W W K K R R G G B B
80      * B B W W K K R R G G
81      * B B W W K K R R G G
82      * G G B B W W K K R R
83      * G G B B W W K K R R
84      * -------------------
85      *
86      */
87
88     template<> const bool TestPatternData<2>::m_valid =
89         TestPatternData<2>::initialize<10, 10>({
90             // Pixel Y Component
91             0x4c,0x4c,0x95,0x95,0x1d,0x1d,0xff,0xff,0x00,0x00,
92             0x4c,0x4c,0x95,0x95,0x1d,0x1d,0xff,0xff,0x00,0x00,
93             0x00,0x00,0x4c,0x4c,0x95,0x95,0x1d,0x1d,0xff,0xff,
94             0x00,0x00,0x4c,0x4c,0x95,0x95,0x1d,0x1d,0xff,0xff,
95             0xff,0xff,0x00,0x00,0x4c,0x4c,0x95,0x95,0x1d,0x1d,
96             0xff,0xff,0x00,0x00,0x4c,0x4c,0x95,0x95,0x1d,0x1d,
97             0x1d,0x1d,0xff,0xff,0x00,0x00,0x4c,0x4c,0x95,0x95,
98             0x1d,0x1d,0xff,0xff,0x00,0x00,0x4c,0x4c,0x95,0x95,
99             0x95,0x95,0x1d,0x1d,0xff,0xff,0x00,0x00,0x4c,0x4c,
100             0x95,0x95,0x1d,0x1d,0xff,0xff,0x00,0x00,0x4c,0x4c,
101
102             // Pixel U Component
103             0x54,0x54,0x2b,0x2b,0xff,0xff,0x80,0x80,0x80,0x80,
104             0x54,0x54,0x2b,0x2b,0xff,0xff,0x80,0x80,0x80,0x80,
105             0x80,0x80,0x54,0x54,0x2b,0x2b,0xff,0xff,0x80,0x80,
106             0x80,0x80,0x54,0x54,0x2b,0x2b,0xff,0xff,0x80,0x80,
107             0x80,0x80,0x80,0x80,0x54,0x54,0x2b,0x2b,0xff,0xff,
108             0x80,0x80,0x80,0x80,0x54,0x54,0x2b,0x2b,0xff,0xff,
109             0xff,0xff,0x80,0x80,0x80,0x80,0x54,0x54,0x2b,0x2b,
110             0xff,0xff,0x80,0x80,0x80,0x80,0x54,0x54,0x2b,0x2b,
111             0x2b,0x2b,0xff,0xff,0x80,0x80,0x80,0x80,0x54,0x54,
112             0x2b,0x2b,0xff,0xff,0x80,0x80,0x80,0x80,0x54,0x54,
113
114             // Pixel V Component
115             0xff,0xff,0x15,0x15,0x6b,0x6b,0x80,0x80,0x80,0x80,
116             0xff,0xff,0x15,0x15,0x6b,0x6b,0x80,0x80,0x80,0x80,
117             0x80,0x80,0xff,0xff,0x15,0x15,0x6b,0x6b,0x80,0x80,
118             0x80,0x80,0xff,0xff,0x15,0x15,0x6b,0x6b,0x80,0x80,
119             0x80,0x80,0x80,0x80,0xff,0xff,0x15,0x15,0x6b,0x6b,
120             0x80,0x80,0x80,0x80,0xff,0xff,0x15,0x15,0x6b,0x6b,
121             0x6b,0x6b,0x80,0x80,0x80,0x80,0xff,0xff,0x15,0x15,
122             0x6b,0x6b,0x80,0x80,0x80,0x80,0xff,0xff,0x15,0x15,
123             0x15,0x15,0x6b,0x6b,0x80,0x80,0x80,0x80,0xff,0xff,
124             0x15,0x15,0x6b,0x6b,0x80,0x80,0x80,0x80,0xff,0xff,
125         },{
126             {VA_FOURCC_IMC3, {
127                 0xf8,0x8b,0xc3,0x7e,0x24,0xf1,0xf7,0xec,0x71,0xe3,0xef,0xd9,
128                 0x8f,0xc6,0x5e,0x0d,0xfd,0xa7,0x7f,0xe1,0x27,0xf0,0x3f,0x89,
129                 0xff,0x00,0xe1,0x74,0xff,0x00,0xc3,0xae,0x3f,0xe0,0xa8,0xff,
130                 0x00,0xf0,0xa5,0xb4,0x5d,0x17,0xfe,0x13,0x5f,0xec,0x5d,0x16,
131                 0x7d,0x2b,0xf6,0xda,0xff,0x00,0x8c,0x25,0xd5,0x60,0xf1,0x46,
132                 0xaf,0xe1,0xbf,0xf8,0x46,0xf5,0x7f,0x14,0x5d,0x7e,0xcf,0x1f,
133                 0xf1,0x90,0xf6,0xb6,0xff,0x00,0xdb,0x1f,0x67,0xff,0x00,0x85,
134                 0xb5,0xf0,0x93,0xcd,0xb5,0x96,0x39,0x2d,0xfd,0x07,0xfe,0x19,
135                 0xbb,0xf6,0x07,0xff,0x00,0xa5,0x63,0x7f,0xf3,0xb4,0x5f,0x19,
136                 0xff,0x00,0xf9,0x7b,0x47,0xed,0x23,0xff,0x00,0x26,0x0f,0xff,
137                 0x00,0x07,0x39,0x7f,0xde,0x17,0x7f,0xf5,0x73,0xe8,0x55,0xf9,
138                 0xf7,0x5f,0x1f,0xe2,0x3f,0x8a,0xf8,0xff,0x00,0xa3,0x8e,0x03,
139                 0xc3,0x8c,0x27,0x03,0x70,0x0f,0x86,0x1e,0x22,0x78,0x59,0xe2,
140                 0xaf,0x86,0x1e,0x19,0x78,0xeb,0xc0,0x1e,0x1b,0xf8,0xfd,0x85,
141                 0xf1,0x3f,0x89,0xf1,0x1e,0x04,0xe1,0xfc,0x7c,0xf0,0xc3,0x81,
142                 0x7c,0x7c,0xce,0xf8,0x1f,0x82,0x38,0xcb,0xc1,0x4f,0x16,0x3e,
143                 0x8f,0x39,0x9e,0x61,0x92,0x54,0xcc,0xfc,0x56,0x6f,0x88,0xb2,
144                 0xcc,0xdf,0x03,0x2e,0x03,0xc5,0xf1,0xe6,0x5d,0xc5,0x1e,0x29,
145                 0x78,0x7b,0xe1,0xdf,0x85,0x39,0xef,0x8b,0x3e,0x26,0xe5,0xfc,
146                 0x45,0xfd,0x1d,0xf4,0x11,0xfa,0x20,0xf1,0xcf,0xed,0x4a,0xe0,
147                 0x6c,0xc3,0xc7,0x0f,0x0f,0xbc,0x67,0xe1,0xff,0x00,0xa2,0xef,
148                 0x1c,0xe6,0x1c,0x3f,0xc0,0x5c,0x75,0xe2,0xed,0x2c,0xf3,0xc2,
149                 0x5c,0x5f,0x8f,0x7c,0x35,0xe2,0x7f,0x12,0xf8,0xa7,0x83,0xcf,
150                 0xb3,0x5c,0x3f,0x1b,0xe1,0xf2,0x6c,0x2f,0x8a,0x3e,0x09,0x62,
151                 0x38,0x3b,0xc5,0x0c,0x46,0x23,0x22,0xce,0x5f,0x8c,0x1c,0x63,
152                 0x86,0xcc,0xf3,0xac,0xa7,0xc7,0x0c,0xdb,0x15,0x90,0x78,0x89,
153                 0x9d,0xf0,0x7f,0x0f,0x78,0xcd,0x5f,0xc6,0x6f,0x13,0xfc,0x74,
154                 0xff,
155             }},
156             {VA_FOURCC_422H, {
157                 0xf8,0x8b,0xc3,0x7e,0x24,0xf1,0xf7,0xec,0x71,0xe3,0xef,0xd9,
158                 0x8f,0xc6,0x5e,0x0d,0xfd,0xa7,0x7f,0xe1,0x27,0xf0,0x3f,0x89,
159                 0xff,0x00,0xe1,0x74,0xff,0x00,0xc3,0xae,0x3f,0xe0,0xa8,0xff,
160                 0x00,0xf0,0xa5,0xb4,0x5d,0x17,0xfe,0x13,0x5f,0xec,0x5d,0x16,
161                 0x7d,0x2b,0xf6,0xda,0xff,0x00,0x8c,0x25,0xd5,0x60,0xf1,0x46,
162                 0xaf,0xe1,0xbf,0xf8,0x46,0xf5,0x7f,0x14,0x5d,0x7e,0xcf,0x1f,
163                 0xf1,0x90,0xf6,0xb6,0xff,0x00,0xdb,0x1f,0x67,0xff,0x00,0x85,
164                 0xb5,0xf0,0x93,0xcd,0xb5,0x96,0x39,0x2d,0xfd,0x07,0xfe,0x19,
165                 0xbb,0xf6,0x07,0xff,0x00,0xa5,0x63,0x7f,0xf3,0xb4,0x5f,0x19,
166                 0xff,0x00,0xf9,0x7b,0x5f,0x41,0xc2,0x19,0xf7,0xd1,0xb7,0xc1,
167                 0x0c,0x57,0x17,0xfd,0x17,0x7e,0x9d,0x3f,0x48,0x4f,0xf8,0x94,
168                 0xdc,0x77,0x80,0x7c,0x6b,0xc6,0x78,0x0f,0x06,0x73,0xff,0x00,
169                 0xf8,0x84,0xfc,0x7b,0xe3,0xbf,0xfa,0xcf,0xc1,0xbc,0x6b,0xc6,
170                 0xbc,0x4f,0xc4,0xbc,0x7f,0xe0,0xe7,0xf6,0x57,0x83,0xd4,0x73,
171                 0x6a,0x39,0x2f,0xfc,0x41,0x1f,0x1b,0x9f,0x89,0x5c,0x61,0xff,
172                 0x00,0x11,0x0b,0x8a,0xb8,0x83,0x39,0xcd,0x7c,0x4a,0xff,0x00,
173                 0x88,0xff,0x00,0xfe,0xaf,0xe4,0xb3,0xc2,0x70,0x8f,0x85,0x59,
174                 0x05,0x03,0xf1,0xef,0xa4,0xf7,0x8d,0xfc,0x07,0xe0,0x07,0x13,
175                 0x61,0x7c,0x6f,0xe3,0x3c,0xcf,0xfb,0x3b,0xc3,0xaf,0xa5,0xbe,
176                 0x6d,0xc5,0x3e,0x24,0xe0,0x31,0xbf,0x52,0xce,0x71,0x7f,0x50,
177                 0xfa,0x49,0xe0,0x31,0x19,0x5e,0x3f,0xe9,0x65,0xc3,0x7f,0x56,
178                 0xca,0xb2,0x9c,0xe7,0x3d,0xc5,0x7f,0xad,0xbc,0x51,0xc6,0x5c,
179                 0x0b,0xf4,0xaa,0xfe,0xd8,0xad,0x94,0xf0,0xdf,0x01,0x64,0x3f,
180                 0xf1,0x35,0x5f,0xf1,0x03,0x7c,0x35,0xc0,0x4f,0x2f,0xf0,0x37,
181                 0x38,0x86,0x14,0xfd,0xa4,0x7f,0xe4,0xc1,0xff,0x00,0xe0,0xe7,
182                 0x2f,0xfb,0xc2,0xef,0xfe,0xae,0x7d,0x0a,0xbf,0x3e,0xeb,0xf9,
183                 0x7b,0xe9,0x7b,0xff,0x00,0x24,0xb7,0xd1,0x0b,0xfe,0xd0,0xb3,
184                 0xe8,0x63,0xff,0x00,0xb0,0x57,0xf4,0x65,0x3f,0xdd,0xdf,0xf4,
185                 0x61,0x7f,0xe5,0x1a,0x38,0xab,0xfe,0xcd,0x4f,0xd1,0x73,0xff,
186                 0x00,0x54,0x1e,0x27,0x9f,0xff,
187             }},
188             {VA_FOURCC_422V, {
189                 0xf8,0x8b,0xc3,0x7e,0x24,0xf1,0xf7,0xec,0x71,0xe3,0xef,0xd9,
190                 0x8f,0xc6,0x5e,0x0d,0xfd,0xa7,0x7f,0xe1,0x27,0xf0,0x3f,0x89,
191                 0xff,0x00,0xe1,0x74,0xff,0x00,0xc3,0xae,0x3f,0xe0,0xa8,0xff,
192                 0x00,0xf0,0xa5,0xb4,0x5d,0x17,0xfe,0x13,0x5f,0xec,0x5d,0x16,
193                 0x7d,0x2b,0xf6,0xda,0xff,0x00,0x8c,0x25,0xd5,0x60,0xf1,0x46,
194                 0xaf,0xe1,0xbf,0xf8,0x46,0xf5,0x7f,0x14,0x5d,0x7e,0xcf,0x1f,
195                 0xf1,0x90,0xf6,0xb6,0xff,0x00,0xdb,0x1f,0x67,0xff,0x00,0x85,
196                 0xb5,0xf0,0x93,0xcd,0xb5,0x96,0x39,0x2d,0xfd,0x07,0xf6,0x91,
197                 0xff,0x00,0x93,0x07,0xff,0x00,0x83,0x9c,0xbf,0xef,0x0b,0xbf,
198                 0xfa,0xb9,0xf4,0x2a,0xfa,0x0c,0x87,0x81,0x70,0xb9,0x4f,0xd1,
199                 0xb7,0xe8,0xf7,0xf4,0xd8,0xfa,0x2e,0x71,0x4f,0x1a,0xfd,0x1c,
200                 0xf0,0x1f,0x4c,0xef,0xf8,0x8b,0x1f,0xdb,0xfe,0x0b,0xe3,0xeb,
201                 0xf0,0x57,0x8c,0x5c,0x1a,0xff,0x00,0xe2,0x5d,0x78,0xf6,0xb7,
202                 0x84,0xb9,0x57,0xfc,0x46,0x3e,0x1c,0xe2,0x5e,0x04,0xc8,0xfc,
203                 0x11,0xfa,0x44,0x5a,0xb5,0x4e,0x20,0xe2,0xbf,0x0f,0x7f,0xd7,
204                 0x0f,0x00,0xb2,0x5f,0xf8,0x84,0x99,0xae,0x79,0x0c,0x7f,0x0f,
205                 0xff,0x00,0x69,0x71,0x76,0x59,0x43,0x8d,0x2b,0x7e,0x3d,0xe0,
206                 0x87,0x8f,0xfc,0x33,0xf4,0xdc,0xe0,0x3c,0xb3,0xc6,0xbf,0x1b,
207                 0xfc,0x3a,0xcd,0xb0,0xbe,0x22,0xf1,0x1f,0xd7,0x7e,0xbb,0xe3,
208                 0x37,0x86,0xdc,0x79,0x87,0xe0,0xef,0xa4,0x9c,0xbf,0xb1,0xf3,
209                 0x9c,0xdb,0x84,0xf0,0xdf,0xeb,0x27,0x8b,0x58,0xfe,0x09,0xe2,
210                 0x6e,0x17,0xf1,0xc6,0xd9,0x17,0x09,0xe5,0x3c,0x2b,0x93,0xff,
211                 0x00,0xc4,0xd5,0x78,0x4f,0xf4,0x84,0xff,0x00,0x88,0x67,0xc0,
212                 0x52,0xc7,0xf0,0xd7,0x81,0xbf,0xf1,0x09,0xf3,0x0c,0x54,0x38,
213                 0x97,0x0e,0x7f,0xc3,0x37,0x7e,0xc0,0xff,0x00,0xf4,0xac,0x6f,
214                 0xfe,0x76,0x8b,0xe3,0x3f,0xff,0x00,0x2f,0x6b,0xf3,0xee,0xbf,
215                 0x97,0xbf,0xe2,0x7a,0x78,0xa7,0xfe,0x91,0x6b,0xe8,0x59,0xff,
216                 0x00,0x86,0x4f,0xa6,0x9f,0xff,0x00,0x57,0x59,0xfe,0xee,0xff,
217                 0x00,0xc5,0x01,0x7e,0x92,0xff,0x00,0xf4,0xb1,0x3f,0x0a,0x7f,
218                 0xf1,0x83,0xf3,0xff,0x00,0xfe,0xad,0x73,0xff,
219             }},
220             {VA_FOURCC_411P, {
221                 0xf8,0x8b,0xc3,0x7e,0x24,0xf1,0xf7,0xec,0x71,0xe3,0xef,0xd9,
222                 0x8b,0xc6,0x5e,0x0d,0xfd,0xa7,0x7f,0xe1,0x27,0xf0,0x3f,0x89,
223                 0xbf,0xe1,0x74,0xff,0x00,0xc3,0xae,0x3f,0xe0,0xa8,0xff,0x00,
224                 0xf0,0xa5,0xb4,0x5d,0x17,0xfe,0x13,0x6f,0xec,0x5d,0x16,0xe3,
225                 0x4a,0xfd,0xb6,0xbf,0xe3,0x09,0x75,0x5b,0x7f,0x14,0x6a,0xfe,
226                 0x1c,0xff,0x00,0x84,0x6f,0x57,0xf1,0x45,0xd7,0xec,0xf1,0xff,
227                 0x00,0x19,0x0f,0x6b,0x6f,0xfd,0xb1,0xf6,0x7f,0xf8,0x5b,0x5f,
228                 0x09,0x7c,0xdb,0x59,0xa3,0x92,0xdf,0xd0,0x7f,0xe1,0x9b,0xbf,
229                 0x60,0x7f,0xfa,0x56,0x37,0xff,0x00,0x3b,0x45,0xf1,0x9f,0xff,
230                 0x00,0x97,0xb4,0x51,0x5f,0x79,0xc3,0xbc,0x6f,0xfb,0x3c,0xf8,
231                 0x5b,0x25,0xcb,0xf8,0x23,0xe9,0x37,0xf4,0xf2,0xff,0x00,0x89,
232                 0x73,0xf1,0xaf,0xc3,0x8a,0x52,0xf0,0xb7,0x8b,0x7c,0x1b,0xff,
233                 0x00,0x89,0x5e,0xf1,0xbf,0xc5,0xef,0xf5,0x47,0x03,0xe1,0x75,
234                 0x5a,0x9e,0x1e,0xf0,0x5d,0x5f,0xf8,0x88,0x7e,0x1f,0xe1,0x31,
235                 0x1c,0x27,0x9f,0xff,0x00,0xac,0xdc,0x07,0xc3,0x5c,0x31,0xc5,
236                 0xfc,0x99,0x6e,0x2f,0x1d,0x5b,0x25,0xfe,0xdf,0xfe,0xc0,0xcd,
237                 0x73,0x0c,0xc3,0x39,0xca,0xb3,0x0c,0x6d,0x7f,0xe4,0xff,0x00,
238                 0x1a,0x3e,0x99,0x9e,0x09,0x78,0x1b,0xe2,0x87,0x17,0xf8,0x79,
239                 0xc7,0x9c,0x47,0xfd,0x91,0x9f,0xd0,0xcc,0x28,0x71,0x85,0x1c,
240                 0x9b,0xfb,0x23,0x8b,0x73,0x0f,0xec,0x5e,0x18,0xf1,0x43,0x2f,
241                 0xc1,0xf8,0xa1,0xc0,0xb9,0x27,0xf6,0x8e,0x4d,0xc2,0xd9,0xb6,
242                 0x0b,0x32,0xfe,0xc7,0xe0,0x8e,0x31,0xe1,0xdc,0xb7,0xfb,0x4a,
243                 0x78,0xd7,0x98,0x66,0x1f,0x55,0xfa,0xe6,0x71,0x86,0xcb,0xf3,
244                 0x7a,0xf8,0xec,0xbf,0x0a,0x7e,0xd2,0x3f,0xf2,0x60,0xff,0x00,
245                 0xf0,0x73,0x97,0xfd,0xe1,0x77,0xff,0x00,0x57,0x3e,0x85,0x5f,
246                 0x9f,0x74,0x51,0x5f,0xe6,0xbf,0xd2,0x37,0xfe,0x4f,0x67,0x88,
247                 0x3f,0xf6,0x36,0xc3,0x7f,0xea,0xab,0x2f,0x3f,0xed,0xab,0xf6,
248                 0x30,0xff,0x00,0xca,0xb0,0x7e,0x88,0x3f,0xf6,0x6f,0xf3,0xaf,
249                 0xfd,0x6f,0xf8,0xbc,0xff,
250             }},
251             {VA_FOURCC_444P, {
252                 0xf8,0x8b,0xc3,0x7e,0x24,0xf1,0xf7,0xec,0x71,0xe3,0xef,0xd9,
253                 0x8f,0xc6,0x5e,0x0d,0xfd,0xa7,0x7f,0xe1,0x27,0xf0,0x3f,0x89,
254                 0xff,0x00,0xe1,0x74,0xff,0x00,0xc3,0xae,0x3f,0xe0,0xa8,0xff,
255                 0x00,0xf0,0xa5,0xb4,0x5d,0x17,0xfe,0x13,0x5f,0xec,0x5d,0x16,
256                 0x7d,0x2b,0xf6,0xda,0xff,0x00,0x8c,0x25,0xd5,0x60,0xf1,0x46,
257                 0xaf,0xe1,0xbf,0xf8,0x46,0xf5,0x7f,0x14,0x5d,0x7e,0xcf,0x1f,
258                 0xf1,0x90,0xf6,0xb6,0xff,0x00,0xdb,0x1f,0x67,0xff,0x00,0x85,
259                 0xb5,0xf0,0x93,0xcd,0xb5,0x96,0x39,0x2d,0xfc,0x9c,0xd3,0x2b,
260                 0xf1,0x8b,0xf6,0x60,0x78,0xc5,0xe2,0xc6,0x47,0x9e,0x78,0x4f,
261                 0xfe,0xbe,0xf8,0x47,0xc7,0xbf,0xea,0x27,0xfc,0x4d,0xbf,0xd1,
262                 0x23,0xfd,0x7b,0xe1,0x7e,0x16,0xff,0x00,0x88,0xa3,0xfe,0xab,
263                 0x70,0xbd,0x3c,0x67,0x80,0x9f,0xf1,0xbe,0xf0,0x75,0x38,0xff,
264                 0x00,0x89,0xb8,0x27,0xfd,0x49,0xe2,0x6e,0x3f,0xa3,0xe2,0x67,
265                 0xfc,0x6b,0x3a,0xd8,0x3f,0xf5,0x93,0xea,0x7f,0xea,0x67,0x19,
266                 0xfd,0x63,0x2f,0xc4,0x4a,0x38,0x2f,0xbe,0xf1,0x2b,0xc3,0x5e,
267                 0x28,0xfa,0x6d,0x71,0x46,0x37,0xe9,0x11,0xf4,0x77,0xc1,0x7f,
268                 0x6c,0xfe,0xd0,0xfc,0xe7,0xea,0xdf,0xf1,0x10,0xbc,0x3d,0xfa,
269                 0xce,0x5d,0x97,0x7f,0xc5,0x46,0xff,0x00,0xb3,0xb2,0xfc,0x07,
270                 0x03,0xf0,0x9f,0xfc,0x65,0x9c,0x71,0x8f,0xe1,0x4f,0x03,0xfe,
271                 0x88,0x5f,0xf1,0x28,0x5e,0x07,0x70,0xa6,0x77,0x9d,0xff,0x00,
272                 0xc2,0x26,0x49,0x4b,0xfe,0x23,0xf7,0xb2,0xfe,0xcd,0xcc,0xb9,
273                 0xf8,0xbe,0x78,0x4c,0x5e,0x27,0xd0,0x7f,0xe1,0x9b,0xbf,0x60,
274                 0x7f,0xfa,0x56,0x37,0xff,0x00,0x3b,0x45,0xf1,0x9f,0xff,0x00,
275                 0x97,0xb5,0xfb,0x67,0xfc,0x45,0x1f,0xd8,0xf3,0xff,0x00,0x4b,
276                 0x60,0xff,0x00,0xcf,0x14,0xfa,0x51,0x7f,0xf3,0xbc,0xff,0x00,
277                 0x30,0x7f,0xe2,0xa5,0x3f,0x46,0x0f,0xfa,0x2c,0xff,0x00,0xf3,
278                 0x5d,0xf1,0x0b,0xff,0x00,0xa0,0x40,0xfd,0xa4,0x7f,0xe4,0xc1,
279                 0xff,0x00,0xe0,0xe7,0x2f,0xfb,0xc2,0xef,0xfe,0xae,0x7d,0x0a,
280                 0x8f,0x0b,0xbf,0xe5,0x4f,0x3f,0xb2,0x7f,0xfe,0xf7,0xaf,0xff,
281                 0x00,0x62,0x8b,0x30,0x0f,0xd9,0xad,0xff,0x00,0x28,0xc1,0xc1,
282                 0x9f,0xf7,0x71,0x7f,0xeb,0xc2,0xe3,0xb3,0xf3,0xee,0xbf,0xc5,
283                 0x13,0xff,0x00,0x4f,0x83,0xff,
284             }},
285         });
286
287     /**
288      * Test Pattern 3
289      *
290      * R = red
291      * G = green
292      * B = blue
293      * W = white
294      * C = cyan
295      * M = magenta
296      * Y = yellow
297      * K = black
298      * -------------------
299      * K R B Y G C M K K W
300      * R K R B Y G C M W K
301      * B R K R B Y G C M K
302      * Y B R K R B Y G C M
303      * G Y B R K R B Y G C
304      * C G Y B R K R B Y G
305      * M C G Y B R K R B Y
306      * K M C G Y B R K R K
307      * K W M C G Y B R K R
308      * W K K M C G Y B R K
309      * -------------------
310      *
311      */
312     template<> const bool TestPatternData<3>::m_valid =
313         TestPatternData<3>::initialize<10, 10>({
314             0x00,0x4c,0x1d,0xe2,0x96,0xb3,0x69,0x00,0x00,0xfe,
315             0x4c,0x00,0x4c,0x1d,0xe2,0x96,0xb3,0x69,0xff,0x00,
316             0x1d,0x4c,0x00,0x4c,0x1d,0xe3,0x96,0xb3,0x69,0x00,
317             0xe2,0x1d,0x4c,0x00,0x4c,0x1d,0xe2,0x96,0xb3,0x68,
318             0x96,0xe2,0x1d,0x4c,0x00,0x4c,0x1d,0xe2,0x96,0xb3,
319             0xb3,0x96,0xe3,0x1d,0x4c,0x00,0x4c,0x1d,0xe2,0x96,
320             0x69,0xb3,0x96,0xe2,0x1d,0x4c,0x00,0x4c,0x1d,0xe2,
321             0x00,0x69,0xb3,0x96,0xe2,0x1d,0x4c,0x00,0x4c,0x1d,
322             0x00,0xff,0x69,0xb3,0x96,0xe2,0x1d,0x4c,0x00,0x4c,
323             0xff,0x00,0x00,0x68,0xb3,0x96,0xe2,0x1d,0x4c,0x00,
324
325             0x80,0x55,0xff,0x00,0x2c,0xab,0xd4,0x80,0x80,0x80,
326             0x55,0x80,0x54,0xff,0x00,0x2c,0xab,0xd4,0x80,0x80,
327             0xff,0x55,0x80,0x55,0xff,0x00,0x2c,0xab,0xd4,0x80,
328             0x00,0xff,0x55,0x80,0x55,0xff,0x00,0x2c,0xab,0xd4,
329             0x2c,0x00,0xff,0x55,0x80,0x55,0xff,0x00,0x2c,0xab,
330             0xab,0x2c,0x00,0xff,0x55,0x80,0x55,0xff,0x00,0x2c,
331             0xd4,0xab,0x2c,0x00,0xff,0x54,0x80,0x55,0xff,0x00,
332             0x80,0xd4,0xab,0x2c,0x00,0xff,0x55,0x80,0x55,0xff,
333             0x80,0x80,0xd4,0xab,0x2c,0x00,0xff,0x55,0x81,0x54,
334             0x80,0x80,0x80,0xd4,0xab,0x2c,0x00,0xff,0x55,0x80,
335
336             0x80,0xff,0x6b,0x95,0x15,0x00,0xeb,0x80,0x80,0x80,
337             0xff,0x80,0xff,0x6b,0x95,0x15,0x00,0xeb,0x80,0x80,
338             0x6b,0xff,0x80,0xff,0x6b,0x95,0x15,0x00,0xeb,0x80,
339             0x95,0x6b,0xff,0x80,0xff,0x6b,0x95,0x15,0x00,0xeb,
340             0x15,0x95,0x6b,0xff,0x80,0xff,0x6b,0x95,0x16,0x00,
341             0x00,0x15,0x95,0x6b,0xff,0x80,0xff,0x6b,0x95,0x15,
342             0xeb,0x00,0x15,0x95,0x6b,0xff,0x80,0xff,0x6b,0x95,
343             0x80,0xeb,0x00,0x15,0x95,0x6b,0xff,0x80,0xff,0x6b,
344             0x80,0x80,0xeb,0x00,0x15,0x95,0x6b,0xff,0x7f,0xff,
345             0x80,0x80,0x80,0xeb,0x00,0x14,0x95,0x6b,0xff,0x80,
346         },{
347             {VA_FOURCC_IMC3, {
348                 0xf8,0x6f,0xf7,0x5f,0xb0,0x2c,0x5f,0xf2,0xc3,0xf6,0xa8,0xff,
349                 0x00,0x82,0x4e,0x7e,0xd5,0x10,0x7f,0xd4,0x03,0xc4,0x96,0x9e,
350                 0x15,0xb4,0xf1,0x26,0x81,0xff,0x00,0x72,0xe7,0x83,0xac,0x3c,
351                 0x5f,0x61,0xe0,0xef,0x0e,0x7f,0xd4,0x91,0xf0,0xe7,0xe3,0x27,
352                 0xc3,0x9f,0x04,0x7f,0xcd,0x2b,0x83,0xe1,0x5f,0xfc,0x6b,0x77,
353                 0xe9,0xdb,0xdf,0x87,0x16,0xba,0xed,0xed,0xde,0xb7,0xf0,0xeb,
354                 0xfe,0x0e,0x06,0xfd,0xa3,0x7e,0x0b,0xfc,0x3e,0xd6,0x2e,0xae,
355                 0x35,0x5f,0x02,0xfc,0x1d,0xf8,0x73,0xff,0x00,0x05,0x0e,0xf8,
356                 0x3d,0xf0,0x03,0xe1,0xef,0xc2,0x7f,0x06,0xea,0x12,0xbd,0xdf,
357                 0x86,0x3e,0x1a,0x78,0x13,0xe0,0x3c,0x9f,0x18,0xbe,0x10,0x49,
358                 0xf0,0x4f,0xc1,0xbe,0x04,0xd1,0x26,0xb1,0xf0,0xb7,0x86,0x3e,
359                 0x11,0xc9,0xf0,0x9b,0xe1,0x7b,0xfc,0x37,0xd1,0x34,0xab,0x1f,
360                 0x06,0xb7,0xc3,0xbf,0x04,0xb6,0x8c,0x7c,0x35,0xa6,0x1f,0x0e,
361                 0x6f,0x6f,0x35,0xcb,0x7f,0xf8,0x38,0x1f,0xe1,0xd6,0xb7,0x77,
362                 0x75,0xac,0x7c,0x3e,0xf8,0x2f,0xfb,0x47,0x7f,0xc1,0x43,0xfe,
363                 0x1c,0xfc,0x1d,0xf0,0x2e,0xab,0x71,0x2e,0xa1,0xe0,0xdf,0x84,
364                 0xff,0x00,0x0f,0x7f,0x67,0xff,0x00,0x83,0xff,0x00,0x18,0xa4,
365                 0xf8,0x0f,0xe0,0x4f,0x86,0x9e,0x18,0xbb,0x79,0xb4,0x4f,0x02,
366                 0x78,0x37,0xe0,0x9c,0x9f,0x08,0x3e,0x13,0x49,0xf0,0x8f,0xc2,
367                 0xfe,0x16,0xb1,0xd2,0xb4,0x4f,0x86,0xef,0xf0,0xbb,0xe1,0xdb,
368                 0x78,0x36,0xc7,0x46,0x6f,0x04,0xf8,0x68,0xe9,0x9f,0xc6,0x5f,
369                 0xc4,0xff,0x00,0x89,0xff,0x00,0x12,0xfc,0x35,0xf1,0x2f,0xe2,
370                 0x1f,0x87,0x7c,0x39,0xf1,0x0f,0xc7,0x3a,0x07,0x87,0xf4,0x0f,
371                 0x1c,0xf8,0xb7,0x45,0xd0,0xb4,0x2d,0x17,0xc5,0xba,0xfe,0x95,
372                 0xa3,0x68,0xba,0x36,0x95,0xaf,0xea,0x16,0x3a,0x5e,0x93,0xa4,
373                 0xe9,0x76,0x3a,0x84,0x16,0x5a,0x6e,0x99,0xa6,0xd8,0xc1,0x05,
374                 0x9d,0x85,0x85,0x9c,0x10,0xda,0xd9,0xda,0xc3,0x15,0xbd,0xbc,
375                 0x51,0xc3,0x1a,0x22,0xfc,0xb6,0x75,0xc4,0x99,0x8f,0x86,0xf9,
376                 0x9e,0x73,0x97,0xe5,0x98,0xaa,0x98,0xca,0x54,0xf3,0x7c,0xa3,
377                 0x09,0x56,0x38,0xdc,0xab,0x83,0x31,0xb8,0x6c,0xc3,0xeb,0xfe,
378                 0x17,0xf8,0x5d,0xc7,0x59,0x66,0x6d,0x8e,0xcb,0x33,0x8e,0x10,
379                 0xcd,0xf2,0x9c,0x17,0x11,0xe0,0x38,0x6f,0x8e,0xf2,0x3e,0x0b,
380                 0xcc,0xf3,0x4e,0x13,0xc0,0xf0,0xb6,0x17,0x3e,0xa7,0xc2,0x94,
381                 0xaa,0x57,0xca,0xf0,0x9c,0x1f,0x80,0xf0,0xc7,0xc3,0xef,0x09,
382                 0xff,0x00,0x64,0xf0,0xa3,0xc1,0xbe,0x25,0xfa,0x4e,0x55,0xf1,
383                 0x17,0x1d,0x97,0xf8,0xc1,0xc4,0x5e,0x10,0x78,0x8d,0xe1,0xdf,
384                 0x17,0x70,0xf7,0x08,0xf1,0xcf,0x1f,0xf0,0xdf,0x00,0x78,0x33,
385                 0xc6,0xf4,0xfc,0x6a,0xc3,0x66,0x7e,0x1a,0x70,0x3f,0x19,0x70,
386                 0xcf,0x15,0x71,0x8f,0x04,0x78,0xa7,0xe1,0xdf,0x19,0x70,0x76,
387                 0x43,0xe2,0x4e,0x53,0xc3,0xfc,0x49,0x95,0xf0,0x8f,0x16,0x71,
388                 0xc7,0x04,0x65,0x9c,0x3d,0x8a,0xf1,0x02,0x3c,0x37,0x97,0x63,
389                 0x73,0x0c,0x0e,0x55,0x93,0xe0,0xf8,0x77,0x85,0x78,0x6b,0xff,
390             }},
391             {VA_FOURCC_422H, {
392                 0xf8,0x6f,0xf7,0x5f,0xb0,0x2c,0x5f,0xf2,0xc3,0xf6,0xa8,0xff,
393                 0x00,0x82,0x4e,0x7e,0xd5,0x10,0x7f,0xd4,0x03,0xc4,0x96,0x9e,
394                 0x15,0xb4,0xf1,0x26,0x81,0xff,0x00,0x72,0xe7,0x83,0xac,0x3c,
395                 0x5f,0x61,0xe0,0xef,0x0e,0x7f,0xd4,0x91,0xf0,0xe7,0xe3,0x27,
396                 0xc3,0x9f,0x04,0x7f,0xcd,0x2b,0x83,0xe1,0x5f,0xfc,0x6b,0x77,
397                 0xe9,0xdb,0xdf,0x87,0x16,0xba,0xed,0xed,0xde,0xb7,0xf0,0xeb,
398                 0xfe,0x0e,0x06,0xfd,0xa3,0x7e,0x0b,0xfc,0x3e,0xd6,0x2e,0xae,
399                 0x35,0x5f,0x02,0xfc,0x1d,0xf8,0x73,0xff,0x00,0x05,0x0e,0xf8,
400                 0x3d,0xf0,0x03,0xe1,0xef,0xc2,0x7f,0x06,0xea,0x12,0xbd,0xdf,
401                 0x86,0x3e,0x1a,0x78,0x13,0xe0,0x3c,0x9f,0x18,0xbe,0x10,0x49,
402                 0xf0,0x4f,0xc1,0xbe,0x04,0xd1,0x26,0xb1,0xf0,0xb7,0x86,0x3e,
403                 0x11,0xc9,0xf0,0x9b,0xe1,0x7b,0xfc,0x37,0xd1,0x34,0xab,0x1f,
404                 0x06,0xb7,0xc3,0xbf,0x04,0xb6,0x8c,0x7c,0x35,0xa6,0x73,0x70,
405                 0x9e,0x7d,0x9a,0x70,0xfc,0xf3,0x5c,0xb7,0x3b,0xfa,0x2c,0xfd,
406                 0x2c,0x7c,0x7b,0xc2,0xe2,0x31,0xb5,0x6a,0x67,0x7e,0x1e,0xfd,
407                 0x0b,0x7c,0x3f,0xcf,0xbc,0x62,0xe3,0x4f,0x07,0xbc,0x47,0xe1,
408                 0x7e,0x5f,0x0d,0xf8,0xc1,0xe6,0x59,0x65,0x3c,0x8b,0x88,0x33,
409                 0x7c,0x67,0x83,0xb9,0xfd,0x3e,0x09,0xca,0xb8,0x33,0x82,0xf8,
410                 0x9f,0x0d,0xc3,0x58,0x2c,0x06,0x6d,0x9a,0xf8,0x4d,0x8c,0xf1,
411                 0x83,0x34,0xcc,0x9e,0x27,0xe9,0x23,0x93,0xcf,0x36,0xf2,0x3c,
412                 0x57,0xe3,0xde,0x28,0xc0,0x61,0x32,0x4f,0xa4,0x8f,0x00,0x7d,
413                 0x1a,0xb1,0x1e,0x30,0xe4,0x9e,0x3b,0xd6,0xc4,0xe0,0x3c,0x6d,
414                 0xf0,0x8b,0x2f,0xfa,0x48,0xf8,0x5f,0xf4,0x68,0xcd,0x7c,0x0f,
415                 0xfa,0x56,0x78,0x61,0x4a,0x87,0x87,0xbe,0x29,0x4f,0x1d,0xc4,
416                 0xfc,0x4d,0xe1,0xbf,0x8b,0x1c,0x25,0x9f,0xe7,0x1c,0x4f,0x84,
417                 0xe1,0xac,0xaf,0x84,0xf8,0xbb,0x21,0xc4,0xe2,0x71,0x1c,0x41,
418                 0xf5,0x9f,0x0a,0xb8,0x77,0x34,0xe1,0xfc,0xc3,0x0f,0x96,0x50,
419                 0xe2,0x88,0x66,0x87,0xc3,0x9b,0xdb,0xcd,0x72,0xdf,0xfe,0x0e,
420                 0x07,0xf8,0x75,0xad,0xdd,0xdd,0x6b,0x1f,0x0f,0xbe,0x0b,0xfe,
421                 0xd1,0xdf,0xf0,0x50,0xff,0x00,0x87,0x3f,0x07,0x7c,0x0b,0xaa,
422                 0xdc,0x4b,0xa8,0x78,0x37,0xe1,0x3f,0xc3,0xdf,0xd9,0xff,0x00,
423                 0xe0,0xff,0x00,0xc6,0x29,0x3e,0x03,0xf8,0x13,0xe1,0xa7,0x86,
424                 0x2e,0xde,0x6d,0x13,0xc0,0x9e,0x0d,0xf8,0x27,0x27,0xc2,0x0f,
425                 0x84,0xd2,0x7c,0x23,0xf0,0xbf,0x85,0xac,0x74,0xad,0x13,0xe1,
426                 0xbb,0xfc,0x2e,0xf8,0x76,0xde,0x0d,0xb1,0xd1,0x9b,0xc1,0x3e,
427                 0x1a,0x3a,0x67,0xf1,0x97,0xf1,0x3f,0xe2,0x7f,0xc4,0xbf,0x0d,
428                 0x7c,0x4b,0xf8,0x87,0xe1,0xdf,0x0e,0x7c,0x43,0xf1,0xce,0x81,
429                 0xe1,0xfd,0x03,0xc7,0x3e,0x2d,0xd1,0x74,0x2d,0x0b,0x45,0xf1,
430                 0x6e,0xbf,0xa5,0x68,0xda,0x2e,0x8d,0xa5,0x6b,0xfa,0x85,0x8e,
431                 0x97,0xa4,0xe9,0x3a,0x5d,0x8e,0xa1,0x05,0x96,0x9b,0xa6,0x69,
432                 0xb6,0x30,0x41,0x67,0x61,0x61,0x67,0x04,0x36,0xb6,0x76,0xb0,
433                 0xc5,0x6f,0x6f,0x14,0x70,0xc6,0x88,0xbc,0x9c,0x6b,0x92,0xe4,
434                 0xf9,0xa7,0x1c,0x62,0x30,0xd9,0x9e,0x53,0x96,0x66,0x38,0x6c,
435                 0x56,0x4f,0xc2,0xd9,0xd6,0x2b,0x0f,0x8e,0xc0,0x61,0x71,0x74,
436                 0x31,0x39,0xc4,0x3c,0x21,0xf0,0x57,0x87,0xe1,0x9b,0x57,0xa5,
437                 0x88,0xa5,0x52,0x9d,0x6c,0xce,0x19,0x0e,0x4d,0x93,0xe4,0x90,
438                 0xc7,0xd4,0x8c,0xb1,0x51,0xca,0x32,0xac,0xb7,0x2d,0x55,0x56,
439                 0x0b,0x03,0x85,0xa3,0x4b,0xf4,0xdf,0x06,0xbc,0x4d,0xf1,0x27,
440                 0xc3,0x5c,0x6f,0xd2,0xfa,0xa7,0x87,0x3e,0x21,0x71,0xc7,0x00,
441                 0x54,0xc1,0xf8,0xeb,0xf4,0x65,0xc0,0x61,0x27,0xc1,0x5c,0x59,
442                 0x9f,0x70,0xac,0xf0,0xb8,0x1e,0x25,0xfa,0x0c,0xf8,0x3f,0xc4,
443                 0xdc,0x47,0x82,0xc3,0xcb,0x22,0xc7,0xe0,0x25,0x43,0x09,0x9f,
444                 0xf1,0x25,0x38,0x71,0x06,0x77,0x86,0xa4,0xe3,0x47,0x35,0xcf,
445                 0x21,0x0c,0xdb,0x1d,0x0a,0xf8,0xf8,0xac,0x42,0xff,
446             }},
447             {VA_FOURCC_422V, {
448                 0xf8,0x6f,0xf7,0x5f,0xb0,0x2c,0x5f,0xf2,0xc3,0xf6,0xa8,0xff,
449                 0x00,0x82,0x4e,0x7e,0xd5,0x10,0x7f,0xd4,0x03,0xc4,0x96,0x9e,
450                 0x15,0xb4,0xf1,0x26,0x81,0xff,0x00,0x72,0xe7,0x83,0xac,0x3c,
451                 0x5f,0x61,0xe0,0xef,0x0e,0x7f,0xd4,0x91,0xf0,0xe7,0xe3,0x27,
452                 0xc3,0x9f,0x04,0x7f,0xcd,0x2b,0x83,0xe1,0x5f,0xfc,0x6b,0x77,
453                 0xe9,0xdf,0x87,0x37,0xb7,0x9a,0xe5,0xbf,0xfc,0x1c,0x0f,0xf0,
454                 0xeb,0x5b,0xbb,0xba,0xd6,0x3e,0x1f,0x7c,0x17,0xfd,0xa3,0xbf,
455                 0xe0,0xa1,0xff,0x00,0x0e,0x7e,0x0e,0xf8,0x17,0x55,0xb8,0x97,
456                 0x50,0xf0,0x6f,0xc2,0x7f,0x87,0xbf,0xb3,0xff,0x00,0xc1,0xff,
457                 0x00,0x8c,0x52,0x7c,0x07,0xf0,0x27,0xc3,0x4f,0x0c,0x5d,0xbc,
458                 0xda,0x27,0x81,0x3c,0x1b,0xf0,0x4e,0x4f,0x84,0x1f,0x09,0xa4,
459                 0xf8,0x47,0xe1,0x7f,0x0b,0x58,0xe9,0x5a,0x27,0xc3,0x77,0xf8,
460                 0x5d,0xf0,0xed,0xbc,0x1b,0x63,0xa3,0x37,0x82,0x7c,0x34,0x74,
461                 0xce,0x0e,0x29,0xe1,0xcf,0xf5,0x4f,0x8a,0xbe,0x8b,0xf3,0xc1,
462                 0x66,0x99,0x86,0x2b,0xfe,0x23,0xaf,0x1e,0x71,0xb7,0x86,0x1e,
463                 0x1f,0xe7,0xde,0xd3,0xfd,0x59,0xf1,0x03,0xc1,0xff,0x00,0xf5,
464                 0x7b,0x28,0xcd,0xf8,0xdf,0x88,0x17,0xfa,0xe7,0xe1,0xcb,0xe0,
465                 0x6f,0xf5,0x83,0x81,0x33,0xff,0x00,0xec,0x4c,0x06,0x59,0xff,
466                 0x00,0x10,0xfb,0x83,0x72,0x6f,0x09,0x7f,0xd6,0x29,0x52,0xfa,
467                 0xf7,0x8e,0xbc,0x4f,0xe3,0xc7,0xb6,0xc6,0x60,0xf1,0x77,0x98,
468                 0x71,0xef,0xfa,0xc9,0xe3,0x27,0xd1,0xcf,0xe8,0xfb,0xe3,0xee,
469                 0x53,0x1f,0x1b,0xff,0x00,0xe2,0x2c,0xf0,0xbf,0x1b,0xf1,0x3f,
470                 0x84,0xde,0x3c,0x7d,0x77,0xfe,0x21,0x5f,0xd2,0x63,0xc1,0x0f,
471                 0xf5,0x37,0x39,0xc9,0xfc,0x30,0x55,0xbf,0xe2,0x2c,0xf8,0x6b,
472                 0x84,0xc9,0x3f,0xd6,0x9e,0x28,0xcc,0x7f,0xd6,0x2c,0xfb,0x3a,
473                 0xff,0x00,0x5a,0x38,0x57,0x87,0x7c,0x28,0xfa,0xac,0x33,0x0f,
474                 0xec,0xaa,0x99,0x46,0x37,0x92,0xb6,0x63,0x89,0x2f,0x7e,0x1c,
475                 0x5a,0xeb,0xb7,0xb7,0x7a,0xdf,0xc3,0xaf,0xf8,0x38,0x1b,0xf6,
476                 0x8d,0xf8,0x2f,0xf0,0xfb,0x58,0xba,0xb8,0xd5,0x7c,0x0b,0xf0,
477                 0x77,0xe1,0xcf,0xfc,0x14,0x3b,0xe0,0xf7,0xc0,0x0f,0x87,0xbf,
478                 0x09,0xfc,0x1b,0xa8,0x4a,0xf7,0x7e,0x18,0xf8,0x69,0xe0,0x4f,
479                 0x80,0xf2,0x7c,0x62,0xf8,0x41,0x27,0xc1,0x3f,0x06,0xf8,0x13,
480                 0x44,0x9a,0xc7,0xc2,0xde,0x18,0xf8,0x47,0x27,0xc2,0x6f,0x85,
481                 0xef,0xf0,0xdf,0x44,0xd2,0xac,0x7c,0x1a,0xdf,0x0e,0xfc,0x12,
482                 0xda,0x31,0xf0,0xd6,0x99,0xfc,0x65,0xfc,0x4f,0xf8,0x9f,0xf1,
483                 0x2f,0xc3,0x5f,0x12,0xfe,0x21,0xf8,0x77,0xc3,0x9f,0x10,0xfc,
484                 0x73,0xa0,0x78,0x7f,0x40,0xf1,0xcf,0x8b,0x74,0x5d,0x0b,0x42,
485                 0xd1,0x7c,0x5b,0xaf,0xe9,0x5a,0x36,0x8b,0xa3,0x69,0x5a,0xfe,
486                 0xa1,0x63,0xa5,0xe9,0x3a,0x4e,0x97,0x63,0xa8,0x41,0x65,0xa6,
487                 0xe9,0x9a,0x6d,0x8c,0x10,0x59,0xd8,0x58,0x59,0xc1,0x0d,0xad,
488                 0x9d,0xac,0x31,0x5b,0xdb,0xc5,0x1c,0x31,0xa2,0x2f,0xc6,0xd3,
489                 0xf1,0xab,0x88,0xa9,0x53,0x85,0x26,0xb0,0xd8,0xe7,0x4a,0x11,
490                 0xa6,0xf1,0xb9,0x97,0x08,0x78,0x32,0xb3,0x1c,0x63,0x84,0x54,
491                 0x7e,0xb5,0x98,0x2c,0x8f,0xc2,0x1c,0x83,0x24,0x58,0xdc,0x45,
492                 0xbd,0xae,0x29,0x64,0xf9,0x16,0x4b,0x95,0x2a,0xf3,0xa9,0xfd,
493                 0x9f,0x94,0xe5,0xd8,0x4f,0x63,0x83,0xa3,0xfd,0x8b,0x8b,0xfd,
494                 0x9f,0x3e,0x25,0x7d,0x6f,0x15,0xfd,0x8d,0xf4,0xd5,0xf1,0x17,
495                 0x29,0xc9,0xfe,0xb1,0x5b,0xfb,0x2b,0x2a,0xaf,0xf4,0x74,0xfa,
496                 0x1a,0x67,0xd5,0xf2,0xcc,0xb7,0xda,0x4b,0xea,0x39,0x7d,0x6c,
497                 0xf3,0x3a,0xf0,0x0b,0x17,0x9c,0xe7,0x35,0x70,0x58,0x5f,0x65,
498                 0x86,0xa9,0x9a,0xe6,0xd8,0xbc,0x56,0x67,0x98,0xce,0x9b,0xc6,
499                 0x63,0xf1,0x15,0xb1,0x55,0xaa,0xd4,0x97,0xff,
500             }},
501             {VA_FOURCC_411P, {
502                 0xf8,0x6f,0xf7,0x5f,0xb0,0x2c,0x5f,0xf2,0xc3,0xf6,0xa8,0xff,
503                 0x00,0x82,0x4e,0x7e,0xd5,0x10,0x7f,0xd4,0x03,0xc4,0x96,0x9e,
504                 0x15,0xb4,0xf1,0x26,0x81,0xff,0x00,0x72,0xe7,0x83,0xac,0x3c,
505                 0x5f,0x61,0xe0,0xef,0x0e,0x7f,0xd4,0x91,0xf0,0xe7,0xe3,0x27,
506                 0xc3,0x9f,0x04,0x7f,0xcd,0x2b,0x83,0xe1,0x5f,0xfc,0x6b,0x77,
507                 0xe9,0xdb,0xdf,0x87,0x16,0xba,0xed,0xed,0xde,0xb7,0xf0,0xeb,
508                 0xfe,0x0e,0x06,0xfd,0xa3,0x7e,0x0b,0xfc,0x3e,0xd6,0x2e,0xae,
509                 0x35,0x5f,0x02,0xfc,0x1d,0xf8,0x73,0xff,0x00,0x05,0x0e,0xf8,
510                 0x3d,0xf0,0x03,0xe1,0xf7,0xc2,0x7f,0x07,0x6a,0x12,0xbd,0xdf,
511                 0x86,0x3e,0x1a,0x78,0x13,0xe0,0x3c,0x9f,0x18,0xbe,0x10,0x49,
512                 0xf0,0x4f,0xc1,0xbe,0x04,0xd1,0x26,0xb1,0xf0,0xb7,0x86,0x3e,
513                 0x11,0xc9,0xf0,0x9b,0xe1,0x7b,0xfc,0x37,0xd1,0x34,0xab,0x1f,
514                 0x06,0xb7,0xc3,0xbf,0x04,0xb6,0x8c,0x7c,0x35,0xa6,0x14,0x57,
515                 0xa3,0xc3,0xfc,0x53,0x1c,0x0e,0x55,0x86,0xc2,0xe7,0x7f,0x40,
516                 0x6f,0xda,0x85,0xe3,0x4e,0x3e,0x0e,0xbd,0x59,0xf8,0x8b,0xf4,
517                 0x50,0xfa,0x3c,0x71,0x67,0x8a,0x3e,0x0b,0xe6,0xd4,0xf1,0x98,
518                 0x8a,0xb8,0xea,0x59,0x5e,0x45,0xc4,0x58,0x2e,0x01,0xe2,0x4f,
519                 0xab,0x66,0x9c,0x23,0x1c,0x4f,0xfa,0x9d,0xc4,0x19,0x26,0x2b,
520                 0x1d,0x87,0xc4,0xe5,0xb9,0xb6,0x41,0x89,0x4b,0x2d,0xc0,0xe1,
521                 0x6b,0x61,0xa8,0xaf,0xcc,0xfc,0x42,0xf1,0xaf,0x8d,0xf8,0x43,
522                 0x8a,0xf3,0x0a,0x79,0x37,0xd0,0x7b,0x3a,0xf1,0x7b,0x22,0xe2,
523                 0xea,0x78,0x1f,0x14,0x32,0x6e,0x38,0xcb,0x7e,0x9f,0x1e,0x02,
524                 0x78,0x07,0x4f,0x11,0x85,0xf1,0x63,0x05,0x43,0xc4,0x7c,0x57,
525                 0x0e,0xd7,0xf0,0xdb,0x8b,0xfc,0x03,0xf1,0x03,0x1f,0x96,0x62,
526                 0x38,0x17,0x37,0xe2,0x7c,0xcb,0x81,0xbe,0xbd,0x83,0xe2,0x9c,
527                 0xcb,0x2e,0xcd,0x68,0x70,0xe5,0x0c,0x6c,0x2a,0xcf,0x1b,0x53,
528                 0x1d,0x56,0xaa,0xfc,0x39,0xbd,0xbc,0xd7,0x2d,0xbf,0xe0,0xe0,
529                 0x7f,0x87,0x5a,0xdd,0xdd,0xd6,0xb1,0xf0,0xfb,0xe0,0xbf,0xed,
530                 0x1d,0xff,0x00,0x05,0x0f,0xf8,0x73,0xf0,0x77,0xc0,0xba,0xa4,
531                 0xf2,0xea,0x1e,0x0d,0xf8,0x4f,0xf0,0xf7,0xe0,0x07,0xc1,0xff,
532                 0x00,0x8c,0x52,0x7c,0x07,0xf0,0x27,0xc3,0x4f,0x0c,0x5d,0xbc,
533                 0xda,0x27,0x81,0x3c,0x1b,0xf0,0x4e,0x4f,0x84,0x1f,0x09,0x9f,
534                 0xe1,0x1f,0x86,0x3c,0x2d,0x63,0xa5,0x68,0x9f,0x0d,0xdf,0xe1,
535                 0x7f,0xc3,0xb6,0xf0,0x6d,0x8e,0x8c,0xde,0x09,0xf0,0xd1,0xd3,
536                 0x3f,0x8c,0xaf,0x89,0xff,0x00,0x13,0xfe,0x25,0x78,0x6b,0xe2,
537                 0x57,0xc4,0x3f,0x0e,0xf8,0x77,0xe2,0x1f,0x8e,0x74,0x0f,0x0f,
538                 0xe8,0x1e,0x39,0xf1,0x6e,0x8b,0xa1,0x68,0x5a,0x2f,0x8b,0x75,
539                 0xfd,0x2b,0x46,0xd1,0x74,0x6d,0x2b,0x5f,0xd4,0x2c,0x74,0xbd,
540                 0x27,0x49,0xd2,0xec,0x75,0x08,0x2c,0xb4,0xdd,0x33,0x4d,0xb2,
541                 0x82,0x0b,0x3b,0x0b,0x0b,0x38,0x21,0xb5,0xb3,0xb5,0x86,0x2b,
542                 0x7b,0x78,0xa3,0x86,0x34,0x40,0x51,0x5f,0x1f,0x9b,0xf0,0xa7,
543                 0x0b,0xe6,0x9c,0x4b,0xc5,0xd8,0xcc,0xcf,0x86,0xf2,0x0c,0xc7,
544                 0x17,0x57,0x8a,0xf3,0xe9,0x54,0xc5,0x63,0xf2,0x7c,0xbb,0x17,
545                 0x89,0xa9,0x29,0xe3,0xaa,0x55,0x9c,0xa7,0x5f,0x11,0x86,0xa9,
546                 0x56,0x6e,0x75,0x6a,0x54,0xa9,0x27,0x29,0x37,0x2a,0x95,0x27,
547                 0x37,0x79,0x4a,0x4d,0xff,0x00,0x53,0xf0,0x6f,0x8f,0xfe,0x3b,
548                 0xf0,0x1f,0x0b,0xd1,0xe1,0xbe,0x07,0xf1,0xaf,0xc5,0xbe,0x0c,
549                 0xe1,0xdc,0x0f,0x19,0x78,0xd3,0x47,0x05,0x90,0xf0,0xa7,0x89,
550                 0x1c,0x63,0xc3,0xb9,0x2e,0x0e,0x96,0x17,0xc7,0xbf,0x14,0xf0,
551                 0x18,0x6a,0x58,0x5c,0xaf,0x28,0xce,0x70,0x78,0x1c,0x3d,0x3c,
552                 0x3e,0x07,0x07,0x84,0xc1,0x50,0x85,0x2a,0x10,0x8d,0x2c,0x26,
553                 0x17,0x0d,0x86,0xa6,0xa3,0x46,0x85,0x28,0x47,0xff,
554             }},
555             {VA_FOURCC_444P, {
556                 0xf8,0x6f,0xf7,0x5f,0xb0,0x2c,0x5f,0xf2,0xc3,0xf6,0xa8,0xff,
557                 0x00,0x82,0x4e,0x7e,0xd5,0x10,0x7f,0xd4,0x03,0xc4,0x96,0x9e,
558                 0x15,0xb4,0xf1,0x26,0x81,0xff,0x00,0x72,0xe7,0x83,0xac,0x3c,
559                 0x5f,0x61,0xe0,0xef,0x0e,0x7f,0xd4,0x91,0xf0,0xe7,0xe3,0x27,
560                 0xc3,0x9f,0x04,0x7f,0xcd,0x2b,0x83,0xe1,0x5f,0xfc,0x6b,0x77,
561                 0xe2,0x3f,0xe3,0x32,0xcb,0x38,0xcb,0xfe,0x69,0xff,0x00,0x02,
562                 0x7e,0x93,0xfe,0x04,0xf0,0xff,0x00,0xfd,0x54,0xbe,0x25,0x78,
563                 0x5f,0x97,0x78,0x5f,0xe2,0x57,0x12,0xff,0x00,0xdd,0xd5,0xc6,
564                 0xbf,0x49,0xaf,0xd9,0x45,0xf4,0x9a,0xe3,0x5e,0x29,0xff,0x00,
565                 0xaa,0xef,0xc7,0x2f,0xa2,0x17,0x8e,0x5c,0x77,0xff,0x00,0x35,
566                 0x6f,0x8e,0x9c,0x5b,0xff,0x00,0x1f,0x61,0xfd,0x13,0xfe,0x10,
567                 0x3e,0x9f,0xf9,0x07,0xfc,0xbe,0xfa,0x26,0x7e,0xd2,0x2f,0xa2,
568                 0x65,0x6f,0xfa,0xa0,0x56,0x6f,0xc0,0xf9,0xba,0xe0,0x1f,0xfc,
569                 0x54,0x3e,0x23,0x78,0x07,0xe2,0x37,0x84,0x3f,0xf6,0x1f,0xf4,
570                 0x65,0xf1,0x6f,0xe8,0xcb,0x8f,0xeb,0xf4,0x29,0x7f,0xf1,0xec,
571                 0x9f,0xa7,0x6f,0x7e,0x1c,0xdb,0x6b,0x97,0x97,0x7a,0xdf,0xc3,
572                 0xaf,0xf8,0x38,0x1f,0xf6,0x8e,0xf8,0x2f,0xf0,0xfb,0x58,0xba,
573                 0xb8,0xd5,0x7c,0x0b,0xf0,0x77,0xe1,0xcf,0xfc,0x14,0x3f,0xe0,
574                 0xff,0x00,0xec,0xff,0x00,0xf0,0xf7,0xe1,0x3f,0x83,0x75,0x09,
575                 0x5e,0xef,0xc3,0x1f,0x0d,0x3c,0x09,0xf0,0x1e,0x4f,0x8c,0x5f,
576                 0x08,0x24,0xf8,0x27,0xe0,0xdf,0x02,0x68,0x93,0x58,0xf8,0x5b,
577                 0xc3,0x1f,0x08,0xe4,0xf8,0x4d,0xf0,0xbd,0xfe,0x1b,0xe8,0x9a,
578                 0x55,0x8f,0x83,0x5b,0xe1,0xdf,0x82,0x5b,0x46,0x3e,0x1a,0xd3,
579                 0x3f,0x5c,0xa1,0xc7,0x78,0x5c,0x55,0x0a,0x38,0xac,0xd3,0xf6,
580                 0x5a,0xfe,0xd8,0x3a,0x99,0x9e,0x26,0x95,0x3c,0x46,0x63,0x53,
581                 0xc1,0x1f,0xa3,0xfe,0x6d,0xe3,0x67,0x83,0x15,0x31,0xd5,0xa1,
582                 0x1a,0x98,0xb9,0xf8,0x45,0xe3,0x37,0x07,0x70,0x27,0x18,0x70,
583                 0x8f,0x8b,0x9e,0x18,0x4f,0x11,0x2a,0x92,0xe0,0x1f,0x13,0xb8,
584                 0x57,0x8b,0xb8,0xa7,0x87,0x38,0xf7,0x85,0x1e,0x53,0xc5,0x59,
585                 0x1f,0x11,0xe7,0x79,0x66,0x6d,0x85,0xcc,0xf1,0x5f,0xc9,0x79,
586                 0xb7,0x8f,0x7e,0x37,0x70,0xae,0x6b,0x99,0xf0,0xbf,0x1c,0x7e,
587                 0xcd,0x6c,0x66,0x23,0x8d,0x78,0x6f,0x30,0xc6,0xe4,0x3c,0x61,
588                 0x5f,0x84,0xbf,0x69,0x1f,0x83,0xbe,0x15,0xf0,0xad,0x7e,0x28,
589                 0xc9,0xf1,0x35,0x32,0xfe,0x20,0xad,0xc3,0x3e,0x18,0x78,0xc3,
590                 0xf4,0x6d,0xe2,0xdf,0x16,0xfc,0x38,0xe1,0xfa,0x99,0xb6,0x1f,
591                 0x17,0x3c,0x9b,0x80,0xfc,0x52,0xe2,0xae,0x26,0xf1,0x1b,0x84,
592                 0x32,0xd9,0x61,0xb8,0x7b,0x8d,0xf8,0x83,0x39,0xe2,0x6c,0xbb,
593                 0x33,0xcc,0x71,0x27,0xc3,0x9b,0xdb,0xcd,0x72,0xdf,0xfe,0x0e,
594                 0x07,0xf8,0x75,0xad,0xdd,0xdd,0x6b,0x1f,0x0f,0xbe,0x0b,0xfe,
595                 0xd1,0xdf,0xf0,0x50,0xff,0x00,0x87,0x3f,0x07,0x7c,0x0b,0xaa,
596                 0xdc,0x4b,0xa8,0x78,0x37,0xe1,0x3f,0xc3,0xdf,0xd9,0xff,0x00,
597                 0xe0,0xff,0x00,0xc6,0x29,0x3e,0x03,0xf8,0x13,0xe1,0xa7,0x86,
598                 0x2e,0xde,0x6d,0x13,0xc0,0x9e,0x0d,0xf8,0x27,0x27,0xc2,0x0f,
599                 0x84,0xd2,0x7c,0x23,0xf0,0xbf,0x85,0xac,0x74,0xad,0x13,0xe1,
600                 0xbb,0xfc,0x2e,0xf8,0x76,0xde,0x0d,0xb1,0xd1,0x9b,0xc1,0x3e,
601                 0x1a,0x3a,0x61,0xc7,0x78,0x7a,0x18,0xbc,0x2f,0xec,0xb5,0xcd,
602                 0x31,0x54,0x69,0x62,0x73,0x3a,0x9f,0xb6,0x0f,0xe8,0xff,0x00,
603                 0xe0,0x8d,0x4c,0xc7,0x11,0x4e,0x15,0xb1,0xd5,0x3c,0x18,0xf1,
604                 0xb3,0x36,0xe0,0x4e,0x0e,0xf1,0x9b,0xc2,0x29,0xe2,0xea,0x46,
605                 0x58,0x89,0xf8,0x61,0xe2,0xe7,0x08,0xf1,0x87,0x17,0x70,0xaf,
606                 0x89,0xdc,0x03,0x2a,0x8f,0x85,0x38,0xf7,0x87,0x38,0xa7,0x88,
607                 0xf2,0x3e,0x2a,0xca,0x73,0x6c,0xb3,0x3b,0xcc,0xf0,0xb8,0xa3,
608                 0xc7,0xbc,0xdb,0x35,0xe1,0x5f,0x1b,0xbf,0x66,0xb7,0x1c,0x70,
609                 0xbe,0x67,0x98,0x70,0xdf,0x1a,0xe2,0x31,0x9f,0xb4,0x8f,0x84,
610                 0xab,0xf1,0x86,0x43,0x8d,0xc4,0xe4,0xfc,0x51,0x5f,0x85,0x7c,
611                 0x2b,0xf0,0x77,0xe8,0xdb,0xe3,0x0f,0x86,0x1c,0x33,0x5b,0x88,
612                 0x32,0xfa,0x98,0x7c,0xda,0xa7,0x0f,0xf8,0x71,0xe2,0xdf,0x16,
613                 0xf1,0x57,0x8a,0x5c,0x07,0x92,0xcf,0x17,0x2c,0xb7,0x84,0x3c,
614                 0x46,0xe2,0x6e,0x20,0xe3,0x7e,0x1e,0xc3,0x65,0xdc,0x4d,0x9c,
615                 0xe6,0x39,0x9e,0x27,0xf8,0xcb,0xf8,0x9f,0xf1,0x3f,0xe2,0x5f,
616                 0x86,0xbe,0x25,0xfc,0x43,0xf0,0xef,0x87,0x3e,0x21,0xf8,0xe7,
617                 0x40,0xf0,0xfe,0x81,0xe3,0x9f,0x16,0xe8,0xba,0x16,0x85,0xa2,
618                 0xf8,0xb7,0x5f,0xd2,0xb4,0x6d,0x17,0x46,0xd2,0xb5,0xfd,0x42,
619                 0xc7,0x4b,0xd2,0x74,0x9d,0x2e,0xc7,0x50,0x82,0xcb,0x4d,0xd3,
620                 0x34,0xdb,0x18,0x20,0xb3,0xb0,0xb0,0xb3,0x82,0x1b,0x5b,0x3b,
621                 0x58,0x62,0xb7,0xb7,0x8a,0x38,0x63,0x44,0x5f,0xc3,0xf8,0x4b,
622                 0x84,0xb8,0x57,0x35,0xe1,0x5e,0x19,0xcd,0x33,0x4e,0x19,0xe1,
623                 0xfc,0xcb,0x32,0xcc,0xb8,0x7f,0x26,0xc7,0xe6,0x39,0x8e,0x3f,
624                 0x26,0xcb,0x71,0x98,0xec,0x7e,0x3b,0x19,0x97,0x61,0xb1,0x18,
625                 0xbc,0x6e,0x37,0x17,0x88,0xc3,0x54,0xc4,0x62,0xb1,0x78,0xac,
626                 0x45,0x4a,0x95,0xf1,0x38,0x9a,0xf5,0x2a,0x56,0xaf,0x5a,0xa4,
627                 0xea,0xd5,0x9c,0xa7,0x29,0x49,0xff,0x00,0xa9,0xdf,0x48,0x4f,
628                 0xa4,0x27,0x8f,0xbc,0x05,0xe3,0xef,0x8e,0x1c,0x0b,0xc0,0xbe,
629                 0x38,0x78,0xbf,0xc1,0x7c,0x13,0xc1,0x7e,0x2f,0xf8,0x97,0xc2,
630                 0x7c,0x1d,0xc1,0xdc,0x27,0xe2,0x5f,0x1a,0x70,0xe7,0x0a,0xf0,
631                 0x9f,0x0a,0xf0,0xe7,0x1a,0x67,0x59,0x3f,0x0f,0x70,0xd7,0x0d,
632                 0x70,0xf6,0x4f,0x9d,0x60,0xf2,0x8c,0x8b,0x87,0xf2,0x2c,0xa3,
633                 0x07,0x84,0xca,0xf2,0x6c,0x9b,0x2b,0xc1,0xe1,0x72,0xec,0xaf,
634                 0x2e,0xc2,0xe1,0xb0,0x38,0x1c,0x35,0x0c,0x35,0x0a,0x54,0xa3,
635                 0xff,
636             }}
637         });
638
639     /**
640      * Test Pattern 4
641      *
642      * Solid Blue 150x75
643      *
644      */
645     template<> const bool TestPatternData<4>::m_valid =
646         TestPatternData<4>::initialize<150, 75>(
647
648             generateSolid({0x1d, 0xff, 0x6b}, {150, 75}),
649
650             {{VA_FOURCC_IMC3, {
651                 0xfe,0x39,0xe8,0xa2,0x8a,0xff,0x00,0xbf,0x83,0xf9,0x5c,0x28,
652                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
653                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
654                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
655                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
656                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
657                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
658                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
659                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
660                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
661                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
662                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
663                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
664                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
665                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
666                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
667                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
668                 0xa2,0x8a,0x00,0xff,
669             }},
670             {VA_FOURCC_422H, {
671                 0xfe,0x39,0xe8,0xaf,0xfb,0xf8,0x3f,0x95,0xc2,0x8a,0x00,0x28,
672                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
673                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
674                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
675                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
676                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
677                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
678                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
679                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
680                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
681                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
682                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
683                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
684                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
685                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
686                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
687                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
688                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
689                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
690                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
691                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
692                 0xa0,0x02,0x8a,0x00,0xff,
693             }},
694             {VA_FOURCC_422V, {
695                 0xfe,0x39,0xe8,0xaf,0xfb,0xf8,0x3f,0x95,0xc2,0x8a,0x00,0x28,
696                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
697                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
698                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
699                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
700                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
701                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
702                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
703                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
704                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
705                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
706                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
707                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
708                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
709                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
710                 0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,
711                 0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,
712                 0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,
713                 0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,
714                 0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,0x00,0x28,0xa0,0x02,0x8a,
715                 0x00,0x28,0xa0,0x0f,0xff,
716             }},
717             {VA_FOURCC_411P, {
718                 0xfe,0x39,0xe8,0xa2,0x8a,0xff,0x00,0xbf,0x83,0xf9,0x5c,0x28,
719                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
720                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
721                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
722                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
723                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
724                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
725                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
726                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
727                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
728                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
729                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
730                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
731                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
732                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
733                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
734                 0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,0xa2,0x8a,0x00,0x28,
735                 0xa2,0x8a,0x00,0xff,
736             }},
737             {VA_FOURCC_444P, {
738                 0xfe,0x39,0xeb,0xfe,0xfe,0x0f,0xe5,0x70,0xa0,0x02,0x80,0x0a,
739                 0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,
740                 0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,
741                 0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,
742                 0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,
743                 0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,
744                 0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,
745                 0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,
746                 0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,
747                 0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,
748                 0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,
749                 0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,
750                 0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,
751                 0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,
752                 0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,
753                 0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,
754                 0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,
755                 0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,
756                 0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,
757                 0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,
758                 0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,
759                 0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,
760                 0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,
761                 0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,
762                 0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,
763                 0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,
764                 0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,
765                 0x02,0x80,0x0a,0x00,0x28,0x00,0xa0,0x02,0x80,0x0a,0x00,0x28,
766                 0x00,0xa0,0x0f,0xff,
767             }}
768         });
769
770 } // namespace Decode
771 } // namespace JPEG
772
773 namespace JPEG {
774 namespace Encode {
775
776     TestInput::TestInput(
777         const unsigned fourcc, const unsigned w, const unsigned h)
778         : bytes() // caller must fill this in after instantiation
779         , picture(defaultPictureParameter)
780         , matrix(defaultIQMatrix)
781         , huffman(defaultHuffmanTable)
782         , slice(defaultSliceParameter)
783         , fourcc(fourcc)
784         , fourcc_output(fourcc)
785         , format(0)
786         , planes(0)
787         , widths{0,0,0}
788         , heights{0,0,0}
789         , offsets{0,0,0}
790         , sizes{0,0,0}
791     {
792         picture.picture_width = ALIGN(w, 2);
793         picture.picture_height = ALIGN(h, 2);
794
795         switch(fourcc) {
796         case VA_FOURCC_I420:
797             planes = 3;
798             widths = {w + (w & 1), (w + 1) >> 1, (w + 1) >> 1};
799             heights = {h + (h & 1), (h + 1) >> 1, (h + 1) >> 1};
800             format = VA_RT_FORMAT_YUV420;
801             fourcc_output = VA_FOURCC_IMC3;
802             break;
803         case VA_FOURCC_NV12:
804             planes = 2;
805             widths = {w + (w & 1), w + (w & 1), 0};
806             heights = {h + (h & 1), (h + 1) >> 1, 0};
807             format = VA_RT_FORMAT_YUV420;
808             fourcc_output = VA_FOURCC_IMC3;
809             break;
810         default:
811             return;
812         }
813
814         for (size_t i(0); i < planes; ++i)
815             sizes[i] = widths[i] * heights[i];
816
817         for (size_t i(1); i < planes; ++i)
818             offsets[i] = sizes[i - 1] + offsets[i - 1];
819     }
820
821     const unsigned TestInput::width() const
822     {
823         return picture.picture_width;
824     }
825
826     const unsigned TestInput::height() const
827     {
828         return picture.picture_height;
829     }
830
831     const uint8_t* TestInput::plane(const size_t i) const
832     {
833         return bytes.data() + offsets[i];
834     }
835
836     ::std::ostream& operator<<(::std::ostream& os, const TestInput& t)
837     {
838         return os
839             << std::string((char*)(&t.fourcc), 4)
840             << " " << t.width() << "x" << t.height()
841             << " " << t.widths << " " << t.heights
842             << " " << t.sizes << " " << t.offsets
843         ;
844     }
845
846     ::std::ostream& operator<<(::std::ostream& os, const TestInput::Shared& t)
847     {
848         return os << *t;
849     }
850
851     ::std::ostream& operator<<(
852         ::std::ostream& os, const TestInput::SharedConst& t)
853     {
854         return os << *t;
855     }
856
857     TestInput::Shared TestInputCreator::create(const unsigned fourcc) const
858     {
859         const std::array<unsigned, 2> res = getResolution();
860
861         TestInput::Shared input(new TestInput(fourcc, res[0], res[1]));
862         ByteData& bytes = input->bytes;
863
864         RandomValueGenerator<uint8_t> rg(0x00, 0xff);
865         for (size_t i(0); i < input->planes; ++i)
866             std::generate_n(
867                 std::back_inserter(bytes), input->sizes[i],
868                 [&rg]{ return rg(); });
869         return input;
870     }
871
872     ::std::ostream& operator<<(::std::ostream& os, const TestInputCreator& t)
873     {
874         t.repr(os);
875         return os;
876     }
877
878     ::std::ostream& operator<<(
879         ::std::ostream& os, const TestInputCreator::Shared& t)
880     {
881         return os << *t;
882     }
883
884     ::std::ostream& operator<<(
885         ::std::ostream& os, const TestInputCreator::SharedConst& t)
886     {
887         return os << *t;
888     }
889
890     std::array<unsigned, 2> RandomSizeCreator::getResolution() const
891     {
892         static RandomValueGenerator<unsigned> rg(1, 769);
893         return {rg(), rg()};
894     }
895
896     void RandomSizeCreator::repr(::std::ostream& os) const
897     {
898         os << "Random Size";
899     }
900
901     FixedSizeCreator::FixedSizeCreator(
902         const std::array<unsigned, 2>& resolution)
903         : res(resolution)
904     {
905         return;
906     }
907
908     std::array<unsigned, 2> FixedSizeCreator::getResolution() const
909     {
910         return res;
911     }
912
913     void FixedSizeCreator::repr(::std::ostream& os) const
914     {
915         os << "Fixed Size " << res[0] << "x" << res[1];
916     }
917
918 } // namespace Encode
919 } // namespace JPEG