Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
91f64ea4
Commit
91f64ea4
authored
Dec 25, 2019
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libx265: use AV_OPT_TYPE_DICT for x265-params
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
dfea6d2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
libx265.c
libavcodec/libx265.c
+17
-22
No files found.
libavcodec/libx265.c
View file @
91f64ea4
...
...
@@ -47,7 +47,7 @@ typedef struct libx265Context {
char
*
preset
;
char
*
tune
;
char
*
profile
;
char
*
x265_opts
;
AVDictionary
*
x265_opts
;
/**
* If the encoder does not support ROI then warn the first time we
...
...
@@ -336,28 +336,23 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
return
ret
;
}
if
(
ctx
->
x265_opts
)
{
AVDictionary
*
dict
=
NULL
;
{
AVDictionaryEntry
*
en
=
NULL
;
if
(
!
av_dict_parse_string
(
&
dict
,
ctx
->
x265_opts
,
"="
,
":"
,
0
))
{
while
((
en
=
av_dict_get
(
dict
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
int
parse_ret
=
ctx
->
api
->
param_parse
(
ctx
->
params
,
en
->
key
,
en
->
value
);
switch
(
parse_ret
)
{
case
X265_PARAM_BAD_NAME
:
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown option: %s.
\n
"
,
en
->
key
);
break
;
case
X265_PARAM_BAD_VALUE
:
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid value for %s: %s.
\n
"
,
en
->
key
,
en
->
value
);
break
;
default:
break
;
}
while
((
en
=
av_dict_get
(
ctx
->
x265_opts
,
""
,
en
,
AV_DICT_IGNORE_SUFFIX
)))
{
int
parse_ret
=
ctx
->
api
->
param_parse
(
ctx
->
params
,
en
->
key
,
en
->
value
);
switch
(
parse_ret
)
{
case
X265_PARAM_BAD_NAME
:
av_log
(
avctx
,
AV_LOG_WARNING
,
"Unknown option: %s.
\n
"
,
en
->
key
);
break
;
case
X265_PARAM_BAD_VALUE
:
av_log
(
avctx
,
AV_LOG_WARNING
,
"Invalid value for %s: %s.
\n
"
,
en
->
key
,
en
->
value
);
break
;
default:
break
;
}
av_dict_free
(
&
dict
);
}
}
...
...
@@ -645,7 +640,7 @@ static const AVOption options[] = {
{
"preset"
,
"set the x265 preset"
,
OFFSET
(
preset
),
AV_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"tune"
,
"set the x265 tune parameter"
,
OFFSET
(
tune
),
AV_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"profile"
,
"set the x265 profile"
,
OFFSET
(
profile
),
AV_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
VE
},
{
"x265-params"
,
"set the x265 configuration using a :-separated list of key=value parameters"
,
OFFSET
(
x265_opts
),
AV_OPT_TYPE_
STRING
,
{
0
},
0
,
0
,
VE
},
{
"x265-params"
,
"set the x265 configuration using a :-separated list of key=value parameters"
,
OFFSET
(
x265_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