ffmpeg | branch: master | Clément Bœsch <u...@pkh.me> | Sun Jul 24 14:21:01 
2016 +0200| [b8aaedcd0147be00c7d9b58c85a9caf49fb6b6db] | committer: Clément 
Bœsch

lavfi/selectivecolor: fix picking black as neutral when alpha is present

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8aaedcd0147be00c7d9b58c85a9caf49fb6b6db
---

 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 e590094..38e6ad5 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.;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to