diff options
author | Clément Bœsch <u@pkh.me> | 2016-07-24 14:21:01 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-07-24 14:21:50 +0200 |
commit | b8aaedcd0147be00c7d9b58c85a9caf49fb6b6db (patch) | |
tree | f6754aaa1e17f66d2bcd4126034017b948222efe | |
parent | 6108cb2ce3ee6c051629ff59495edd2a1a58830e (diff) | |
download | ffmpeg-b8aaedcd0147be00c7d9b58c85a9caf49fb6b6db.tar.gz |
lavfi/selectivecolor: fix picking black as neutral when alpha is present
-rw-r--r-- | libavfilter/vf_selectivecolor.c | 2 |
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.; |