Clean up get_arf_src_index()

Localize data structure access.

Change-Id: I1d205ae0b621bd1fe07e9beaafb063c39fed2ad4
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index 2f2b3c7..51a5cb2 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -446,13 +446,9 @@
 
 // If this is an alt-ref, returns the offset of the source frame used
 // as the arf midpoint. Otherwise, returns 0.
-static int get_arf_src_index(AV1_COMP *cpi) {
+static int get_arf_src_index(GF_GROUP *gf_group, int pass) {
   int arf_src_index = 0;
-  if (cpi->oxcf.pass != 1) {
-    const GF_GROUP *const gf_group = &cpi->gf_group;
-    arf_src_index = gf_group->arf_src_offset[gf_group->index];
-  }
-
+  if (pass != 1) arf_src_index = gf_group->arf_src_offset[gf_group->index];
   return arf_src_index;
 }
 
@@ -530,7 +526,7 @@
   *code_arf = 0;
 
   // Should we encode an alt-ref frame.
-  int arf_src_index = get_arf_src_index(cpi);
+  int arf_src_index = get_arf_src_index(&cpi->gf_group, cpi->oxcf.pass);
   if (arf_src_index &&
       is_forced_keyframe_pending(cpi->lookahead, arf_src_index)) {
     arf_src_index = 0;