Signed-off-by: Wang Cao <wang...@google.com>
---
 doc/encoders.texi      | 36 +++++++++++++++++++++++++
 libavcodec/libaomenc.c | 61 ++++++++++++++++++++++++++++++++++++++++++
 libavcodec/version.h   |  2 +-
 3 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 329c887ce0..c1c5a9c9ca 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1689,6 +1689,42 @@ Use DCT only for INTER modes. Default is false.
 @item use-intra-default-tx-only (@emph{boolean})
 Use Default-transform only for INTRA modes. Default is false.
 
+@item enable-ref-frame-mvs (@emph{boolean})
+Enable temporal mv prediction (default is 1)
+
+@item enable-reduced-reference-set (@emph{boolean})
+Use reduced set of single and compound references  (0: off (default), 1: on)
+
+@item enable-obmc (@emph{boolean})
+Enable obmc (0: false, 1: true (default))
+
+@item enable-dual-filter (@emph{boolean})
+Enable dual filter (0: false, 1: true (default))
+
+@item enable-diff-wtd-comp (@emph{boolean})
+Enable difference-weighted compound (0: false, 1: true (default))
+
+@item enable-dist-wtd-comp (@emph{boolean})
+Enable distance-weighted compound (0: false, 1: true (default))
+
+@item enable-onesided-comp (@emph{boolean})
+Enable one sided compound (0: false, 1: true (default))
+
+@item enable-interinter-wedge (@emph{boolean})
+Enable interinter wedge compound (0: false, 1: true (default))
+
+@item enable-interintra-wedge (@emph{boolean})
+Enable interintra wedge compound (0: false, 1: true (default))
+
+@item enable-masked-comp (@emph{boolean})
+Enable masked compound (0: false, 1: true (default))
+
+@item enable-interintra-comp (@emph{boolean})
+Enable interintra compound (0: false, 1: true (default))
+
+@item enable-smooth-interintra (@emph{boolean})
+Enable smooth interintra mode (0: false, 1: true (default))
+
 @end table
 
 
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 745d7e09fc..3eed019ef3 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -118,6 +118,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[] = {
@@ -174,6 +186,19 @@ 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_ALLOW_WARPED_MOTION]      = "AV1E_SET_ALLOW_WARPED_MOTION",
+    [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",
 };
 
 static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
@@ -789,6 +814,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);
 
 
     codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
@@ -1226,6 +1275,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 INTRA 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 (default 
is 1)",                                 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  (0: off (default), 1: on)", OFFSET(enable_reduced_reference_set), 
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-obmc",                  "Enable obmc (0: false, 1: true 
(default))",                                    OFFSET(enable_obmc),            
      AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-dual-filter",           "Enable dual filter (0: false, 1: true 
(default))",                             OFFSET(enable_dual_filter),           
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-diff-wtd-comp",         "Enable difference-weighted compound (0: 
false, 1: true (default))",            OFFSET(enable_diff_wtd_comp),         
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-dist-wtd-comp",         "Enable distance-weighted compound (0: 
false, 1: true (default))",              OFFSET(enable_dist_wtd_comp),         
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-onesided-comp",         "Enable one sided compound (0: false, 1: 
true (default))",                      OFFSET(enable_onesided_comp),         
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-interinter-wedge",      "Enable interinter wedge compound (0: 
false, 1: true (default))",               OFFSET(enable_interinter_wedge),      
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-interintra-wedge",      "Enable interintra wedge compound (0: 
false, 1: true (default))",               OFFSET(enable_interintra_wedge),      
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-masked-comp",           "Enable masked compound (0: false, 1: 
true (default))",                         OFFSET(enable_masked_comp),           
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-interintra-comp",       "Enable interintra compound (0: false, 
1: true (default))",                     OFFSET(enable_interintra_comp),       
AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
+    { "enable-smooth-interintra",     "Enable smooth interintra mode (0: 
false, 1: true (default))",                  OFFSET(enable_smooth_interintra),  
   AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
     { NULL },
 };
 
diff --git a/libavcodec/version.h b/libavcodec/version.h
index bfe6abd92f..d9b74642aa 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  93
-#define LIBAVCODEC_VERSION_MICRO 104
+#define LIBAVCODEC_VERSION_MICRO 105
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
-- 
2.27.0.111.gc72c7da667-goog

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to