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
452d611f
Commit
452d611f
authored
Apr 26, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_lut3d: allow to control when to upload CLUT for haldclut
parent
1da3394a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
filters.texi
doc/filters.texi
+4
-0
lut3d.h
libavfilter/lut3d.h
+2
-0
vf_lut3d.c
libavfilter/vf_lut3d.c
+14
-6
No files found.
doc/filters.texi
View file @
452d611f
...
...
@@ -13793,6 +13793,10 @@ The Hald CLUT input can be a simple picture or a complete video stream.
The filter accepts the following options:
@table @option
@item clut
Set which CLUT video frames will be processed from second input stream,
can be @var{first} or @var{all}. Default is @var{all}.
@item shortest
Force termination when the shortest input terminates. Default is @code{0}.
@item repeatlast
...
...
libavfilter/lut3d.h
View file @
452d611f
...
...
@@ -66,6 +66,8 @@ typedef struct LUT3DContext {
avfilter_action_func
*
interp
;
Lut3DPreLut
prelut
;
#if CONFIG_HALDCLUT_FILTER
int
clut
;
int
got_clut
;
uint8_t
clut_rgba_map
[
4
];
int
clut_step
;
int
clut_bits
;
...
...
libavfilter/vf_lut3d.c
View file @
452d611f
...
...
@@ -1217,6 +1217,11 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
static
const
AVOption
lut3d_haldclut_options
[]
=
{
#if CONFIG_LUT3D_FILTER
{
"file"
,
"set 3D LUT file name"
,
OFFSET
(
file
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
.
flags
=
FLAGS
},
#endif
#if CONFIG_HALDCLUT_FILTER
{
"clut"
,
"when to process CLUT"
,
OFFSET
(
clut
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
.
flags
=
TFLAGS
,
"clut"
},
{
"first"
,
"process only first CLUT, ignore rest"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
.
flags
=
TFLAGS
,
"clut"
},
{
"all"
,
"process all CLUTs"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
.
flags
=
TFLAGS
,
"clut"
},
#endif
COMMON_OPTIONS
};
...
...
@@ -1519,12 +1524,15 @@ static int update_apply_clut(FFFrameSync *fs)
return
ret
;
if
(
!
second
)
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
master
);
if
(
lut3d
->
clut_float
)
update_clut_float
(
ctx
->
priv
,
second
);
else
if
(
lut3d
->
clut_planar
)
update_clut_planar
(
ctx
->
priv
,
second
);
else
update_clut_packed
(
ctx
->
priv
,
second
);
if
(
lut3d
->
clut
||
!
lut3d
->
got_clut
)
{
if
(
lut3d
->
clut_float
)
update_clut_float
(
ctx
->
priv
,
second
);
else
if
(
lut3d
->
clut_planar
)
update_clut_planar
(
ctx
->
priv
,
second
);
else
update_clut_packed
(
ctx
->
priv
,
second
);
lut3d
->
got_clut
=
1
;
}
out
=
apply_lut
(
inlink
,
master
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
out
);
}
...
...
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