mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
libavcodec/libaomenc.c: Add command-line options for inter-coding tools
Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: James Zern <jzern@google.com>
This commit is contained in:
parent
498ad7b37c
commit
017bf9643f
@ -1649,6 +1649,42 @@ Use DCT only for INTER modes. Default is false.
|
||||
@item use-intra-default-tx-only (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use Default-transform only for INTRA modes. Default is false.
|
||||
|
||||
@item enable-ref-frame-mvs (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable temporal mv prediction. Default is true.
|
||||
|
||||
@item enable-reduced-reference-set (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use reduced set of single and compound references. Default is false.
|
||||
|
||||
@item enable-obmc (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable obmc. Default is true.
|
||||
|
||||
@item enable-dual-filter (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable dual filter. Default is true.
|
||||
|
||||
@item enable-diff-wtd-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable difference-weighted compound. Default is true.
|
||||
|
||||
@item enable-dist-wtd-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable distance-weighted compound. Default is true.
|
||||
|
||||
@item enable-onesided-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable one sided compound. Default is true.
|
||||
|
||||
@item enable-interinter-wedge (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interinter wedge compound. Default is true.
|
||||
|
||||
@item enable-interintra-wedge (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interintra wedge compound. Default is true.
|
||||
|
||||
@item enable-masked-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable masked compound. Default is true.
|
||||
|
||||
@item enable-interintra-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interintra compound. Default is true.
|
||||
|
||||
@item enable-smooth-interintra (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable smooth interintra mode. Default is true.
|
||||
|
||||
@end table
|
||||
|
||||
@section libkvazaar
|
||||
|
@ -112,6 +112,18 @@ typedef struct AOMEncoderContext {
|
||||
int use_intra_dct_only;
|
||||
int use_inter_dct_only;
|
||||
int use_intra_default_tx_only;
|
||||
int enable_ref_frame_mvs;
|
||||
int enable_interinter_wedge;
|
||||
int enable_interintra_wedge;
|
||||
int enable_interintra_comp;
|
||||
int enable_masked_comp;
|
||||
int enable_obmc;
|
||||
int enable_onesided_comp;
|
||||
int enable_reduced_reference_set;
|
||||
int enable_smooth_interintra;
|
||||
int enable_diff_wtd_comp;
|
||||
int enable_dist_wtd_comp;
|
||||
int enable_dual_filter;
|
||||
} AOMContext;
|
||||
|
||||
static const char *const ctlidstr[] = {
|
||||
@ -168,6 +180,18 @@ static const char *const ctlidstr[] = {
|
||||
[AV1E_SET_INTER_DCT_ONLY] = "AV1E_SET_INTER_DCT_ONLY",
|
||||
[AV1E_SET_INTRA_DEFAULT_TX_ONLY] = "AV1E_SET_INTRA_DEFAULT_TX_ONLY",
|
||||
[AV1E_SET_REDUCED_TX_TYPE_SET] = "AV1E_SET_REDUCED_TX_TYPE_SET",
|
||||
[AV1E_SET_ENABLE_DIFF_WTD_COMP] = "AV1E_SET_ENABLE_DIFF_WTD_COMP",
|
||||
[AV1E_SET_ENABLE_DIST_WTD_COMP] = "AV1E_SET_ENABLE_DIST_WTD_COMP",
|
||||
[AV1E_SET_ENABLE_DUAL_FILTER] = "AV1E_SET_ENABLE_DUAL_FILTER",
|
||||
[AV1E_SET_ENABLE_INTERINTER_WEDGE] = "AV1E_SET_ENABLE_INTERINTER_WEDGE",
|
||||
[AV1E_SET_ENABLE_INTERINTRA_WEDGE] = "AV1E_SET_ENABLE_INTERINTRA_WEDGE",
|
||||
[AV1E_SET_ENABLE_MASKED_COMP] = "AV1E_SET_ENABLE_MASKED_COMP",
|
||||
[AV1E_SET_ENABLE_INTERINTRA_COMP] = "AV1E_SET_ENABLE_INTERINTRA_COMP",
|
||||
[AV1E_SET_ENABLE_OBMC] = "AV1E_SET_ENABLE_OBMC",
|
||||
[AV1E_SET_ENABLE_ONESIDED_COMP] = "AV1E_SET_ENABLE_ONESIDED_COMP",
|
||||
[AV1E_SET_REDUCED_REFERENCE_SET] = "AV1E_SET_REDUCED_REFERENCE_SET",
|
||||
[AV1E_SET_ENABLE_SMOOTH_INTERINTRA] = "AV1E_SET_ENABLE_SMOOTH_INTERINTRA",
|
||||
[AV1E_SET_ENABLE_REF_FRAME_MVS] = "AV1E_SET_ENABLE_REF_FRAME_MVS",
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -764,6 +788,30 @@ static av_cold int aom_init(AVCodecContext *avctx,
|
||||
codecctl_int(avctx, AV1E_SET_INTRA_DEFAULT_TX_ONLY, ctx->use_intra_default_tx_only);
|
||||
if (ctx->reduced_tx_type_set >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_REDUCED_TX_TYPE_SET, ctx->reduced_tx_type_set);
|
||||
if (ctx->enable_ref_frame_mvs >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_REF_FRAME_MVS, ctx->enable_ref_frame_mvs);
|
||||
if (ctx->enable_reduced_reference_set >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_REDUCED_REFERENCE_SET, ctx->enable_reduced_reference_set);
|
||||
if (ctx->enable_diff_wtd_comp >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_DIFF_WTD_COMP, ctx->enable_diff_wtd_comp);
|
||||
if (ctx->enable_dist_wtd_comp >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_DIST_WTD_COMP, ctx->enable_dist_wtd_comp);
|
||||
if (ctx->enable_dual_filter >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_DUAL_FILTER, ctx->enable_dual_filter);
|
||||
if (ctx->enable_interinter_wedge >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_INTERINTER_WEDGE, ctx->enable_interinter_wedge);
|
||||
if (ctx->enable_masked_comp >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_MASKED_COMP, ctx->enable_masked_comp);
|
||||
if (ctx->enable_interintra_comp >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_INTERINTRA_COMP, ctx->enable_interintra_comp);
|
||||
if (ctx->enable_interintra_wedge >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_INTERINTRA_WEDGE, ctx->enable_interintra_wedge);
|
||||
if (ctx->enable_obmc >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_OBMC, ctx->enable_obmc);
|
||||
if (ctx->enable_onesided_comp >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_ONESIDED_COMP, ctx->enable_onesided_comp);
|
||||
if (ctx->enable_smooth_interintra >= 0)
|
||||
codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTERINTRA, ctx->enable_smooth_interintra);
|
||||
#endif
|
||||
|
||||
codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
|
||||
@ -1201,6 +1249,18 @@ static const AVOption options[] = {
|
||||
{ "use-intra-dct-only", "Use DCT only for INTRA modes", OFFSET(use_intra_dct_only), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "use-inter-dct-only", "Use DCT only for INTER modes", OFFSET(use_inter_dct_only), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "use-intra-default-tx-only", "Use default-transform only for INTRA modes", OFFSET(use_intra_default_tx_only), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-ref-frame-mvs", "Enable temporal mv prediction", OFFSET(enable_ref_frame_mvs), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-reduced-reference-set", "Use reduced set of single and compound references", OFFSET(enable_reduced_reference_set), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-obmc", "Enable obmc", OFFSET(enable_obmc), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-dual-filter", "Enable dual filter", OFFSET(enable_dual_filter), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-diff-wtd-comp", "Enable difference-weighted compound", OFFSET(enable_diff_wtd_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-dist-wtd-comp", "Enable distance-weighted compound", OFFSET(enable_dist_wtd_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-onesided-comp", "Enable one sided compound", OFFSET(enable_onesided_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-interinter-wedge", "Enable interinter wedge compound", OFFSET(enable_interinter_wedge), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-interintra-wedge", "Enable interintra wedge compound", OFFSET(enable_interintra_wedge), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-masked-comp", "Enable masked compound", OFFSET(enable_masked_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-interintra-comp", "Enable interintra compound", OFFSET(enable_interintra_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ "enable-smooth-interintra", "Enable smooth interintra mode", OFFSET(enable_smooth_interintra), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 58
|
||||
#define LIBAVCODEC_VERSION_MINOR 97
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
#define LIBAVCODEC_VERSION_MICRO 102
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user