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
7c3941b2
Commit
7c3941b2
authored
May 04, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/lut3d: support 3DLUTSIZE directive for Davinci files.
Fixes Ticket #2847.
parent
3316556c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
vf_lut3d.c
libavfilter/vf_lut3d.c
+15
-8
No files found.
libavfilter/vf_lut3d.c
View file @
7c3941b2
...
...
@@ -262,21 +262,29 @@ static int skip_line(const char *p)
} \
} while (loop_cond)
/* Basically r g and b float values on each line
; seems to be generated by
* Davinci */
/* Basically r g and b float values on each line
, with a facultative 3DLUTSIZE
*
directive; seems to be generated by
Davinci */
static
int
parse_dat
(
AVFilterContext
*
ctx
,
FILE
*
f
)
{
LUT3DContext
*
lut3d
=
ctx
->
priv
;
c
onst
int
size
=
lut3d
->
lutsize
;
int
i
,
j
,
k
;
c
har
line
[
MAX_LINE_SIZE
]
;
int
i
,
j
,
k
,
size
;
lut3d
->
lutsize
=
size
=
33
;
NEXT_LINE
(
skip_line
(
line
));
if
(
!
strncmp
(
line
,
"3DLUTSIZE "
,
10
))
{
lut3d
->
lutsize
=
size
=
strtol
(
line
+
10
,
NULL
,
0
);
NEXT_LINE
(
skip_line
(
line
));
}
for
(
k
=
0
;
k
<
size
;
k
++
)
{
for
(
j
=
0
;
j
<
size
;
j
++
)
{
for
(
i
=
0
;
i
<
size
;
i
++
)
{
char
line
[
MAX_LINE_SIZE
];
struct
rgbvec
*
vec
=
&
lut3d
->
lut
[
k
][
j
][
i
];
NEXT_LINE
(
skip_line
(
line
));
sscanf
(
line
,
"%f %f %f"
,
&
vec
->
r
,
&
vec
->
g
,
&
vec
->
b
);
if
(
k
!=
0
||
j
!=
0
||
i
!=
0
)
NEXT_LINE
(
skip_line
(
line
));
if
(
sscanf
(
line
,
"%f %f %f"
,
&
vec
->
r
,
&
vec
->
g
,
&
vec
->
b
)
!=
3
)
return
AVERROR_INVALIDDATA
;
}
}
}
...
...
@@ -569,7 +577,6 @@ static av_cold int lut3d_init(AVFilterContext *ctx)
ext
++
;
if
(
!
av_strcasecmp
(
ext
,
"dat"
))
{
lut3d
->
lutsize
=
33
;
ret
=
parse_dat
(
ctx
,
f
);
}
else
if
(
!
av_strcasecmp
(
ext
,
"3dl"
))
{
ret
=
parse_3dl
(
ctx
,
f
);
...
...
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