History

avfilter/paletteuse: remove redundant alpha condition

This is redundant with a != 0xff below.

Clément Bœsch committed 4 years ago

Commit 1159c361 parent 4c061bc1 file · +1 −6Browse files

Unified · Split

libavfilter/vf_paletteuse.c+1−6
@@ -599,7 +599,6 @@ DECLARE_CMP_FUNC(b, 2) · 598 unmodified lines
599599 static const cmp_func cmp_funcs[] = {cmp_r, cmp_g, cmp_b};
600600
601601 static int get_next_color(const uint8_t *color_used, const uint32_t *palette,
602− const int trans_thresh,
603602 int *component, const struct color_rect *box)
604603 {
605604 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
619618 const uint8_t g = c >> 8 & 0xff;
620619 const uint8_t b = c & 0xff;
621620
622− if (a < trans_thresh) {
623− continue;
624− }
625−
626621 if (color_used[i] || (a != 0xff) ||
627622 r < box->min[0] || g < box->min[1] || b < box->min[2] ||
628623 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
674669 int node_left_id = -1, node_right_id = -1;
675670 struct color_node *node;
676671 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);
678673
679674 if (pal_id < 0)
680675 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t