- Cleaned up some files -- seems there were some wrongly resolved
conflicts which resulted into duplicated code in space_image.py
and some build configuration files.
- Store all color space related data (such as display device, view
transform and so) as strings, so it could easily be ported to new
OCIO configuration files and it'll be much more portable between
different configurations.
This required adding some look-ups to RNA associated with such
settings, but it's indeed the only way to do this. If it'll be
figured out such look-ups causes performance issues it's possible
to optimize this further using hash. So far it's only few elements
in list to be looked up.
- Added support of display device transformation from OCIO
configuration files. Display device is setting per-window and
different windows could have different display devices, so it's
possible to have one blender window opened on sRGB monitor and
another one on xyz projector.
Display device is ignored when using ACES ODT Tonecurve view
transform due to it's not an OCIO transformation. Probably it'll
be possible to get rid of this tone curve soon (if it'll be
proved useless or it'll be implemented as a part of OCIO LUT).
- Movie Cache now supports deleter functions for user keys, so
such keys could have some allocated data which would be removed
as soon as element in cache is being removed.
- Movie Cache now support callbacks to check whether current
cache element could be removed from a cache due to it wouldn't
be accessed anymore.
- Re-written cache stuff for display buffers of ImBuf. Now it's
using Movie Cache which is global for all ImBufs.
Probably it's not implemented in fastest way, would be investigated
further and probably changed it performance wouldn't be good enough.
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.
Separate X and Y passes of blurring like it's done for flat
gaussian blur. This reduces computing difficulty from size^2
to 2*size without any visual changes in matte.
input image to be calculated in some cases, use only actual area which is
needed to calculate current tile.
Seems to be giving some % of speedup. Verified result of keying before
this patch and after this patch and they were identical, so hopefully
now area of interest is indeed correct.
Screens are usually doesn't have overexposured pixels and all
saturation / gradient math was written assuming that all channels
are withing 0 .. 1 range and in cases when some channel exceeds
this range matte could be completely wrong.
Added special check for overesposure and assume such pixels as
definitely foreground.
Also fixed minimal value for edge kernel size.
a translate node were connected with the same complex node (like lens
distortion).
Added a check to see if the list of buffers are available to resolve
this issue.