add SEG_LVL_ZEROMV
Change-Id: Icd04302886a4d12890d04f9f15563169a91e3a0d
diff --git a/av1/common/seg_common.h b/av1/common/seg_common.h
index 8b199e6..6c7cb25 100644
--- a/av1/common/seg_common.h
+++ b/av1/common/seg_common.h
@@ -32,7 +32,12 @@
SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
- SEG_LVL_MAX = 4 // Number of features supported
+#ifdef CONFIG_SEGMENT_ZEROMV
+ SEG_LVL_ZEROMV = 4,
+ SEG_LVL_MAX = 5
+#else
+ SEG_LVL_MAX = 4
+#endif
} SEG_LVL_FEATURES;
struct segmentation {
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 68081e7..ad34ee7 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -2312,7 +2312,12 @@
av1_mode_context_analyzer(inter_mode_ctx, mbmi->ref_frame, bsize, -1);
mbmi->ref_mv_idx = 0;
+#if CONFIG_SEGMENT_ZEROMV
+ if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP) ||
+ segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_ZEROMV)) {
+#else
if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
+#endif
mbmi->mode = ZEROMV;
if (bsize < BLOCK_8X8 && !unify_bsize) {
aom_internal_error(xd->error_info, AOM_CODEC_UNSUP_BITSTREAM,
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 1b1a9a1..90b329a 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -190,6 +190,7 @@
set(CONFIG_SPEED_REFS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SUPERTX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "AV1 experiment flag.")
+set(CONFIG_SEGMENT_ZEROMV 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TPL_MV 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TRIPRED 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TX64X64 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/configure b/configure
index bede745..7f22ace 100755
--- a/configure
+++ b/configure
@@ -321,6 +321,7 @@
lv_map
txk_sel
mv_compress
+ segment_zeromv
frame_superres
new_multisymbol
compound_singleref