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
32fed702
Commit
32fed702
authored
Dec 17, 2015
by
Timothy Gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxenc: Allow setting tune parameter
parent
671761d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
encoders.texi
doc/encoders.texi
+6
-0
libvpxenc.c
libavcodec/libvpxenc.c
+8
-0
No files found.
doc/encoders.texi
View file @
32fed702
...
@@ -1584,6 +1584,12 @@ follows: @code{(minrate * 100 / bitrate)}.
...
@@ -1584,6 +1584,12 @@ follows: @code{(minrate * 100 / bitrate)}.
@item crf (@emph{end-usage=cq}, @emph{cq-level})
@item crf (@emph{end-usage=cq}, @emph{cq-level})
@item tune (@emph{tune})
@table @samp
@item psnr (@emph{psnr})
@item ssim (@emph{ssim})
@end table
@item quality, deadline (@emph{deadline})
@item quality, deadline (@emph{deadline})
@table @samp
@table @samp
@item best
@item best
...
...
libavcodec/libvpxenc.c
View file @
32fed702
...
@@ -88,6 +88,8 @@ typedef struct VP8EncoderContext {
...
@@ -88,6 +88,8 @@ typedef struct VP8EncoderContext {
int
arnr_strength
;
int
arnr_strength
;
int
arnr_type
;
int
arnr_type
;
int
tune
;
int
lag_in_frames
;
int
lag_in_frames
;
int
error_resilient
;
int
error_resilient
;
int
crf
;
int
crf
;
...
@@ -116,6 +118,7 @@ static const char *const ctlidstr[] = {
...
@@ -116,6 +118,7 @@ static const char *const ctlidstr[] = {
[
VP8E_SET_ARNR_MAXFRAMES
]
=
"VP8E_SET_ARNR_MAXFRAMES"
,
[
VP8E_SET_ARNR_MAXFRAMES
]
=
"VP8E_SET_ARNR_MAXFRAMES"
,
[
VP8E_SET_ARNR_STRENGTH
]
=
"VP8E_SET_ARNR_STRENGTH"
,
[
VP8E_SET_ARNR_STRENGTH
]
=
"VP8E_SET_ARNR_STRENGTH"
,
[
VP8E_SET_ARNR_TYPE
]
=
"VP8E_SET_ARNR_TYPE"
,
[
VP8E_SET_ARNR_TYPE
]
=
"VP8E_SET_ARNR_TYPE"
,
[
VP8E_SET_TUNING
]
=
"VP8E_SET_TUNING"
,
[
VP8E_SET_CQ_LEVEL
]
=
"VP8E_SET_CQ_LEVEL"
,
[
VP8E_SET_CQ_LEVEL
]
=
"VP8E_SET_CQ_LEVEL"
,
[
VP8E_SET_MAX_INTRA_BITRATE_PCT
]
=
"VP8E_SET_MAX_INTRA_BITRATE_PCT"
,
[
VP8E_SET_MAX_INTRA_BITRATE_PCT
]
=
"VP8E_SET_MAX_INTRA_BITRATE_PCT"
,
#if CONFIG_LIBVPX_VP9_ENCODER
#if CONFIG_LIBVPX_VP9_ENCODER
...
@@ -611,6 +614,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
...
@@ -611,6 +614,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
codecctl_int
(
avctx
,
VP8E_SET_ARNR_STRENGTH
,
ctx
->
arnr_strength
);
codecctl_int
(
avctx
,
VP8E_SET_ARNR_STRENGTH
,
ctx
->
arnr_strength
);
if
(
ctx
->
arnr_type
>=
0
)
if
(
ctx
->
arnr_type
>=
0
)
codecctl_int
(
avctx
,
VP8E_SET_ARNR_TYPE
,
ctx
->
arnr_type
);
codecctl_int
(
avctx
,
VP8E_SET_ARNR_TYPE
,
ctx
->
arnr_type
);
if
(
ctx
->
tune
>=
0
)
codecctl_int
(
avctx
,
VP8E_SET_TUNING
,
ctx
->
tune
);
if
(
CONFIG_LIBVPX_VP8_ENCODER
&&
avctx
->
codec_id
==
AV_CODEC_ID_VP8
)
{
if
(
CONFIG_LIBVPX_VP8_ENCODER
&&
avctx
->
codec_id
==
AV_CODEC_ID_VP8
)
{
#if FF_API_PRIVATE_OPT
#if FF_API_PRIVATE_OPT
...
@@ -1010,6 +1015,9 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -1010,6 +1015,9 @@ static int vp8_encode(AVCodecContext *avctx, AVPacket *pkt,
{ "backward", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 0, VE, "arnr_type" }, \
{ "backward", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 0, VE, "arnr_type" }, \
{ "forward", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 0, VE, "arnr_type" }, \
{ "forward", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 0, VE, "arnr_type" }, \
{ "centered", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 3}, 0, 0, VE, "arnr_type" }, \
{ "centered", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 3}, 0, 0, VE, "arnr_type" }, \
{ "tune", "Tune the encoding to a specific scenario", OFFSET(tune), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VE, "tune"}, \
{ "psnr", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VP8_TUNE_PSNR}, 0, 0, VE, "tune"}, \
{ "ssim", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VP8_TUNE_SSIM}, 0, 0, VE, "tune"}, \
{ "deadline", "Time to spend encoding, in microseconds.", OFFSET(deadline), AV_OPT_TYPE_INT, {.i64 = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"}, \
{ "deadline", "Time to spend encoding, in microseconds.", OFFSET(deadline), AV_OPT_TYPE_INT, {.i64 = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"}, \
{ "best", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VPX_DL_BEST_QUALITY}, 0, 0, VE, "quality"}, \
{ "best", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VPX_DL_BEST_QUALITY}, 0, 0, VE, "quality"}, \
{ "good", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VPX_DL_GOOD_QUALITY}, 0, 0, VE, "quality"}, \
{ "good", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = VPX_DL_GOOD_QUALITY}, 0, 0, VE, "quality"}, \
...
...
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