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
9ac1066d
Commit
9ac1066d
authored
Dec 25, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libvpxenc: use AV_OPT_TYPE_DICT for ts-parameters
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
710e9f3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
libvpxenc.c
libavcodec/libvpxenc.c
+8
-14
No files found.
libavcodec/libvpxenc.c
View file @
9ac1066d
...
...
@@ -100,7 +100,7 @@ typedef struct VPxEncoderContext {
int
rc_undershoot_pct
;
int
rc_overshoot_pct
;
char
*
vp8_ts_parameters
;
AVDictionary
*
vp8_ts_parameters
;
// VP9-only
int
lossless
;
...
...
@@ -757,19 +757,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
enccfg
.
g_error_resilient
=
ctx
->
error_resilient
||
ctx
->
flags
&
VP8F_ERROR_RESILIENT
;
if
(
CONFIG_LIBVPX_VP8_ENCODER
&&
avctx
->
codec_id
==
AV_CODEC_ID_VP8
&&
ctx
->
vp8_ts_parameters
)
{
AVDictionary
*
dict
=
NULL
;
if
(
CONFIG_LIBVPX_VP8_ENCODER
&&
avctx
->
codec_id
==
AV_CODEC_ID_VP8
)
{
AVDictionaryEntry
*
en
=
NULL
;
if
(
!
av_dict_parse_string
(
&
dict
,
ctx
->
vp8_ts_parameters
,
"="
,
":"
,
0
))
{
while
((
en
=
av_dict_get
(
dict
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
if
(
vp8_ts_param_parse
(
&
enccfg
,
en
->
key
,
en
->
value
)
<
0
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"Error parsing option '%s = %s'.
\n
"
,
en
->
key
,
en
->
value
);
}
av_dict_free
(
&
dict
);
while
((
en
=
av_dict_get
(
ctx
->
vp8_ts_parameters
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
if
(
vp8_ts_param_parse
(
&
enccfg
,
en
->
key
,
en
->
value
)
<
0
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"Error parsing option '%s = %s'.
\n
"
,
en
->
key
,
en
->
value
);
}
}
...
...
@@ -1462,7 +1456,7 @@ static const AVOption vp8_options[] = {
"frames (2-pass only)"
,
OFFSET
(
auto_alt_ref
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
2
,
VE
},
{
"cpu-used"
,
"Quality/Speed ratio modifier"
,
OFFSET
(
cpu_used
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
-
16
,
16
,
VE
},
{
"ts-parameters"
,
"Temporal scaling configuration using a "
":-separated list of key=value parameters"
,
OFFSET
(
vp8_ts_parameters
),
AV_OPT_TYPE_
STRING
,
{.
str
=
NULL
},
0
,
0
,
VE
},
":-separated list of key=value parameters"
,
OFFSET
(
vp8_ts_parameters
),
AV_OPT_TYPE_
DICT
,
{.
str
=
NULL
},
0
,
0
,
VE
},
LEGACY_OPTIONS
{
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