From b8aaedcd0147be00c7d9b58c85a9caf49fb6b6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sun, 24 Jul 2016 14:21:01 +0200 Subject: [PATCH] lavfi/selectivecolor: fix picking black as neutral when alpha is present --- libavfilter/vf_selectivecolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.;