misc: apply clang-format v5.0.0

Change-Id: I4b60db5c43bb443ddd001ccb6601d1a7d825bfa6
diff --git a/aom/aomcx.h b/aom/aomcx.h
index 45cd64c..5aa320d 100644
--- a/aom/aomcx.h
+++ b/aom/aomcx.h
@@ -144,7 +144,7 @@
   AOME_SET_SCALEMODE = 11,
 
   /*!\brief Codec control function to set encoder enhancement layer id.
-  */
+   */
   AOME_SET_ENHANCEMENT_LAYER_ID = 12,
 
   /*!\brief Codec control function to set encoder internal speed settings.
@@ -220,7 +220,7 @@
   AOME_SET_MAX_INTRA_BITRATE_PCT,
 
   /*!\brief Codec control function to set number of spatial layers.
-  */
+   */
   AOME_SET_NUMBER_SPATIAL_LAYERS,
 
   /*!\brief Codec control function to set max data rate for Inter frames.
diff --git a/aom/src/aom_encoder.c b/aom/src/aom_encoder.c
index e3ac522..5db23b1 100644
--- a/aom/src/aom_encoder.c
+++ b/aom/src/aom_encoder.c
@@ -179,11 +179,6 @@
   return res;
 }
 
-/* clang-format off */
-#define FLOATING_POINT_BEGIN_SCOPE do {
-#define FLOATING_POINT_END_SCOPE } while (0);
-/* clang-format on */
-
 #if ARCH_X86 || ARCH_X86_64
 /* On X86, disable the x87 unit's internal 80 bit precision for better
  * consistency with the SSE unit's 64 bit precision.
@@ -206,15 +201,17 @@
 #define FLOATING_POINT_RESTORE_EXCEPTIONS
 #endif  // HAVE_FEXCEPT && CONFIG_DEBUG
 
+/* clang-format off */
 #define FLOATING_POINT_INIT    \
-  FLOATING_POINT_BEGIN_SCOPE   \
+  do {                         \
   FLOATING_POINT_SET_PRECISION \
   FLOATING_POINT_SET_EXCEPTIONS
 
 #define FLOATING_POINT_RESTORE      \
   FLOATING_POINT_RESTORE_EXCEPTIONS \
   FLOATING_POINT_RESTORE_PRECISION  \
-  FLOATING_POINT_END_SCOPE
+  } while (0);
+/* clang-format on */
 
 aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
                                  aom_codec_pts_t pts, unsigned long duration,
diff --git a/aom_ports/mem_ops.h b/aom_ports/mem_ops.h
index 6212675..ef0ee17 100644
--- a/aom_ports/mem_ops.h
+++ b/aom_ports/mem_ops.h
@@ -225,5 +225,4 @@
   mem[3] = (MAU_T)((val >> 24) & 0xff);
 }
 /* clang-format on */
-
 #endif  // AOM_PORTS_MEM_OPS_H_
diff --git a/aomenc.c b/aomenc.c
index 9e6a659..2493449 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -1545,7 +1545,7 @@
 #if CONFIG_OBU_NO_IVF
       && stream->config.write_ivf
 #endif
-      ) {
+  ) {
     ivf_write_file_header(stream->file, cfg, global->codec->fourcc, 0);
   }
 }
@@ -1566,7 +1566,7 @@
 #if CONFIG_OBU_NO_IVF
       && stream->config.write_ivf
 #endif
