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
3ee59939
Commit
3ee59939
authored
Nov 18, 2016
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxenc: Support targeting a VP9 level
Levels are specified at
https://www.webmproject.org/vp9/levels/
parent
81147b55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
libvpxenc.c
libavcodec/libvpxenc.c
+10
-0
No files found.
libavcodec/libvpxenc.c
View file @
3ee59939
...
@@ -107,6 +107,7 @@ typedef struct VPxEncoderContext {
...
@@ -107,6 +107,7 @@ typedef struct VPxEncoderContext {
int
drop_threshold
;
int
drop_threshold
;
int
noise_sensitivity
;
int
noise_sensitivity
;
int
vpx_cs
;
int
vpx_cs
;
float
level
;
}
VPxContext
;
}
VPxContext
;
/** String mappings for enum vp8e_enc_control_id */
/** String mappings for enum vp8e_enc_control_id */
...
@@ -134,6 +135,9 @@ static const char *const ctlidstr[] = {
...
@@ -134,6 +135,9 @@ static const char *const ctlidstr[] = {
#if VPX_ENCODER_ABI_VERSION >= 11
#if VPX_ENCODER_ABI_VERSION >= 11
[
VP9E_SET_COLOR_RANGE
]
=
"VP9E_SET_COLOR_RANGE"
,
[
VP9E_SET_COLOR_RANGE
]
=
"VP9E_SET_COLOR_RANGE"
,
#endif
#endif
#if VPX_ENCODER_ABI_VERSION >= 12
[
VP9E_SET_TARGET_LEVEL
]
=
"VP9E_SET_TARGET_LEVEL"
,
#endif
#endif
#endif
};
};
...
@@ -679,6 +683,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
...
@@ -679,6 +683,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
#endif
#endif
#if VPX_ENCODER_ABI_VERSION >= 11
#if VPX_ENCODER_ABI_VERSION >= 11
set_color_range
(
avctx
);
set_color_range
(
avctx
);
#endif
#if VPX_ENCODER_ABI_VERSION >= 12
codecctl_int
(
avctx
,
VP9E_SET_TARGET_LEVEL
,
ctx
->
level
<
0
?
255
:
lrint
(
ctx
->
level
*
10
));
#endif
#endif
}
}
#endif
#endif
...
@@ -1089,6 +1096,9 @@ static const AVOption vp9_options[] = {
...
@@ -1089,6 +1096,9 @@ static const AVOption vp9_options[] = {
{
"variance"
,
"Variance based Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
VE
,
"aq_mode"
},
{
"variance"
,
"Variance based Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
VE
,
"aq_mode"
},
{
"complexity"
,
"Complexity based Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
VE
,
"aq_mode"
},
{
"complexity"
,
"Complexity based Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
VE
,
"aq_mode"
},
{
"cyclic"
,
"Cyclic Refresh Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
3
},
0
,
0
,
VE
,
"aq_mode"
},
{
"cyclic"
,
"Cyclic Refresh Aq"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
3
},
0
,
0
,
VE
,
"aq_mode"
},
#if VPX_ENCODER_ABI_VERSION >= 12
{
"level"
,
"Specify level"
,
OFFSET
(
level
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=-
1
},
-
1
,
6
.
2
,
VE
},
#endif
LEGACY_OPTIONS
LEGACY_OPTIONS
{
NULL
}
{
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