Commit Graph

24 Commits

Author SHA1 Message Date
2ada3512a2 Compositor: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
3dada2f8cf Compositor: Reduce number of int<->float conversions in keying screen operation 2014-10-02 13:39:59 +06:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
e2fe7751d6 code cleanup: replace most DO_MINMAX2 -> minmax_v2v2_v2
also add UNPACK macros's. handy for printing vectors for eg.
2012-11-15 22:20:18 +00:00
1c450d71ef Fixed crashes when motion tracks are zero-sized
This is probably versioning issue happened when both trunk and tomato
were mixed to work on the same file.

Anyway, there're few files here locally and it's probably other users
do have the same files, so lets keep things safe here :)
2012-11-07 11:18:42 +00:00
94a3945cf9 code cleanup: compositor - define size for executePixel function output float array 2012-08-10 14:07:24 +00:00
e877247789 use define for bokeh blur size, also define size of determineResolution args. 2012-08-10 13:23:31 +00:00
ca382a8d2a Fix for keying screen incorrect memory write when some of tracks are disabled. 2012-08-05 09:31:48 +00:00
52b4b49059 Code cleanup: Remove unused includes of DNA_scene_types. 2012-08-01 14:48:51 +00:00
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
9987a8fca7 Removed parameter from executePixel and initializeTileData. 2012-07-13 12:24:42 +00:00
993dfd7d2a add bli rect funcs BLI_rctf_init_minmax, BLI_rcti_init_minmax 2012-07-12 08:31:23 +00:00
4e213765ec Fixes for keying screen:
- Fixed issue with black areas appearing when too many sites
  are defined.

  Currently tweak epsilon value for this, but probably actual
  issue is somewhere else, can't see it yet.

- Fixed issue with bright pixels appearing in the sites, was
  caused by accumulating color for pixels, which isn't needed.

  Once color for pixel was set stop iterating via triangles.
  Could give some speedup too.

- Ignore markers which are outside of frame bounds, they were
  giving bad triangulation and they can't affect on gradient
  due to color fir such sites is not known.

- Sites used to be created at position without track offset
  taken into account.
2012-07-11 07:46:36 +00:00
de00723049 Fix for crash of keying screen node in cases when there's no
triangulation generated for tracks setup
2012-06-26 15:26:16 +00:00
cd6ed0bee5 Optimization of keying screen node
When creating tile data include only triangles which have got intersection
with tile's rectangle only. This saves quite a lot of per-pixel iterations
through triangles which simply can not affect on current tile.

In fact, it's AABB check is used here. It could be improved further, but
it'll slowdown tile data generation with questionable speedup.

Another major slowdown is in fact caused by voronoi triangulation code.
Currently it's used naive algorithm which is O(N^2) where N is number
of edges. Added few euristics there and removed unused part of code, which
gave quite noticeable speedup already.

This could be improved further, but this node is not ment to be used for
lots of markers. It's also generates wrong triangulation when there're
many sites used. Need to be investigated further.
2012-06-26 09:46:24 +00:00
6a1d82490e use m_ prefix for compositor class members (all compositor operations). 2012-06-26 01:22:05 +00:00
c41b91f8c2 Ignore disabled markers when building keying screen. 2012-06-25 16:36:22 +00:00
1755a0ada6 Added feather control to keying node
Behaves in the same way as feather dilate/erode node, applies
after dilate/erode in node.

Also use distance dilate/erode instead of size.
2012-06-25 10:50:24 +00:00
09e31a41bf Optimization of keying screen node
Use AABB check before calculating barycentric coordinates.

In simple tests with FullHD image and 4-9 tracks used for gradient
gave 1.5-2x speedup.
2012-06-24 15:29:43 +00:00
a8f23a96a4 KeyingScreen would now deal properly with clips with Start Frame != 1 2012-06-19 17:57:51 +00:00
570cc70772 style cleanup: compositor operations 2012-06-15 18:42:03 +00:00
f0c724219d Internal refactoring of tracking module, should be no functional changes
- Re-arrange functions in headers and implementation file to make them
  more grouped by entity they're operating with. Also order of functions
  in implementation file should match order of functions in header for
  easier navigation.

- Rename some functions to match conventions of naming public functions.
- Some code de-duplication, still some room for improvements tho.
- Split main 2D tracking functions into smaller steps to make it more clear.

Accidentally OpenMP was disabled in some of previous commits, re-enable it.
2012-06-15 11:03:23 +00:00
d56e77ada5 Keying Screen node from tomato branch
Merge Keying Screen node developed in tomato branch into trunk.

This node is aimed to make dealing with non-even greenscreens better
by generating gradiented image which could be used a input for keyer
nodes.

Based on building voronoi diagram using motion tracking markers as
sites position and average pattern color as color for that site.

Pretty straignforward node, some documentation is there
http://wiki.blender.org/index.php/User:Nazg-gul/Keying#Screen_color
2012-06-14 12:18:42 +00:00