Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
1159c36d
Commit
1159c36d
authored
Nov 05, 2022
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/paletteuse: remove redundant alpha condition
This is redundant with a != 0xff below.
parent
4c061bc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
vf_paletteuse.c
libavfilter/vf_paletteuse.c
+1
-6
No files found.
libavfilter/vf_paletteuse.c
View file @
1159c36d
...
...
@@ -599,7 +599,6 @@ DECLARE_CMP_FUNC(b, 2)
static
const
cmp_func
cmp_funcs
[]
=
{
cmp_r
,
cmp_g
,
cmp_b
};
static
int
get_next_color
(
const
uint8_t
*
color_used
,
const
uint32_t
*
palette
,
const
int
trans_thresh
,
int
*
component
,
const
struct
color_rect
*
box
)
{
int
wr
,
wg
,
wb
;
...
...
@@ -619,10 +618,6 @@ static int get_next_color(const uint8_t *color_used, const uint32_t *palette,
const
uint8_t
g
=
c
>>
8
&
0xff
;
const
uint8_t
b
=
c
&
0xff
;
if
(
a
<
trans_thresh
)
{
continue
;
}
if
(
color_used
[
i
]
||
(
a
!=
0xff
)
||
r
<
box
->
min
[
0
]
||
g
<
box
->
min
[
1
]
||
b
<
box
->
min
[
2
]
||
r
>
box
->
max
[
0
]
||
g
>
box
->
max
[
1
]
||
b
>
box
->
max
[
2
])
...
...
@@ -674,7 +669,7 @@ static int colormap_insert(struct color_node *map,
int
node_left_id
=
-
1
,
node_right_id
=
-
1
;
struct
color_node
*
node
;
struct
color_rect
box1
,
box2
;
const
int
pal_id
=
get_next_color
(
color_used
,
palette
,
trans_thresh
,
&
component
,
box
);
const
int
pal_id
=
get_next_color
(
color_used
,
palette
,
&
component
,
box
);
if
(
pal_id
<
0
)
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment