Solved issue with distorted compositor results in some cases
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 10 Nov 2012 19:11:25 +0000 (19:11 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 10 Nov 2012 19:11:25 +0000 (19:11 +0000)
commitf81e30a41f961fe681d06fb98fec6e722297292e
treeb5dac6a3f8488035ba25428fd1fcd6ed76632904
parent45cd54bcd11d9b1fb62d986328917ca5cebf9b17
Solved issue with distorted compositor results in some cases

Originally issue was discovered when using stabilization and movie distortion
nodes, but in fact issue was caused by render layer node always doing nearest
interpolation. Now made it so this node will respect sampler passed to it's
executePixel function and do an interpolation.

Added two new functions to do bilinear/bicubic interpolation in float buffer
with variable number of components per element, so it could interpolate 1, 3
and 4 component vectors. This functions currently mostly duplicates the same
functions from imageprocess.c and it should actually be de-duplicated. Think
it's ok to leave a bit of time with such duplication, since functions should
be generalized one more time to support byte buffers, which could backfire on
readability.

Also removed mark as complex from stabilization node, which isn't needed sine
int fact this node is not complex.
source/blender/blenlib/BLI_math.h
source/blender/blenlib/BLI_math_interp.h [new file with mode: 0644]
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/math_interp.c [new file with mode: 0644]
source/blender/compositor/nodes/COM_ScaleNode.cpp
source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
source/blender/compositor/operations/COM_RenderLayersBaseProg.h
source/blender/compositor/operations/COM_ScaleOperation.cpp
source/blender/compositor/operations/COM_ScaleOperation.h