Browse Source

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

tags/n3.2
Clément Bœsch 8 years ago
parent
commit
b8aaedcd01
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/vf_selectivecolor.c

+ 1
- 1
libavfilter/vf_selectivecolor.c View File

@@ -338,7 +338,7 @@ static inline int selective_color(AVFilterContext *ctx, ThreadData *td,
| (b == max_color) << RANGE_BLUES | (b == max_color) << RANGE_BLUES
| (b == min_color) << RANGE_YELLOWS | (b == min_color) << RANGE_YELLOWS
| (r > 128 && g > 128 && b > 128) << RANGE_WHITES | (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; | (r < 128 && g < 128 && b < 128) << RANGE_BLACKS;


const float rnorm = r / 255.; const float rnorm = r / 255.;


Loading…
Cancel
Save