• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright © 2016 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 #ifndef GEN_SAMPLE_POSITIONS_H
24 #define GEN_SAMPLE_POSITIONS_H
25 
26 #define GEN_SAMPLE_POS_1X(prefix) \
27 prefix##0XOffset   = 0.5; \
28 prefix##0YOffset   = 0.5;
29 
30 #define GEN_SAMPLE_POS_2X(prefix) \
31 prefix##0XOffset   = 0.25; \
32 prefix##0YOffset   = 0.25; \
33 prefix##1XOffset   = 0.75; \
34 prefix##1YOffset   = 0.75;
35 
36 #define GEN_SAMPLE_POS_4X(prefix) \
37 prefix##0XOffset   = 0.375; \
38 prefix##0YOffset   = 0.125; \
39 prefix##1XOffset   = 0.875; \
40 prefix##1YOffset   = 0.375; \
41 prefix##2XOffset   = 0.125; \
42 prefix##2YOffset   = 0.625; \
43 prefix##3XOffset   = 0.625; \
44 prefix##3YOffset   = 0.875;
45 
46 #define GEN_SAMPLE_POS_8X(prefix) \
47 prefix##0XOffset   = 0.5625; \
48 prefix##0YOffset   = 0.3125; \
49 prefix##1XOffset   = 0.4375; \
50 prefix##1YOffset   = 0.6875; \
51 prefix##2XOffset   = 0.8125; \
52 prefix##2YOffset   = 0.5625; \
53 prefix##3XOffset   = 0.3125; \
54 prefix##3YOffset   = 0.1875; \
55 prefix##4XOffset   = 0.1875; \
56 prefix##4YOffset   = 0.8125; \
57 prefix##5XOffset   = 0.0625; \
58 prefix##5YOffset   = 0.4375; \
59 prefix##6XOffset   = 0.6875; \
60 prefix##6YOffset   = 0.9375; \
61 prefix##7XOffset   = 0.9375; \
62 prefix##7YOffset   = 0.0625;
63 
64 #define GEN_SAMPLE_POS_16X(prefix) \
65 prefix##0XOffset   = 0.5625; \
66 prefix##0YOffset   = 0.5625; \
67 prefix##1XOffset   = 0.4375; \
68 prefix##1YOffset   = 0.3125; \
69 prefix##2XOffset   = 0.3125; \
70 prefix##2YOffset   = 0.6250; \
71 prefix##3XOffset   = 0.7500; \
72 prefix##3YOffset   = 0.4375; \
73 prefix##4XOffset   = 0.1875; \
74 prefix##4YOffset   = 0.3750; \
75 prefix##5XOffset   = 0.6250; \
76 prefix##5YOffset   = 0.8125; \
77 prefix##6XOffset   = 0.8125; \
78 prefix##6YOffset   = 0.6875; \
79 prefix##7XOffset   = 0.6875; \
80 prefix##7YOffset   = 0.1875; \
81 prefix##8XOffset   = 0.3750; \
82 prefix##8YOffset   = 0.8750; \
83 prefix##9XOffset   = 0.5000; \
84 prefix##9YOffset   = 0.0625; \
85 prefix##10XOffset  = 0.2500; \
86 prefix##10YOffset  = 0.1250; \
87 prefix##11XOffset  = 0.1250; \
88 prefix##11YOffset  = 0.7500; \
89 prefix##12XOffset  = 0.0000; \
90 prefix##12YOffset  = 0.5000; \
91 prefix##13XOffset  = 0.9375; \
92 prefix##13YOffset  = 0.2500; \
93 prefix##14XOffset  = 0.8750; \
94 prefix##14YOffset  = 0.9375; \
95 prefix##15XOffset  = 0.0625; \
96 prefix##15YOffset  = 0.0000;
97 
98 #endif /* GEN_SAMPLE_POSITIONS_H */
99