Rev 106 | Rev 118 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 106 | Rev 117 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | #include "ff.h" |
28 | #include "ff.h" |
29 | #endif |
29 | #endif |
30 | #include "funcs.h" |
30 | #include "funcs.h" |
31 | #include "y.tab.h" |
31 | #include "y.tab.h" |
32 | 32 | ||
- | 33 | #include "node.h" // for symbol "var[]" |
|
- | 34 | ||
33 | #define RINT //no rounding for now |
35 | #define RINT //no rounding for now |
34 | 36 | ||
35 | //#if TARGET_API_MAC_CARBON |
37 | //#if TARGET_API_MAC_CARBON |
36 | // this is another incompatibility between Classic stdclib and OS X stdclib |
38 | // this is another incompatibility between Classic stdclib and OS X stdclib |
37 | // ***FIXME: need to access real OS X includes for Carbon build |
39 | // ***FIXME: need to access real OS X includes for Carbon build |
Line 280... | Line 282... | ||
280 | srand(seed); |
282 | srand(seed); |
281 | return 0; |
283 | return 0; |
282 | } |
284 | } |
283 | 285 | ||
284 | value_type zero_val = 0; |
286 | value_type zero_val = 0; |
- | 287 | value_type one_val = 0; |
|
- | 288 | value_type max_channel_val = 255; |
|
285 | 289 | ||
286 | /* predefined symbols */ |
290 | /* predefined symbols */ |
287 | struct sym_rec predefs[]={ |
291 | struct sym_rec predefs[]={ |
288 | /* functions */ |
292 | /* functions */ |
- | 293 | ||
289 | {0,TOK_FN3,"src", (pfunc_type)ff_src, 0}, |
294 | {0,TOK_FN3,"src", (pfunc_type)ff_src, 0}, |
290 | {0,TOK_FN3,"rad", (pfunc_type)ff_rad, 0}, |
295 | {0,TOK_FN3,"rad", (pfunc_type)ff_rad, 0}, |
291 | {0,TOK_FN1,"ctl", (pfunc_type)ff_ctl, 0}, |
296 | {0,TOK_FN1,"ctl", (pfunc_type)ff_ctl, 0}, |
292 | {0,TOK_FN3,"val", (pfunc_type)ff_val, 0}, |
297 | {0,TOK_FN3,"val", (pfunc_type)ff_val, 0}, |
293 | {0,TOK_FN2,"map", (pfunc_type)ff_map, 0}, |
298 | {0,TOK_FN2,"map", (pfunc_type)ff_map, 0}, |
Line 309... | Line 314... | ||
309 | {0,TOK_FN2,"c2d", (pfunc_type)ff_c2d, 0}, |
314 | {0,TOK_FN2,"c2d", (pfunc_type)ff_c2d, 0}, |
310 | {0,TOK_FN2,"c2m", (pfunc_type)ff_c2m, 0}, |
315 | {0,TOK_FN2,"c2m", (pfunc_type)ff_c2m, 0}, |
311 | {0,TOK_FN1,"get", (pfunc_type)ff_get, 0}, |
316 | {0,TOK_FN1,"get", (pfunc_type)ff_get, 0}, |
312 | {0,TOK_FN2,"put", (pfunc_type)ff_put, 0}, |
317 | {0,TOK_FN2,"put", (pfunc_type)ff_put, 0}, |
313 | {0,TOK_FN10,"cnv",(pfunc_type)ff_cnv, 0}, |
318 | {0,TOK_FN10,"cnv",(pfunc_type)ff_cnv, 0}, |
314 | {0,TOK_FN1,"rst", (pfunc_type)ff_rst, 0}, |
319 | {0,TOK_FN1,"rst", (pfunc_type)ff_rst, 0}, // undocumented FilterFactory function |
- | 320 | ||
- | 321 | /* predefined variables (names with more than 1 character); most of them are undocumented in FilterFactory */ |
|
315 | /* predefined variables (names >1 characters) */ |
322 | /* the predefined variables with 1 character are defined in lexer.l and process.c */ |
- | 323 | /* in this table, you must not add TOK_VAR with only 1 character (since this case is not defined in parser.y) */ |
|
- | 324 | ||
- | 325 | {0,TOK_VAR,"rmax",0, &max_channel_val}, // alias of 'R' (defined in lexer.l, line 129) |
|
- | 326 | {0,TOK_VAR,"gmax",0, &max_channel_val}, // alias of 'G' (defined in lexer.l, line 129) |
|
- | 327 | {0,TOK_VAR,"bmax",0, &max_channel_val}, // alias of 'B' (defined in lexer.l, line 129) |
|
- | 328 | {0,TOK_VAR,"amax",0, &max_channel_val}, // alias of 'A' (defined in lexer.l, line 129) |
|
- | 329 | {0,TOK_VAR,"cmax",0, &max_channel_val}, // alias of 'C' (defined in lexer.l, line 129) |
|
- | 330 | {0,TOK_VAR,"imax",0, &max_channel_val}, // alias of 'I' (defined in lexer.l, line 129) |
|
- | 331 | {0,TOK_VAR,"umax",0, &max_channel_val}, // alias of 'U' (defined in lexer.l, line 129) |
|
- | 332 | {0,TOK_VAR,"vmax",0, &max_channel_val}, // alias of 'V' (defined in lexer.l, line 129) |
|
- | 333 | {0,TOK_VAR,"dmax",0, &var['D']}, |
|
- | 334 | {0,TOK_VAR,"mmax",0, &var['M']}, |
|
- | 335 | {0,TOK_VAR,"pmax",0, &var['Z']}, |
|
- | 336 | {0,TOK_VAR,"xmax",0, &var['X']}, |
|
- | 337 | {0,TOK_VAR,"ymax",0, &var['Y']}, |
|
- | 338 | {0,TOK_VAR,"zmax",0, &var['Z']}, |
|
- | 339 | ||
- | 340 | {0,TOK_VAR,"rmin",0, &zero_val}, |
|
- | 341 | {0,TOK_VAR,"gmin",0, &zero_val}, |
|
- | 342 | {0,TOK_VAR,"bmin",0, &zero_val}, |
|
- | 343 | {0,TOK_VAR,"amin",0, &zero_val}, |
|
- | 344 | {0,TOK_VAR,"cmin",0, &zero_val}, |
|
- | 345 | {0,TOK_VAR,"imin",0, &zero_val}, |
|
- | 346 | {0,TOK_VAR,"umin",0, &zero_val}, |
|
- | 347 | {0,TOK_VAR,"vmin",0, &zero_val}, |
|
316 | {0,TOK_VAR,"dmin",0, &zero_val}, |
348 | {0,TOK_VAR,"dmin",0, &zero_val}, |
317 | {0,TOK_VAR,"mmin",0, &zero_val}, |
349 | {0,TOK_VAR,"mmin",0, &zero_val}, |
- | 350 | {0,TOK_VAR,"pmin",0, &zero_val}, |
|
- | 351 | {0,TOK_VAR,"xmin",0, &zero_val}, |
|
- | 352 | {0,TOK_VAR,"ymin",0, &zero_val}, |
|
- | 353 | {0,TOK_VAR,"zmin",0, &zero_val}, |
|
- | 354 | ||
- | 355 | /* Undocumented synonyms of FilterFactory for compatibility with Premiere */ |
|
- | 356 | {0,TOK_FN10,"cnv0",(pfunc_type)ff_cnv, 0}, |
|
- | 357 | {0,TOK_FN3,"src0", (pfunc_type)ff_src, 0}, |
|
- | 358 | {0,TOK_FN3,"rad0", (pfunc_type)ff_rad, 0}, |
|
- | 359 | {0,TOK_FN10,"cnv1",(pfunc_type)ff_cnv, 0}, |
|
- | 360 | {0,TOK_FN3,"src1", (pfunc_type)ff_src, 0}, |
|
- | 361 | {0,TOK_FN3,"rad1", (pfunc_type)ff_rad, 0}, |
|
- | 362 | {0,TOK_VAR,"r0",0, &var['r']}, |
|
- | 363 | {0,TOK_VAR,"g0",0, &var['g']}, |
|
- | 364 | {0,TOK_VAR,"b0",0, &var['b']}, |
|
- | 365 | {0,TOK_VAR,"a0",0, &var['a']}, |
|
- | 366 | {0,TOK_VAR,"c0",0, &var['c']}, |
|
- | 367 | {0,TOK_VAR,"i0",0, &var['i']}, |
|
- | 368 | {0,TOK_VAR,"u0",0, &var['u']}, |
|
- | 369 | {0,TOK_VAR,"v0",0, &var['v']}, |
|
- | 370 | {0,TOK_VAR,"d0",0, &var['d']}, |
|
- | 371 | {0,TOK_VAR,"m0",0, &var['m']}, |
|
- | 372 | {0,TOK_VAR,"r1",0, &var['r']}, |
|
- | 373 | {0,TOK_VAR,"g1",0, &var['g']}, |
|
- | 374 | {0,TOK_VAR,"b1",0, &var['b']}, |
|
- | 375 | {0,TOK_VAR,"a1",0, &var['a']}, |
|
- | 376 | {0,TOK_VAR,"c1",0, &var['c']}, |
|
- | 377 | {0,TOK_VAR,"i1",0, &var['i']}, |
|
- | 378 | {0,TOK_VAR,"u1",0, &var['u']}, |
|
- | 379 | {0,TOK_VAR,"v1",0, &var['v']}, |
|
- | 380 | {0,TOK_VAR,"d1",0, &var['d']}, |
|
- | 381 | {0,TOK_VAR,"m1",0, &var['m']}, |
|
- | 382 | {0,TOK_VAR,"tmin",0, &zero_val}, |
|
- | 383 | {0,TOK_VAR,"tmax",0, &one_val}, |
|
- | 384 | {0,TOK_VAR,"total",0, &one_val}, |
|
- | 385 | ||
318 | {0,0,0,0,0} |
386 | {0,0,0,0,0} |
319 | }; |
387 | }; |
320 | - |