Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ba1cbf40
Commit
ba1cbf40
authored
Jan 01, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/lut: use ff_fill_rgba_map()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
fde13052
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
vf_lut.c
libavfilter/vf_lut.c
+3
-9
No files found.
libavfilter/vf_lut.c
View file @
ba1cbf40
...
...
@@ -29,6 +29,7 @@
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
...
...
@@ -175,7 +176,7 @@ static int config_props(AVFilterLink *inlink)
AVFilterContext
*
ctx
=
inlink
->
dst
;
LutContext
*
lut
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
);
in
t
rgba_map
[
4
];
/* component index -> RGBA color index map */
uint8_
t
rgba_map
[
4
];
/* component index -> RGBA color index map */
int
min
[
4
],
max
[
4
];
int
val
,
comp
,
ret
;
...
...
@@ -208,14 +209,7 @@ static int config_props(AVFilterLink *inlink)
else
if
(
ff_fmt_is_in
(
inlink
->
format
,
rgb_pix_fmts
))
lut
->
is_rgb
=
1
;
if
(
lut
->
is_rgb
)
{
switch
(
inlink
->
format
)
{
case
AV_PIX_FMT_ARGB
:
rgba_map
[
0
]
=
A
;
rgba_map
[
1
]
=
R
;
rgba_map
[
2
]
=
G
;
rgba_map
[
3
]
=
B
;
break
;
case
AV_PIX_FMT_ABGR
:
rgba_map
[
0
]
=
A
;
rgba_map
[
1
]
=
B
;
rgba_map
[
2
]
=
G
;
rgba_map
[
3
]
=
R
;
break
;
case
AV_PIX_FMT_RGBA
:
case
AV_PIX_FMT_RGB24
:
rgba_map
[
0
]
=
R
;
rgba_map
[
1
]
=
G
;
rgba_map
[
2
]
=
B
;
rgba_map
[
3
]
=
A
;
break
;
case
AV_PIX_FMT_BGRA
:
case
AV_PIX_FMT_BGR24
:
rgba_map
[
0
]
=
B
;
rgba_map
[
1
]
=
G
;
rgba_map
[
2
]
=
R
;
rgba_map
[
3
]
=
A
;
break
;
}
ff_fill_rgba_map
(
rgba_map
,
inlink
->
format
);
lut
->
step
=
av_get_bits_per_pixel
(
desc
)
>>
3
;
}
...
...
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