Refines the recode loop

Uses number of 4x4 blocks using global motion as metric to
decide whether to recode or not.

Improves performance a little.
lowres: -0.658%

Change-Id: I6b1913b7bd31d7a25ca8ca5c75c9b6bb87151a78
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 78ccf6b..72ebc8a 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -4129,18 +4129,19 @@
     // With ref-mv, clearing unused global motion models here is
     // unsafe, and we need to rely on the recode loop to do it
     // instead. See av1_find_mv_refs for details.
-    if (!cpi->global_motion_used[frame]) {
+    if (!cpi->global_motion_used[frame][0]) {
       set_default_gmparams(&cm->global_motion[frame]);
     }
 #endif
     write_global_motion_params(&cm->global_motion[frame],
                                cm->fc->global_motion_types_prob, w);
     /*
-    printf("Frame %d/%d: Enc Ref %d (used %d): %d %d %d %d\n",
+    printf("Frame %d/%d: Enc Ref %d (used %d/%d): %d %d %d %d\n",
            cm->current_video_frame, cm->show_frame, frame,
-           cpi->global_motion_used[frame], cm->global_motion[frame].wmmat[0],
-           cm->global_motion[frame].wmmat[1], cm->global_motion[frame].wmmat[2],
-           cm->global_motion[frame].wmmat[3]);
+           cpi->global_motion_used[frame][0], cpi->global_motion_used[frame][1],
+           cm->global_motion[frame].wmmat[0], cm->global_motion[frame].wmmat[1],
+           cm->global_motion[frame].wmmat[2],
+    cm->global_motion[frame].wmmat[3]);
            */
   }
 }