vmaf: Fix link error when VMAF enabled in libaom.

Library internals must not call application layer utility functions.
Such functions are not linked into the library and are not available
outside of libaom's tools and examples.

BUG=aomedia:2472

Change-Id: Ib4ad664989d9fd5636d6c686d6ccdc9ec7318762
diff --git a/aom_dsp/vmaf.c b/aom_dsp/vmaf.c
index 83358c1..801fee0 100644
--- a/aom_dsp/vmaf.c
+++ b/aom_dsp/vmaf.c
@@ -8,14 +8,15 @@
  * Media Patent License 1.0 was not distributed with this source code in the
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
+
 #include <assert.h>
 #include <libvmaf/libvmaf.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "aom_dsp/vmaf.h"
 #include "aom_ports/system_state.h"
-#include "common/tools_common.h"
 
 typedef struct FrameData {
   const YV12_BUFFER_CONFIG *source;
@@ -23,6 +24,11 @@
   int frame_set;
 } FrameData;
 
+static void vmaf_fatal_error(const char *message) {
+  fprintf(stderr, "Fatal error: %s\n", message);
+  exit(EXIT_FAILURE);
+}
+
 // A callback function used to pass data to VMAF.
 // Returns 0 after reading a frame.
 // Returns 2 when there is no more frame to read.
@@ -82,7 +88,7 @@
 
   aom_clear_system_state();
   *vmaf = vmaf_score;
-  if (ret) fatal("Failed to compute VMAF scores.");
+  if (ret) vmaf_fatal_error("Failed to compute VMAF scores.");
 }
 
 void aom_calc_vmaf_multi_frame(
@@ -102,7 +108,9 @@
       /*do_ms_ssim=*/0, /*pool_method=*/NULL, /*n_thread=*/0,
       /*n_subsample=*/1, /*enable_conf_interval=*/0);
   FILE *vmaf_log = fopen("vmaf_scores.xml", "r");
-  if (vmaf_log == NULL || ret) fatal("Failed to compute VMAF scores.");
+  if (vmaf_log == NULL || ret) {
+    vmaf_fatal_error("Failed to compute VMAF scores.");
+  }
 
   int frame_index = 0;
   char buf[512];
@@ -114,7 +122,7 @@
         *p2 = '\0';
         const double score = atof(&p[6]);
         if (score < 0.0 || score > 100.0) {
-          fatal("Failed to compute VMAF scores.");
+          vmaf_fatal_error("Failed to compute VMAF scores.");
         }
         vmaf[frame_index++] = score;
       }