summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2015-08-03 23:50:42 (GMT)
committer niels <niels@dyne.org>2015-08-03 23:50:42 (GMT)
commit0eca12bd1b09100f858c88dfe680e5bddf298714 (patch)
treeabd7c02cb4b7424d982fdb7e42439a01c86cc761
parentc8c41a71b8dc4e9abe544cf90821f7a39664ee59 (diff)
refactor blend_func5 (keyselect)
-rw-r--r--veejay-current/veejay-server/libvje/effects/keyselect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/veejay-current/veejay-server/libvje/effects/keyselect.c b/veejay-current/veejay-server/libvje/effects/keyselect.c
index 7fe3157..bae3058 100644
--- a/veejay-current/veejay-server/libvje/effects/keyselect.c
+++ b/veejay-current/veejay-server/libvje/effects/keyselect.c
@@ -95,7 +95,9 @@ uint8_t blend_func4(uint8_t a, uint8_t b) {
uint8_t blend_func5(uint8_t a, uint8_t b) {
uint8_t val;
- uint8_t c = 256 - b;
+ uint8_t c = 0xff - b;
+ if( c == 0 )
+ return CLAMP_Y(b);
val = b / c;
return CLAMP_Y(val);
}