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
e47a9546
Commit
e47a9546
authored
Dec 25, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/librav1e: use AV_OPT_TYPE_DICT for rav1e-params
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
a613d042
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
librav1e.c
libavcodec/librav1e.c
+7
-12
No files found.
libavcodec/librav1e.c
View file @
e47a9546
...
...
@@ -42,7 +42,7 @@ typedef struct librav1eContext {
size_t
pass_pos
;
int
pass_size
;
char
*
rav1e_opts
;
AVDictionary
*
rav1e_opts
;
int
quantizer
;
int
speed
;
int
tiles
;
...
...
@@ -244,18 +244,13 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx)
}
}
if
(
ctx
->
rav1e_opts
)
{
AVDictionary
*
dict
=
NULL
;
{
AVDictionaryEntry
*
en
=
NULL
;
if
(
!
av_dict_parse_string
(
&
dict
,
ctx
->
rav1e_opts
,
"="
,
":"
,
0
))
{
while
(
en
=
av_dict_get
(
dict
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
))
{
while
((
en
=
av_dict_get
(
ctx
->
rav1e_opts
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
int
parse_ret
=
rav1e_config_parse
(
cfg
,
en
->
key
,
en
->
value
);
if
(
parse_ret
<
0
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid value for %s: %s.
\n
"
,
en
->
key
,
en
->
value
);
}
av_dict_free
(
&
dict
);
}
}
rret
=
rav1e_config_parse_int
(
cfg
,
"width"
,
avctx
->
width
);
...
...
@@ -538,7 +533,7 @@ static const AVOption options[] = {
{
"tiles"
,
"number of tiles encode with"
,
OFFSET
(
tiles
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
-
1
,
INT64_MAX
,
VE
},
{
"tile-rows"
,
"number of tiles rows to encode with"
,
OFFSET
(
tile_rows
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
-
1
,
INT64_MAX
,
VE
},
{
"tile-columns"
,
"number of tiles columns to encode with"
,
OFFSET
(
tile_cols
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
-
1
,
INT64_MAX
,
VE
},
{
"rav1e-params"
,
"set the rav1e configuration using a :-separated list of key=value parameters"
,
OFFSET
(
rav1e_opts
),
AV_OPT_TYPE_
STRING
,
{
0
},
0
,
0
,
VE
},
{
"rav1e-params"
,
"set the rav1e configuration using a :-separated list of key=value parameters"
,
OFFSET
(
rav1e_opts
),
AV_OPT_TYPE_
DICT
,
{
0
},
0
,
0
,
VE
},
{
NULL
}
};
...
...
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