HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP2_Common.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: COP2_Node.h
7  *
8  * COMMENTS:
9  * Common defines for COP Nodes.
10  */
11 #ifndef _COP2_COMMON_H_
12 #define _COP2_COMMON_H_
13 
14 #include <OP/OP_DataTypes.h>
15 
16 #define COP2_MASK_PAGE_NAME "Mask"
17 #define COP2_GEN_MASK_COUNT 4
18 #define COP2_GEN_IMAGE_PAGE "Image"
19 #define COP2_GEN_IMAGE_COUNT 16
20 #define COP2_GEN_SEQUENCE_PAGE "Sequence"
21 #define COP2_GEN_SEQUENCE_COUNT 8
22 #define COP2_MULTI_MERGE_PAGE "Merge"
23 #define COP2_MULTI_MERGE_COUNT 5
24 #define COP2_FRAME_PAGE_NAME "Frame Scope"
25 
26 #define TOOL_PARM PRM_Template::PRM_EXPORT_TBX
27 #define POPUP_PARM PRM_Template::PRM_EXPORT_MAX
28 
29 #define COP2_EMPTY_SWITCHER(name) \
30  static PRM_Default switcher[] = { \
31  PRM_Default(0,name), }
32 
33 #define COP2_SWITCHER(count, name) \
34  static PRM_Default switcher[] = { \
35  PRM_Default(count, name) }
36 
37 #define COP2_SWITCHER2(count1, name1, count2, name2) \
38  static PRM_Default switcher[] = { \
39  PRM_Default(count1, name1), \
40  PRM_Default(count2, name2) }
41 
42 #define COP2_SWITCHER3(count1, name1, count2, name2, count3, name3)\
43  static PRM_Default switcher[] = { \
44  PRM_Default(count1, name1), \
45  PRM_Default(count2, name2), \
46  PRM_Default(count3, name3) }
47 
48 #define COP2_SWITCHER4(count1,name1, count2,name2, count3,name3, count4,name4)\
49  static PRM_Default switcher[] = { \
50  PRM_Default(count1, name1), \
51  PRM_Default(count2, name2), \
52  PRM_Default(count3, name3), \
53  PRM_Default(count4, name4) }
54 
55 #define COP2_SWITCHER5(count1,name1, count2,name2, count3,name3, count4,name4, count5, name5)\
56  static PRM_Default switcher[] = { \
57  PRM_Default(count1, name1), \
58  PRM_Default(count2, name2), \
59  PRM_Default(count3, name3), \
60  PRM_Default(count4, name4), \
61  PRM_Default(count5, name5) }
62 
63 // Generator switchers...
64 
65 #define COP2_GENERATOR_SWITCHER(count, name) \
66  static PRM_Default switcher[] = { \
67  PRM_Default(count, name), \
68  PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
69  PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
70  PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
71 
72 #define COP2_GENERATOR_SWITCHER2(count1, name1, count2, name2) \
73  static PRM_Default switcher[] = { \
74  PRM_Default(count1, name1), \
75  PRM_Default(count2, name2), \
76  PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
77  PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
78  PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
79 
80 #define COP2_GENERATOR_SWITCHER3(count1,name1, count2,name2, count3,name3) \
81  static PRM_Default switcher[] = { \
82  PRM_Default(count1, name1), \
83  PRM_Default(count2, name2), \
84  PRM_Default(count3, name3), \
85  PRM_Default(COP2_GEN_MASK_COUNT, COP2_MASK_PAGE_NAME), \
86  PRM_Default(COP2_GEN_IMAGE_COUNT, COP2_GEN_IMAGE_PAGE), \
87  PRM_Default(COP2_GEN_SEQUENCE_COUNT, COP2_GEN_SEQUENCE_PAGE) }
88 
89 // Multi-Input Switchers
90 #define COP2_MULTI_SWITCHER(count, name) \
91  static PRM_Default switcher[] = { \
92  PRM_Default(count, name), \
93  PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
94 
95 #define COP2_MULTI_SWITCHER2(count1, name1, count2, name2) \
96  static PRM_Default switcher[] = { \
97  PRM_Default(count1, name1), \
98  PRM_Default(count2, name2), \
99  PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
100 
101 
102 #define COP2_MULTI_SWITCHER3(count1, name1, count2, name2, count3, name3)\
103  static PRM_Default switcher[] = { \
104  PRM_Default(count1, name1), \
105  PRM_Default(count2, name2), \
106  PRM_Default(count3, name3), \
107  PRM_Default(COP2_MULTI_MERGE_COUNT, COP2_MULTI_MERGE_PAGE) }
108 
109 // Pixel-based Switcher (classes derived directly from COP2_PixelBase)
110 #define COP2_PIXEL_EXTRAS 11
111 #define COP2_PIXEL_FIRST_EXTRAS 2
112 #define COP2_PIXEL_FRAME_EXTRAS 9
113 
114 #define COP2_PIXEL_SWITCHER(count, name) \
115  static PRM_Default switcher[] = { \
116  PRM_Default(count+COP2_PIXEL_FIRST_EXTRAS, name),\
117  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
118 
119 #define COP2_PIXEL_SWITCHER2(count1, name1, count2, name2) \
120  static PRM_Default switcher[] = { \
121  PRM_Default(count1, name1), \
122  PRM_Default(count2+COP2_PIXEL_FIRST_EXTRAS, name2),\
123  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
124 
125 // Mask Op-based Switcher (classes derived directly from COP2_MaskOp)
126 #define COP2_MASK_EXTRAS (COP2_PIXEL_FIRST_EXTRAS+5)
127 
128 #define COP2_MASK_SWITCHER(count, name) \
129  static PRM_Default switcher[] = { \
130  PRM_Default(count, name), \
131  PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
132  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
133 
134 #define COP2_MASK_SWITCHER2(count1, name1, count2, name2) \
135  static PRM_Default switcher[] = { \
136  PRM_Default(count1, name1), \
137  PRM_Default(count2, name2), \
138  PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
139  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
140 
141 #define COP2_MASK_SWITCHER3(count1, name1, count2, name2, count3, name3) \
142  static PRM_Default switcher[] = { \
143  PRM_Default(count1, name1), \
144  PRM_Default(count2, name2), \
145  PRM_Default(count3, name3), \
146  PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
147  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
148 
149 // Pixel Op-based Switcher (classes derived directly from COP2_PixelOp)
150 #define COP2_PIXEL_OP_EXTRAS 2
151 
152 #define COP2_PIXEL_OP_SWITCHER(count, name) \
153  static PRM_Default switcher[] = { \
154  PRM_Default(count+COP2_PIXEL_OP_EXTRAS, name), \
155  PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
156  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
157 
158 #define COP2_PIXEL_OP_SWITCHER2(count1, name1, count2, name2) \
159  static PRM_Default switcher[] = { \
160  PRM_Default(count1, name1), \
161  PRM_Default(count2+COP2_PIXEL_OP_EXTRAS, name2), \
162  PRM_Default(COP2_MASK_EXTRAS, COP2_MASK_PAGE_NAME), \
163  PRM_Default(COP2_PIXEL_FRAME_EXTRAS, COP2_FRAME_PAGE_NAME) }
164 
165 #define DEFAULT_COLOR_NAME "C"
166 #define DEFAULT_RED_NAME "R"
167 #define DEFAULT_GREEN_NAME "G"
168 #define DEFAULT_BLUE_NAME "B"
169 
170 #define DEFAULT_ALPHA_NAME "A"
171 #define DEFAULT_LUMINANCE_NAME "Y"
172 #define DEFAULT_DEPTH_NAME "Z"
173 #define DEFAULT_STENCIL_NAME "S"
174 
175 // Image units
176 #define IMAGE_UNIT_UV 0
177 #define IMAGE_UNIT_PIXEL 1
178 
179 // Plane merging options
180 #define PLANE_MERGE_ALL 0
181 #define PLANE_MERGE_COMMON 1
182 #define PLANE_MERGE_FIRST 2
183 
184 // Depth matching options
185 #define PLANE_DEPTH_PROMOTE 0
186 #define PLANE_DEPTH_DEMOTE 1
187 #define PLANE_DEPTH_FIRST 2
188 #define PLANE_DEPTH_MISMATCH_ERROR 3
189 
190 // Range matching options
191 #define SEQUENCE_RANGE_TRIM_FIRST 0
192 #define SEQUENCE_RANGE_SHIFT_FIRST 1
193 #define SEQUENCE_RANGE_EXTEND_MAX 2
194 #define SEQUENCE_RANGE_TRIM_MIN 3
195 
196 // Rate selection options
197 #define SEQUENCE_RATE_FIRST 0
198 #define SEQUENCE_RATE_HIGHEST 1
199 #define SEQUENCE_RATE_LOWEST 2
200 #define SEQUENCE_RATE_MISMATCH_ERROR 3
201 
202 // Frame matching options
203 #define SEQUENCE_FRAME_NEAREST 0
204 #define SEQUENCE_FRAME_PREVIOUS 1
205 #define SEQUENCE_FRAME_NEXT 2
206 
207 // Icon Preview options
208 #define ICON_PREVIEW_RGB 0
209 #define ICON_PREVIEW_ALPHA 1
210 #define ICON_PREVIEW_DEPTH 2
211 #define ICON_PREVIEW_LUM 3
212 
213 // COP Thread options
214 #define COP2_MULTITHREADED 0
215 #define COP2_SINGLE_THREAD 1
216 #define COP2_EXCLUSIVE_THREAD 2
217 
218 // Parm Groups
219 #define COP2_PARM_NONVOLATILE 0
220 #define COP2_PARM_IMAGE 1
221 #define COP2_PARM_TIMING 2
222 #define COP2_PARM_ALL_VOLATILE 3
223 
224 // Shift options
225 #define SHIFT_ALIGN_START_START 0
226 #define SHIFT_ALIGN_END_END 1
227 #define SHIFT_ALIGN_END_START 2
228 #define SHIFT_ALIGN_START_END 3
229 
230 #define SHIFT_REL_TO_START 0
231 #define SHIFT_ABS_START 1
232 #define SHIFT_ABS_END 2
233 
234 // Trim options
235 #define TRIM_REL 0
236 #define TRIM_ABS 1
237 #define TRIM_SINGLE 2
238 #define TRIM_SINGLE_START 3
239 #define TRIM_SINGLE_END 4
240 
241 // COP coloring.
247 };
248 
250 {
254 };
255 
266 };
267 
269 {
271 };
272 
273 
274 // defined at the end of COP2_Node.C
276 {
277  cop2LockInfo(const char *name, int num);
278  ~cop2LockInfo();
279 
280  static int hash(const char *name);
281 
284  int myHash;
285 };
286 
287 #endif
static int hash(const char *name)
COP2_ThreadPref
Definition: COP2_Common.h:249
cop2LockInfo(const char *name, int num)
GLuint const GLchar * name
Definition: glcorearb.h:786
char * myLockedPlane
Definition: COP2_Common.h:282
COP2_UIChangeType
Definition: COP2_Common.h:268
COP2_ColorComponent
Definition: COP2_Common.h:256
COP2_OpColorType
Definition: COP2_Common.h:242