test/: apply clang-format

Change-Id: I1138fbeff5f63beb5c0de2c357793da12502d453
diff --git a/test/arf_freq_test.cc b/test/arf_freq_test.cc
index 4f4a75c..9c00ded 100644
--- a/test/arf_freq_test.cc
+++ b/test/arf_freq_test.cc
@@ -22,8 +22,8 @@
 const unsigned int kFrames = 100;
 const int kBitrate = 500;
 
-#define ARF_NOT_SEEN               1000001
-#define ARF_SEEN_ONCE              1000000
+#define ARF_NOT_SEEN 1000001
+#define ARF_SEEN_ONCE 1000000
 
 typedef struct {
   const char *filename;
@@ -44,24 +44,20 @@
 
 const TestVideoParam kTestVectors[] = {
   // artificially increase framerate to trigger default check
-  {"hantro_collage_w352h288.yuv", 352, 288, 5000, 1,
-    8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
-  {"hantro_collage_w352h288.yuv", 352, 288, 30, 1,
-    8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
-  {"rush_hour_444.y4m", 352, 288, 30, 1,
-    8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
+  { "hantro_collage_w352h288.yuv", 352, 288, 5000, 1, 8, VPX_IMG_FMT_I420,
+    VPX_BITS_8, 0 },
+  { "hantro_collage_w352h288.yuv", 352, 288, 30, 1, 8, VPX_IMG_FMT_I420,
+    VPX_BITS_8, 0 },
+  { "rush_hour_444.y4m", 352, 288, 30, 1, 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1 },
 #if CONFIG_VP9_HIGHBITDEPTH
-  // Add list of profile 2/3 test videos here ...
+// Add list of profile 2/3 test videos here ...
 #endif  // CONFIG_VP9_HIGHBITDEPTH
 };
 
 const TestEncodeParam kEncodeVectors[] = {
-  {::libvpx_test::kOnePassGood, 2},
-  {::libvpx_test::kOnePassGood, 5},
-  {::libvpx_test::kTwoPassGood, 1},
-  {::libvpx_test::kTwoPassGood, 2},
-  {::libvpx_test::kTwoPassGood, 5},
-  {::libvpx_test::kRealTime, 5},
+  { ::libvpx_test::kOnePassGood, 2 }, { ::libvpx_test::kOnePassGood, 5 },
+  { ::libvpx_test::kTwoPassGood, 1 }, { ::libvpx_test::kTwoPassGood, 2 },
+  { ::libvpx_test::kTwoPassGood, 5 }, { ::libvpx_test::kRealTime, 5 },
 };
 
 const int kMinArfVectors[] = {
@@ -80,15 +76,12 @@
 
 class ArfFreqTestLarge
     : public ::libvpx_test::EncoderTest,
-      public ::libvpx_test::CodecTestWith3Params<TestVideoParam, \
+      public ::libvpx_test::CodecTestWith3Params<TestVideoParam,
                                                  TestEncodeParam, int> {
  protected:
   ArfFreqTestLarge()
-      : EncoderTest(GET_PARAM(0)),
-        test_video_param_(GET_PARAM(1)),
-        test_encode_param_(GET_PARAM(2)),
-        min_arf_requested_(GET_PARAM(3)) {
-  }
+      : EncoderTest(GET_PARAM(0)), test_video_param_(GET_PARAM(1)),
+        test_encode_param_(GET_PARAM(2)), min_arf_requested_(GET_PARAM(3)) {}
 
   virtual ~ArfFreqTestLarge() {}
 
@@ -114,17 +107,16 @@
   }
 
   int GetNumFramesInPkt(const vpx_codec_cx_pkt_t *pkt) {
-    const uint8_t *buffer = reinterpret_cast<uint8_t*>(pkt->data.frame.buf);
+    const uint8_t *buffer = reinterpret_cast<uint8_t *>(pkt->data.frame.buf);
     const uint8_t marker = buffer[pkt->data.frame.sz - 1];
     const int mag = ((marker >> 3) & 3) + 1;
     int frames = (marker & 0x7) + 1;
-    const unsigned int index_sz = 2 + mag  * frames;
+    const unsigned int index_sz = 2 + mag * frames;
     // Check for superframe or not.
     // Assume superframe has only one visible frame, the rest being
     // invisible. If superframe index is not found, then there is only
     // one frame.
-    if (!((marker & 0xe0) == 0xc0 &&
-          pkt->data.frame.sz >= index_sz &&
+    if (!((marker & 0xe0) == 0xc0 && pkt->data.frame.sz >= index_sz &&
           buffer[pkt->data.frame.sz - index_sz] == marker)) {
       frames = 1;
     }
@@ -132,8 +124,7 @@
   }
 
   virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
-      return;
+    if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return;
     const int frames = GetNumFramesInPkt(pkt);
     if (frames == 1) {
       run_of_visible_frames_++;
@@ -167,9 +158,7 @@
     }
   }
 
-  int GetMinVisibleRun() const {
-    return min_run_;
-  }
+  int GetMinVisibleRun() const { return min_run_; }
 
   int GetMinArfDistanceRequested() const {
     if (min_arf_requested_)
@@ -178,7 +167,7 @@
       return vp10_rc_get_default_min_gf_interval(
           test_video_param_.width, test_video_param_.height,
           (double)test_video_param_.framerate_num /
-          test_video_param_.framerate_den);
+              test_video_param_.framerate_den);
   }
 
   TestVideoParam test_video_param_;
@@ -197,21 +186,18 @@
   cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
   cfg_.g_bit_depth = test_video_param_.bit_depth;
   init_flags_ = VPX_CODEC_USE_PSNR;
-  if (cfg_.g_bit_depth > 8)
-    init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
+  if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
 
   testing::internal::scoped_ptr<libvpx_test::VideoSource> video;
   if (is_extension_y4m(test_video_param_.filename)) {
-    video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename,
-                                                0, kFrames));
+    video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename, 0,
+                                                kFrames));
   } else {
-    video.reset(new libvpx_test::YUVVideoSource(test_video_param_.filename,
-                                                test_video_param_.fmt,
-                                                test_video_param_.width,
-                                                test_video_param_.height,
-                                                test_video_param_.framerate_num,
-                                                test_video_param_.framerate_den,
-                                                0, kFrames));
+    video.reset(new libvpx_test::YUVVideoSource(
+        test_video_param_.filename, test_video_param_.fmt,
+        test_video_param_.width, test_video_param_.height,
+        test_video_param_.framerate_num, test_video_param_.framerate_den, 0,
+        kFrames));
   }
 
   ASSERT_NO_FATAL_FAILURE(RunLoop(video.get()));
@@ -235,15 +221,12 @@
     ::testing::Combine(
         ::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
             &libvpx_test::kVP10)),
-        ::testing::ValuesIn(kTestVectors),
-        ::testing::ValuesIn(kEncodeVectors),
+        ::testing::ValuesIn(kTestVectors), ::testing::ValuesIn(kEncodeVectors),
         ::testing::ValuesIn(kMinArfVectors)));
 #endif  // CONFIG_VP10_ENCODER
 #else
-VP10_INSTANTIATE_TEST_CASE(
-    ArfFreqTestLarge,
-    ::testing::ValuesIn(kTestVectors),
-    ::testing::ValuesIn(kEncodeVectors),
-    ::testing::ValuesIn(kMinArfVectors));
+VP10_INSTANTIATE_TEST_CASE(ArfFreqTestLarge, ::testing::ValuesIn(kTestVectors),
+                           ::testing::ValuesIn(kEncodeVectors),
+                           ::testing::ValuesIn(kMinArfVectors));
 #endif  // CONFIG_VP9_HIGHBITDEPTH || CONFIG_EXT_REFS
 }  // namespace