Modify the warped motion mode context

Modified the warped motion mode context based on neighbor's motion modes
and current block's mode.

Change-Id: I77ca35fab37ec640bb38661ff1799f643d5aafdc
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4b18e9a..3b50a6b 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -325,9 +325,22 @@
                        xd->tile_ctx->obmc_cdf[mbmi->sb_type], 2);
       break;
     default:
+#if CONFIG_EXT_WARPED_MOTION
+    {
+      int wm_ctx = 0;
+      if (mbmi->wm_ctx != -1) {
+        wm_ctx = 1;
+        if (mbmi->mode == NEARESTMV) wm_ctx = 2;
+      }
+      aom_write_symbol(w, mbmi->motion_mode,
+                       xd->tile_ctx->motion_mode_cdf[wm_ctx][mbmi->sb_type],
+                       MOTION_MODES);
+    }
+#else
       aom_write_symbol(w, mbmi->motion_mode,
                        xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
                        MOTION_MODES);
+#endif  // CONFIG_EXT_WARPED_MOTION
   }
 }