[FFmpeg-cvslog] lavfi/selectivecolor: fix picking black as neutral when alpha is present

Clément Bœsch git at videolan.org
Sun Jul 24 15:22:43 EEST 2016


ffmpeg | branch: master | Clément Bœsch <u at 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.;



More information about the ffmpeg-cvslog mailing list