Blender Git Commit Log
Git Commits -> Revision 45fc801
Revision 45fc801 by Lukas Toenne (master) December 4, 2013, 11:09 (GMT) |
Fix for interpolation errors on lower-left borders in compositor image inputs. http://wiki.blender.org/uploads/4/4c/Compo_image_interpolation_borders.png Problem is that all image buffer reader nodes (RenderLayer, Image, MovieClip) were clipping pixel coordinates to 0..N range (N being width or height respectively). Bilinear interpolation works ok then on the upper-right borders (x, N) and (N, y), since the last (N-1) pixel fades out to N (background). But the lower-left (x, 0) and (0, y) borders are not correctly interpolated because the nodes cut off the negative pixels before the interpolation function can calculate their value. To fix this, the interpolation functions are now entirely responsible for handling "out of range" cases, i.e. setting (0,0,0,0) results for invalid pixels, while also handling interpolation for borders. Callers should not do pixel range checks themselves, which also makes the code simpler. Should not have any real performance penalty, the interpolation functions do this check anyway, so is probably even slightly faster. |
Commit Details:
Full Hash: 45fc80153a40fb01db6b1e25b4ab575a06a331b8
Parent Commit: a698709
Lines Changed: +65, -32
6 Modified Paths:
/source/blender/blenlib/intern/math_interp.c (+16, -5) (Diff)
/source/blender/compositor/operations/COM_ImageOperation.cpp (+9, -5) (Diff)
/source/blender/compositor/operations/COM_MovieClipOperation.cpp (+1, -1) (Diff)
/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp (+27, -15) (Diff)
/source/blender/compositor/operations/COM_RenderLayersProg.cpp (+8, -6) (Diff)
/source/blender/imbuf/intern/imageprocess.c (+4, -0) (Diff)
/source/blender/compositor/operations/COM_ImageOperation.cpp (+9, -5) (Diff)
/source/blender/compositor/operations/COM_MovieClipOperation.cpp (+1, -1) (Diff)
/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp (+27, -15) (Diff)
/source/blender/compositor/operations/COM_RenderLayersProg.cpp (+8, -6) (Diff)
/source/blender/imbuf/intern/imageprocess.c (+4, -0) (Diff)