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>2014-05-28 12:28:21 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-05-28 12:29:24 +0400
commit5a7b049a940bc120c5e9734f3ae2545c8ccc93f0 (patch)
tree88a217572a1d098bc7bfeb3351bb6f08f4098ce3 /source/blender/compositor
parent94b2852947aba90850890d0b614c1684a94ab1fd (diff)
Fix T40383: Keying node doesn't work
We should actually re-consider whether zero-sized kernels are allowed for edge detection.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index da6a94f8813..d9eb7b588a8 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -71,7 +71,11 @@ void KeyingClipOperation::executePixel(float output[4], int x, int y, void *data
end_y = min_ff(y + delta - 1, bufferHeight - 1);
int count = 0, totalCount = (end_x - start_x + 1) * (end_y - start_y + 1) - 1;
- int thresholdCount = (float) totalCount * 0.9f + 0.5f;
+ int thresholdCount = ceil((float) totalCount * 0.9f);
+
+ if (delta == 0) {
+ ok = true;
+ }
for (int cx = start_x; ok == false && cx <= end_x; ++cx) {
for (int cy = start_y; ok == false && cy <= end_y; ++cy) {