-      ) {
+  ) {
     if (!fseek(stream->file, 0, SEEK_SET))
       ivf_write_file_header(stream->file, &stream->config.cfg, fourcc,
                             stream->frames_out);
@@ -2374,18 +2374,18 @@
 
     if (!global.quiet) {
       FOREACH_STREAM(stream, streams) {
-        fprintf(stderr, "\rPass %d/%d frame %4d/%-4d %7" PRId64 "B %7" PRId64
-                        "b/f %7" PRId64
-                        "b/s"
-                        " %7" PRId64 " %s (%.2f fps)\033[K\n",
+        fprintf(stderr,
+                "\rPass %d/%d frame %4d/%-4d %7" PRId64 "B %7" PRId64
+                "b/f %7" PRId64
+                "b/s"
+                " %7" PRId64 " %s (%.2f fps)\033[K\n",
                 pass + 1, global.passes, frames_in, stream->frames_out,
                 (int64_t)stream->nbytes,
                 seen_frames ? (int64_t)(stream->nbytes * 8 / seen_frames) : 0,
-                seen_frames
-                    ? (int64_t)stream->nbytes * 8 *
-                          (int64_t)global.framerate.num / global.framerate.den /
-                          seen_frames
-                    : 0,
+                seen_frames ? (int64_t)stream->nbytes * 8 *
+                                  (int64_t)global.framerate.num /
+                                  global.framerate.den / seen_frames
+                            : 0,
                 stream->cx_time > 9999999 ? stream->cx_time / 1000
                                           : stream->cx_time,
                 stream->cx_time > 9999999 ? "ms" : "us",
diff --git a/examples/analyzer.cc b/examples/analyzer.cc
index a5e35cf..0e7ba15 100644
--- a/examples/analyzer.cc
+++ b/examples/analyzer.cc
@@ -129,11 +129,10 @@
 }
 
 int AV1Decoder::getWidthPadding() const {
-  return show_padding
-             ? AOMMAX(info->frame_width + 16,
-                      ALIGN_POWER_OF_TWO(info->frame_width, 6)) -
-                   info->frame_width
-             : 0;
+  return show_padding ? AOMMAX(info->frame_width + 16,
+                               ALIGN_POWER_OF_TWO(info->frame_width, 6)) -
+                            info->frame_width
+                      : 0;
 }
 
 int AV1Decoder::getHeight() const {
@@ -141,11 +140,10 @@
 }
 
 int AV1Decoder::getHeightPadding() const {
-  return show_padding
-             ? AOMMAX(info->frame_height + 16,
-                      ALIGN_POWER_OF_TWO(info->frame_height, 6)) -
-                   info->frame_height
-             : 0;
+  return show_padding ? AOMMAX(info->frame_height + 16,
+                               ALIGN_POWER_OF_TWO(info->frame_height, 6)) -
+                            info->frame_height
+                      : 0;
 }
 
 bool AV1Decoder::getAccountingStruct(Accounting **accounting) {
@@ -285,19 +283,22 @@
       cbval = ((pmask & OD_CB_MASK) >> 1) * (cbval - 128);
       crval = ((pmask & OD_CR_MASK) >> 2) * (crval - 128);
       /*This is intentionally slow and very accurate.*/
-      rval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(
-                              2916394880000LL * yval + 4490222169144LL * crval,
-                              9745792000LL),
+      rval = OD_CLAMPI(
+          0,
+          (int32_t)OD_DIV_ROUND(
+              2916394880000LL * yval + 4490222169144LL * crval, 9745792000LL),
+          65535);
+      gval = OD_CLAMPI(0,
+                       (int32_t)OD_DIV_ROUND(2916394880000LL * yval -
+                                                 534117096223LL * cbval -
+                                                 1334761232047LL * crval,
+                                             9745792000LL),
                        65535);
-      gval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(2916394880000LL * yval -
-                                                    534117096223LL * cbval -
-                                                    1334761232047LL * crval,
-                                                9745792000LL),
-                       65535);
-      bval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(
-                              2916394880000LL * yval + 5290866304968LL * cbval,
-                              9745792000LL),
-                       65535);
+      bval = OD_CLAMPI(
+          0,
+          (int32_t)OD_DIV_ROUND(
+              2916394880000LL * yval + 5290866304968LL * cbval, 9745792000LL),
+          65535);
       unsigned char *px_row = p;
       for (int v = 0; v < zoom; v++) {
         unsigned char *px = px_row;
diff --git a/y4minput.c b/y4minput.c
index 0a6c27a..a1dca10 100644
--- a/y4minput.c
+++ b/y4minput.c
@@ -134,7 +134,6 @@
   Conversions which require both horizontal and vertical filtering could
    have these steps pipelined, for less memory consumption and better cache
    performance, but we do them separately for simplicity.*/
-
 #define OC_MINI(_a, _b) ((_a) > (_b) ? (_b) : (_a))
 #define OC_MAXI(_a, _b) ((_a) < (_b) ? (_b) : (_a))
 #define OC_CLAMPI(_a, _b, _c) (OC_MAXI(_a, OC_MINI(_b, _c)))