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
e4327f97
Commit
e4327f97
authored
Sep 26, 2021
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_colorchannelmixer: simplify code a little
parent
34102f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
vf_colorchannelmixer.c
libavfilter/vf_colorchannelmixer.c
+4
-16
No files found.
libavfilter/vf_colorchannelmixer.c
View file @
e4327f97
...
...
@@ -145,10 +145,6 @@ static av_always_inline int filter_slice_rgba_planar(AVFilterContext *ctx, void
const
uint8_t
bin
=
srcb
[
j
];
const
uint8_t
ain
=
have_alpha
?
srca
[
j
]
:
0
;
int
rout
,
gout
,
bout
;
float
lin
;
if
(
pl
)
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
rout
=
s
->
lut
[
R
][
R
][
rin
]
+
s
->
lut
[
R
][
G
][
gin
]
+
...
...
@@ -164,6 +160,7 @@ static av_always_inline int filter_slice_rgba_planar(AVFilterContext *ctx, void
(
have_alpha
==
1
?
s
->
lut
[
B
][
A
][
ain
]
:
0
);
if
(
pl
)
{
float
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
float
frout
=
rout
/
sr
;
float
fgout
=
gout
/
sg
;
float
fbout
=
bout
/
sb
;
...
...
@@ -231,10 +228,6 @@ static av_always_inline int filter_slice_rgba16_planar(AVFilterContext *ctx, voi
const
uint16_t
bin
=
srcb
[
j
];
const
uint16_t
ain
=
have_alpha
?
srca
[
j
]
:
0
;
int
rout
,
gout
,
bout
;
float
lin
;
if
(
pl
)
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
rout
=
s
->
lut
[
R
][
R
][
rin
]
+
s
->
lut
[
R
][
G
][
gin
]
+
...
...
@@ -250,6 +243,7 @@ static av_always_inline int filter_slice_rgba16_planar(AVFilterContext *ctx, voi
(
have_alpha
==
1
?
s
->
lut
[
B
][
A
][
ain
]
:
0
);
if
(
pl
)
{
float
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
float
frout
=
rout
/
sr
;
float
fgout
=
gout
/
sg
;
float
fbout
=
bout
/
sb
;
...
...
@@ -418,10 +412,6 @@ static av_always_inline int filter_slice_rgba_packed(AVFilterContext *ctx, void
const
uint8_t
bin
=
src
[
j
+
boffset
];
const
uint8_t
ain
=
src
[
j
+
aoffset
];
int
rout
,
gout
,
bout
;
float
lin
;
if
(
pl
)
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
rout
=
s
->
lut
[
R
][
R
][
rin
]
+
s
->
lut
[
R
][
G
][
gin
]
+
...
...
@@ -437,6 +427,7 @@ static av_always_inline int filter_slice_rgba_packed(AVFilterContext *ctx, void
(
have_alpha
==
1
?
s
->
lut
[
B
][
A
][
ain
]
:
0
);
if
(
pl
)
{
float
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
float
frout
=
rout
/
sr
;
float
fgout
=
gout
/
sg
;
float
fbout
=
bout
/
sb
;
...
...
@@ -500,10 +491,6 @@ static av_always_inline int filter_slice_rgba16_packed(AVFilterContext *ctx, voi
const
uint16_t
bin
=
src
[
j
+
boffset
];
const
uint16_t
ain
=
src
[
j
+
aoffset
];
int
rout
,
gout
,
bout
;
float
lin
;
if
(
pl
)
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
rout
=
s
->
lut
[
R
][
R
][
rin
]
+
s
->
lut
[
R
][
G
][
gin
]
+
...
...
@@ -519,6 +506,7 @@ static av_always_inline int filter_slice_rgba16_packed(AVFilterContext *ctx, voi
(
have_alpha
==
1
?
s
->
lut
[
B
][
A
][
ain
]
:
0
);
if
(
pl
)
{
float
lin
=
FFMAX3
(
rin
,
gin
,
bin
)
+
FFMIN3
(
rin
,
gin
,
bin
);
float
frout
=
rout
/
sr
;
float
fgout
=
gout
/
sg
;
float
fbout
=
bout
/
sb
;
...
...
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