mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
lavc/libvpxenc: add tune-content option
this matches the vpxenc parameter Signed-off-by: James Zern <jzern@google.com>
This commit is contained in:
parent
4527ec2216
commit
3071434f4d
@ -1681,6 +1681,8 @@ colorspaces:
|
|||||||
@end table
|
@end table
|
||||||
@item row-mt @var{boolean}
|
@item row-mt @var{boolean}
|
||||||
Enable row based multi-threading.
|
Enable row based multi-threading.
|
||||||
|
@item tune-content
|
||||||
|
Set content type: default (0), screen (1), film (2).
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
@ -109,6 +109,7 @@ typedef struct VPxEncoderContext {
|
|||||||
int vpx_cs;
|
int vpx_cs;
|
||||||
float level;
|
float level;
|
||||||
int row_mt;
|
int row_mt;
|
||||||
|
int tune_content;
|
||||||
} VPxContext;
|
} VPxContext;
|
||||||
|
|
||||||
/** String mappings for enum vp8e_enc_control_id */
|
/** String mappings for enum vp8e_enc_control_id */
|
||||||
@ -143,6 +144,9 @@ static const char *const ctlidstr[] = {
|
|||||||
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
||||||
[VP9E_SET_ROW_MT] = "VP9E_SET_ROW_MT",
|
[VP9E_SET_ROW_MT] = "VP9E_SET_ROW_MT",
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT
|
||||||
|
[VP9E_SET_TUNE_CONTENT] = "VP9E_SET_TUNE_CONTENT",
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -709,6 +713,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
||||||
if (ctx->row_mt >= 0)
|
if (ctx->row_mt >= 0)
|
||||||
codecctl_int(avctx, VP9E_SET_ROW_MT, ctx->row_mt);
|
codecctl_int(avctx, VP9E_SET_ROW_MT, ctx->row_mt);
|
||||||
|
#endif
|
||||||
|
#ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT
|
||||||
|
if (ctx->tune_content >= 0)
|
||||||
|
codecctl_int(avctx, VP9E_SET_TUNE_CONTENT, ctx->tune_content);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1139,6 +1147,18 @@ static const AVOption vp9_options[] = {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
#ifdef VPX_CTRL_VP9E_SET_ROW_MT
|
||||||
{"row-mt", "Row based multi-threading", OFFSET(row_mt), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
{"row-mt", "Row based multi-threading", OFFSET(row_mt), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||||
|
#endif
|
||||||
|
#ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT
|
||||||
|
#if VPX_ENCODER_ABI_VERSION >= 14
|
||||||
|
{ "tune-content", "Tune content type", OFFSET(tune_content), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 2, VE, "tune_content" },
|
||||||
|
#else
|
||||||
|
{ "tune-content", "Tune content type", OFFSET(tune_content), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, VE, "tune_content" },
|
||||||
|
#endif
|
||||||
|
{ "default", "Regular video content", 0, AV_OPT_TYPE_CONST, {.i64 = 0}, 0, 0, VE, "tune_content" },
|
||||||
|
{ "screen", "Screen capture content", 0, AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 0, VE, "tune_content" },
|
||||||
|
#if VPX_ENCODER_ABI_VERSION >= 14
|
||||||
|
{ "film", "Film content; improves grain retention", 0, AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 0, VE, "tune_content" },
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
LEGACY_OPTIONS
|
LEGACY_OPTIONS
|
||||||
{ NULL }
|
{ NULL }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user