Am 11.02.2014 um 12:14 schrieb Martin Storsjo <martin(a)martin.st>:
+#define D3DFMT_YV12 MAKEFOURCC('Y','V','1','2') +#define D3DFMT_I420 MAKEFOURCC('I','4','2','0') +#define D3DFMT_NV12 MAKEFOURCC('N','V','1','2’) There’s no need for global definitions. Other tests that use custom fourccs just use MAKEFOURCC in their code.
+ struct + { + DWORD color1, color2; + DWORD rgb1, rgb2; + } + test_data[] = + { + { 0x000000, 0xffffff, 0x00008800, 0x00ff7dff }, + { 0xff0000, 0x00ffff, 0x004aff14, 0x00b800ee }, + { 0x00ff00, 0xff00ff, 0x000024ee, 0x00ffe114 }, + { 0x0000ff, 0xffff00, 0x00b80000, 0x004affff }, + { 0xffff00, 0x0000ff, 0x004affff, 0x00b80000 }, + { 0xff00ff, 0x00ff00, 0x00ffe114, 0x000024ee }, + { 0x00ffff, 0xff0000, 0x00b800ee, 0x004aff14 }, + { 0xffffff, 0x000000, 0x00ff7dff, 0x00008800 }, + }; Please make this static const. The same applies to the formats[] table.
I’ll look at the details of the test and the other patches later today, when my headache is gone :-\ .