This is redundant with a != 0xff below.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -599,7 +599,6 @@ DECLARE_CMP_FUNC(b, 2) · 598 unmodified lines | ||
| 599 | 599 | static const cmp_func cmp_funcs[] = {cmp_r, cmp_g, cmp_b}; |
| 600 | 600 | |
| 601 | 601 | static int get_next_color(const uint8_t *color_used, const uint32_t *palette, |
| 602 | − const int trans_thresh, | |
| 603 | 602 | int *component, const struct color_rect *box) |
| 604 | 603 | { |
| 605 | 604 | int wr, wg, wb; |
| @@ -619,10 +618,6 @@ static int get_next_color(const uint8_t *color_used, const uint32_t *palette, · 13 unmodified lines | ||
| 619 | 618 | const uint8_t g = c >> 8 & 0xff; |
| 620 | 619 | const uint8_t b = c & 0xff; |
| 621 | 620 | |
| 622 | − if (a < trans_thresh) { | |
| 623 | − continue; | |
| 624 | − } | |
| 625 | − | |
| 626 | 621 | if (color_used[i] || (a != 0xff) || |
| 627 | 622 | r < box->min[0] || g < box->min[1] || b < box->min[2] || |
| 628 | 623 | r > box->max[0] || g > box->max[1] || b > box->max[2]) |
| @@ -674,7 +669,7 @@ static int colormap_insert(struct color_node *map, · 45 unmodified lines | ||
| 674 | 669 | int node_left_id = -1, node_right_id = -1; |
| 675 | 670 | struct color_node *node; |
| 676 | 671 | struct color_rect box1, box2; |
| 677 | − const int pal_id = get_next_color(color_used, palette, trans_thresh, &component, box); | |
| 672 | + const int pal_id = get_next_color(color_used, palette, &component, box); | |
| 678 | 673 | |
| 679 | 674 | if (pal_id < 0) |
| 680 | 675 | return -1; |