Support for homography in global motion experiment

Change-Id: If4a480633032d8738a84fa8173c6ebd90564f0a4
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4192801..a36f0c9 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3970,7 +3970,14 @@
   av1_write_token(w, av1_global_motion_types_tree, probs,
                   &global_motion_types_encodings[type]);
   switch (type) {
-    case IDENTITY: break;
+    case HOMOGRAPHY:
+        aom_write_primitive_symmetric(
+            w, (params->wmmat[6] >> GM_ROW3HOMO_PREC_DIFF),
+            GM_ABS_ROW3HOMO_BITS);
+        aom_write_primitive_symmetric(
+            w, (params->wmmat[7] >> GM_ROW3HOMO_PREC_DIFF),
+            GM_ABS_ROW3HOMO_BITS);
+    // fallthrough intended
     case AFFINE:
     case ROTZOOM:
       aom_write_primitive_symmetric(
@@ -3979,7 +3986,7 @@
           GM_ABS_ALPHA_BITS);
       aom_write_primitive_symmetric(w, (params->wmmat[3] >> GM_ALPHA_PREC_DIFF),
                                     GM_ABS_ALPHA_BITS);
-      if (type == AFFINE) {
+      if (type == AFFINE || type == HOMOGRAPHY) {
         aom_write_primitive_symmetric(
             w, (params->wmmat[4] >> GM_ALPHA_PREC_DIFF), GM_ABS_ALPHA_BITS);
         aom_write_primitive_symmetric(w,
@@ -3994,6 +4001,7 @@
       aom_write_primitive_symmetric(w, (params->wmmat[1] >> GM_TRANS_PREC_DIFF),
                                     GM_ABS_TRANS_BITS);
       break;
+    case IDENTITY: break;
     default: assert(0);
   }
 }