Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-26 13:46:24 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-26 13:46:24 +0400
commitcd6ed0bee5c1bc7b73eae5f869b13b121aa00a4b (patch)
tree10c861d1b38f0a40ccbcfa27f81350f33962be76 /source/blender/compositor/operations/COM_KeyingScreenOperation.h
parentbf19327465ab180c547436c56f6efbb55640b06d (diff)
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.
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingScreenOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.h b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
index 7cf7ad3e959..95815cd3930 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.h
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.h
@@ -50,6 +50,11 @@ protected:
rctf *triangles_AABB;
} TriangulationData;
+ typedef struct TileData {
+ int *triangles;
+ int triangles_total;
+ } TileData;
+
MovieClip *m_movieClip;
int m_framenumber;
TriangulationData *m_cachedTriangulation;
@@ -69,6 +74,7 @@ public:
void deinitExecution();
void *initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers);
+ void deinitializeTileData(rcti *rect, MemoryBuffer **memoryBuffers, void *data);
void setMovieClip(MovieClip *clip) {this->m_movieClip = clip;}
void setTrackingObject(const char *object) {strncpy(this->m_trackingObject, object, sizeof(this->m_trackingObject));}