summaryrefslogtreecommitdiff
path: root/libavfilter/vf_selectivecolor.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-07-24 14:21:01 +0200
committerClément Bœsch <u@pkh.me>2016-07-24 14:21:50 +0200
commitb8aaedcd0147be00c7d9b58c85a9caf49fb6b6db (patch)
treef6754aaa1e17f66d2bcd4126034017b948222efe /libavfilter/vf_selectivecolor.c
parent6108cb2ce3ee6c051629ff59495edd2a1a58830e (diff)
lavfi/selectivecolor: fix picking black as neutral when alpha is present
Diffstat (limited to 'libavfilter/vf_selectivecolor.c')
-rw-r--r--libavfilter/vf_selectivecolor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c
index e590094943..38e6ad5365 100644
--- a/libavfilter/vf_selectivecolor.c
+++ b/libavfilter/vf_selectivecolor.c
@@ -338,7 +338,7 @@ static inline int selective_color(AVFilterContext *ctx, ThreadData *td,
| (b == max_color) << RANGE_BLUES
| (b == min_color) << RANGE_YELLOWS
| (r > 128 && g > 128 && b > 128) << RANGE_WHITES
- | (color && (color & 0xffffff) != 0xffffff) << RANGE_NEUTRALS
+ | ((r || g || b) && (r != 255 || g != 255 || b != 255)) << RANGE_NEUTRALS
| (r < 128 && g < 128 && b < 128) << RANGE_BLACKS;
const float rnorm = r / 255.;