apply clang-format

Change-Id: Ib1b5dde5d4c6479c968cd7d7a4a1d01abae1fcf6
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index c0114fa..e1d2360 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -611,33 +611,33 @@
   return (tx_size == TX_16X16 ? 2 : 1);
 }
 
-static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA]
-                                            [EXT_TX_SIZES] = {
+static const int use_intra_ext_tx_for_txsize[EXT_TX_SETS_INTRA][EXT_TX_SIZES] =
+    {
 #if CONFIG_CB4X4
-                                              { 1, 1, 1, 1, 1 },  // unused
-                                              { 0, 1, 1, 0, 0 },
-                                              { 0, 0, 0, 1, 0 },
+      { 1, 1, 1, 1, 1 },  // unused
+      { 0, 1, 1, 0, 0 },
+      { 0, 0, 0, 1, 0 },
 #else
-                                              { 1, 1, 1, 1 },  // unused
-                                              { 1, 1, 0, 0 },
-                                              { 0, 0, 1, 0 },
+      { 1, 1, 1, 1 },  // unused
+      { 1, 1, 0, 0 },
+      { 0, 0, 1, 0 },
 #endif  // CONFIG_CB4X4
-                                            };
+    };
 
-static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER]
-                                            [EXT_TX_SIZES] = {
+static const int use_inter_ext_tx_for_txsize[EXT_TX_SETS_INTER][EXT_TX_SIZES] =
+    {
 #if CONFIG_CB4X4
-                                              { 1, 1, 1, 1, 1 },  // unused
-                                              { 0, 1, 1, 0, 0 },
-                                              { 0, 0, 0, 1, 0 },
-                                              { 0, 0, 0, 0, 1 },
+      { 1, 1, 1, 1, 1 },  // unused
+      { 0, 1, 1, 0, 0 },
+      { 0, 0, 0, 1, 0 },
+      { 0, 0, 0, 0, 1 },
 #else
-                                              { 1, 1, 1, 1 },  // unused
-                                              { 1, 1, 0, 0 },
-                                              { 0, 0, 1, 0 },
-                                              { 0, 0, 0, 1 },
+      { 1, 1, 1, 1 },  // unused
+      { 1, 1, 0, 0 },
+      { 0, 0, 1, 0 },
+      { 0, 0, 0, 1 },
 #endif  // CONFIG_CB4X4
-                                            };
+    };
 
 // Transform types used in each intra set
 static const int ext_tx_used_intra[EXT_TX_SETS_INTRA][TX_TYPES] = {
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 38c8fc9..f7f9abc 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -4674,9 +4674,9 @@
      3=ONE_TOKEN_NEOB, 4=TWO_TOKEN_PLUS_EOB, 5=TWO_TOKEN_PLUS_NEOB
      */
   // Block zero probability
-  phead[0] =
-      blockz_model == NULL ? 0 : ((*blockz_model) << (CDF_PROB_BITS - 8)) +
-                                     (1 << (CDF_PROB_BITS - 9));
+  phead[0] = blockz_model == NULL ? 0
+                                  : ((*blockz_model) << (CDF_PROB_BITS - 8)) +
+                                        (1 << (CDF_PROB_BITS - 9));
   phead[0] = AOMMIN(CDF_PROB_TOP - 6, AOMMAX(1, phead[0]));
   cdf_head[0] = phead[0];
 
@@ -4814,8 +4814,8 @@
   const av1_coeff_count_model *const counts =
       (const av1_coeff_count_model *)cm->counts.coef[tx_size];
   const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] =
-      (const unsigned int(*)[REF_TYPES][COEF_BANDS]
-                            [COEFF_CONTEXTS])cm->counts.eob_branch[tx_size];
+      (const unsigned int(*)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS])
+          cm->counts.eob_branch[tx_size];
 #if CONFIG_NEW_TOKENSET
   const av1_blockz_probs_model *const pre_blockz_probs =
       pre_fc->blockzero_probs[tx_size];
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 5404bcd..fb8a3ac 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -528,20 +528,17 @@
 #endif  // CONFIG_EXT_PARTITION
     };
 #else  // !CONFIG_COMPOUND_SEGMENT
-static const aom_prob default_compound_type_probs[BLOCK_SIZES]
-                                                 [COMPOUND_TYPES - 1] = {
+static const aom_prob
+    default_compound_type_probs[BLOCK_SIZES][COMPOUND_TYPES - 1] = {
 #if CONFIG_CB4X4
-                                                   { 208 }, { 208 }, { 208 },
+      { 208 }, { 208 }, { 208 },
 #endif
-                                                   { 208 }, { 208 }, { 208 },
-                                                   { 208 }, { 208 }, { 208 },
-                                                   { 216 }, { 216 }, { 216 },
-                                                   { 224 }, { 224 }, { 240 },
-                                                   { 240 },
+      { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 208 }, { 216 },
+      { 216 }, { 216 }, { 224 }, { 224 }, { 240 }, { 240 },
 #if CONFIG_EXT_PARTITION
-                                                   { 255 }, { 255 }, { 255 },
+      { 255 }, { 255 }, { 255 },
 #endif  // CONFIG_EXT_PARTITION
-                                                 };
+    };
 #endif  // CONFIG_COMPOUND_SEGMENT
 
 static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
@@ -572,20 +569,17 @@
 const aom_tree_index av1_motion_mode_tree[TREE_SIZE(MOTION_MODES)] = {
   -SIMPLE_TRANSLATION, -OBMC_CAUSAL
 };
-static const aom_prob default_motion_mode_prob[BLOCK_SIZES]
-                                              [MOTION_MODES - 1] = {
+static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
+    {
 #if CONFIG_CB4X4
-                                                { 255 }, { 255 }, { 255 },
+      { 255 }, { 255 }, { 255 },
 #endif
-                                                { 255 }, { 255 }, { 255 },
-                                                { 151 }, { 153 }, { 144 },
-                                                { 178 }, { 165 }, { 160 },
-                                                { 207 }, { 195 }, { 168 },
-                                                { 244 },
+      { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
+      { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
 #if CONFIG_EXT_PARTITION
-                                                { 252 }, { 252 }, { 252 },
+      { 252 }, { 252 }, { 252 },
 #endif  // CONFIG_EXT_PARTITION
-                                              };
+    };
 
 #elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
 
@@ -593,20 +587,17 @@
   -SIMPLE_TRANSLATION, -WARPED_CAUSAL
 };
 
-static const aom_prob default_motion_mode_prob[BLOCK_SIZES]
-                                              [MOTION_MODES - 1] = {
+static const aom_prob default_motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1] =
+    {
 #if CONFIG_CB4X4
-                                                { 255 }, { 255 }, { 255 },
+      { 255 }, { 255 }, { 255 },
 #endif
-                                                { 255 }, { 255 }, { 255 },
-                                                { 151 }, { 153 }, { 144 },
-                                                { 178 }, { 165 }, { 160 },
-                                                { 207 }, { 195 }, { 168 },
-                                                { 244 },
+      { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
+      { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
 #if CONFIG_EXT_PARTITION
-                                                { 252 }, { 252 }, { 252 },
+      { 252 }, { 252 }, { 252 },
 #endif  // CONFIG_EXT_PARTITION
-                                              };
+    };
 
 #elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
 
@@ -823,19 +814,16 @@
 // When palette mode is enabled, following probability tables indicate the
 // probabilities to code the "is_palette" bit (i.e. the bit that indicates
 // if this block uses palette mode or DC_PRED mode).
-const aom_prob
-    av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
-                                   [PALETTE_Y_MODE_CONTEXTS] = {
-                                     { 240, 180, 100 }, { 240, 180, 100 },
-                                     { 240, 180, 100 }, { 240, 180, 100 },
-                                     { 240, 180, 100 }, { 240, 180, 100 },
-                                     { 240, 180, 100 }, { 240, 180, 100 },
-                                     { 240, 180, 100 }, { 240, 180, 100 },
+const aom_prob av1_default_palette_y_mode_prob
+    [PALETTE_BLOCK_SIZES][PALETTE_Y_MODE_CONTEXTS] = {
+      { 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
+      { 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
+      { 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
+      { 240, 180, 100 },
 #if CONFIG_EXT_PARTITION
-                                     { 240, 180, 100 }, { 240, 180, 100 },
-                                     { 240, 180, 100 },
+      { 240, 180, 100 }, { 240, 180, 100 }, { 240, 180, 100 },
 #endif  // CONFIG_EXT_PARTITION
-                                   };
+    };
 
 const aom_prob av1_default_palette_uv_mode_prob[PALETTE_UV_MODE_CONTEXTS] = {
   253, 229
@@ -1191,20 +1179,16 @@
 static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 };
 
 #if CONFIG_DUAL_FILTER
-static const aom_prob
-    default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
-                                  [SWITCHABLE_FILTERS - 1] = {
-                                    { 235, 192, 128 }, { 36, 243, 48 },
-                                    { 34, 16, 128 },   { 34, 16, 128 },
-                                    { 149, 160, 128 }, { 235, 192, 128 },
-                                    { 36, 243, 48 },   { 34, 16, 128 },
-                                    { 34, 16, 128 },   { 149, 160, 128 },
-                                    { 235, 192, 128 }, { 36, 243, 48 },
-                                    { 34, 16, 128 },   { 34, 16, 128 },
-                                    { 149, 160, 128 }, { 235, 192, 128 },
-                                    { 36, 243, 48 },   { 34, 16, 128 },
-                                    { 34, 16, 128 },   { 149, 160, 128 },
-                                  };
+static const aom_prob default_switchable_interp_prob
+    [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = {
+      { 235, 192, 128 }, { 36, 243, 48 },   { 34, 16, 128 },
+      { 34, 16, 128 },   { 149, 160, 128 }, { 235, 192, 128 },
+      { 36, 243, 48 },   { 34, 16, 128 },   { 34, 16, 128 },
+      { 149, 160, 128 }, { 235, 192, 128 }, { 36, 243, 48 },
+      { 34, 16, 128 },   { 34, 16, 128 },   { 149, 160, 128 },
+      { 235, 192, 128 }, { 36, 243, 48 },   { 34, 16, 128 },
+      { 34, 16, 128 },   { 149, 160, 128 },
+    };
 #else   // CONFIG_DUAL_FILTER
 static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
                                                     [SWITCHABLE_FILTERS - 1] = {
@@ -1524,14 +1508,11 @@
 
 #if CONFIG_EXT_INTRA
 #if CONFIG_INTRA_INTERP
-static const aom_prob default_intra_filter_probs[INTRA_FILTERS + 1]
-                                                [INTRA_FILTERS - 1] = {
-                                                  { 98, 63, 60 },
-                                                  { 98, 82, 80 },
-                                                  { 94, 65, 103 },
-                                                  { 49, 25, 24 },
-                                                  { 72, 38, 50 },
-                                                };
+static const aom_prob
+    default_intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1] = {
+      { 98, 63, 60 }, { 98, 82, 80 }, { 94, 65, 103 },
+      { 49, 25, 24 }, { 72, 38, 50 },
+    };
 const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
   -INTRA_FILTER_LINEAR,      2, -INTRA_FILTER_8TAP, 4, -INTRA_FILTER_8TAP_SHARP,
   -INTRA_FILTER_8TAP_SMOOTH,
@@ -1544,26 +1525,22 @@
 #endif  // CONFIG_FILTER_INTRA
 
 #if CONFIG_SUPERTX
-static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS]
-                                          [TX_SIZES] = {
+static const aom_prob
+    default_supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES] = {
 #if CONFIG_CB4X4
 #if CONFIG_TX64X64
-                                            { 1, 1, 160, 160, 170, 180 },
-                                            { 1, 1, 200, 200, 210, 220 },
+      { 1, 1, 160, 160, 170, 180 }, { 1, 1, 200, 200, 210, 220 },
 #else
-                                            { 1, 1, 160, 160, 170 },
-                                            { 1, 1, 200, 200, 210 },
+      { 1, 1, 160, 160, 170 }, { 1, 1, 200, 200, 210 },
 #endif  // CONFIG_TX64X64
 #else
 #if CONFIG_TX64X64
-                                            { 1, 160, 160, 170, 180 },
-                                            { 1, 200, 200, 210, 220 },
+      { 1, 160, 160, 170, 180 }, { 1, 200, 200, 210, 220 },
 #else
-                                            { 1, 160, 160, 170 },
-                                            { 1, 200, 200, 210 },
+      { 1, 160, 160, 170 }, { 1, 200, 200, 210 },
 #endif  // CONFIG_CB4X4
 #endif  // CONFIG_TX64X64
-                                          };
+    };
 #endif  // CONFIG_SUPERTX
 
 // FIXME(someone) need real defaults here
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index af1b8cc..c21454d 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -383,14 +383,10 @@
                                                      [PALETTE_SIZES - 1];
 extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES]
                                                       [PALETTE_SIZES - 1];
-extern const aom_prob
-    av1_default_palette_y_color_index_prob[PALETTE_MAX_SIZE - 1]
-                                          [PALETTE_COLOR_INDEX_CONTEXTS]
-                                          [PALETTE_COLORS - 1];
-extern const aom_prob
-    av1_default_palette_uv_color_index_prob[PALETTE_MAX_SIZE - 1]
-                                           [PALETTE_COLOR_INDEX_CONTEXTS]
-                                           [PALETTE_COLORS - 1];
+extern const aom_prob av1_default_palette_y_color_index_prob
+    [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
+extern const aom_prob av1_default_palette_uv_color_index_prob
+    [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
 #endif  // CONFIG_PALETTE
 
 extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
diff --git a/av1/common/x86/av1_highbd_convolve_filters_sse4.h b/av1/common/x86/av1_highbd_convolve_filters_sse4.h
index 0cf9e1f..9ffabdf 100644
--- a/av1/common/x86/av1_highbd_convolve_filters_sse4.h
+++ b/av1/common/x86/av1_highbd_convolve_filters_sse4.h
@@ -143,9 +143,9 @@
 #endif
 #if CONFIG_AOM_HIGHBITDEPTH
 #if USE_TEMPORALFILTER_12TAP
-DECLARE_ALIGNED(16, static const int16_t,
-                sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6]
-                                                                       [8]) = {
+DECLARE_ALIGNED(
+    16, static const int16_t,
+    sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]) = {
   {
       { 0, 1, 0, 1, 0, 1, 0, 1 },
       { -1, 3, -1, 3, -1, 3, -1, 3 },
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 4872ef6..e7d386f 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -650,8 +650,8 @@
           read_uniform(r, FILTER_INTRA_MODES);
     }
     if (counts) {
-      ++counts->filter_intra[0]
-                            [filter_intra_mode_info->use_filter_intra_mode[0]];
+      ++counts
+            ->filter_intra[0][filter_intra_mode_info->use_filter_intra_mode[0]];
     }
   }
   if (mbmi->uv_mode == DC_PRED
@@ -666,8 +666,8 @@
           read_uniform(r, FILTER_INTRA_MODES);
     }
     if (counts) {
-      ++counts->filter_intra[1]
-                            [filter_intra_mode_info->use_filter_intra_mode[1]];
+      ++counts
+            ->filter_intra[1][filter_intra_mode_info->use_filter_intra_mode[1]];
     }
   }
 }
@@ -1970,8 +1970,8 @@
       mbmi->interinter_compound_data.type = COMPOUND_AVERAGE;
     }
     if (xd->counts)
-      xd->counts->compound_interinter[bsize]
-                                     [mbmi->interinter_compound_data.type]++;
+      xd->counts
+          ->compound_interinter[bsize][mbmi->interinter_compound_data.type]++;
   }
 #endif  // CONFIG_EXT_INTER
 
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 2a235c4..abd9315 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -448,10 +448,10 @@
   const int n = mbmi->palette_mode_info.palette_size[plane];
   int i, j;
   uint8_t *const color_map = xd->plane[plane].color_index_map;
-  const aom_prob(*const prob)[PALETTE_COLOR_INDEX_CONTEXTS]
-                             [PALETTE_COLORS - 1] =
-                                 plane ? av1_default_palette_uv_color_index_prob
-                                       : av1_default_palette_y_color_index_prob;
+  const aom_prob(
+      *const prob)[PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] =
+      plane ? av1_default_palette_uv_color_index_prob
+            : av1_default_palette_y_color_index_prob;
   int plane_block_width, plane_block_height, rows, cols;
   av1_get_block_dimensions(mbmi->sb_type, plane, xd, &plane_block_width,
                            &plane_block_height, &rows, &cols);
diff --git a/av1/encoder/av1_quantize.h b/av1/encoder/av1_quantize.h
index 92ba3e7..62a03da 100644
--- a/av1/encoder/av1_quantize.h
+++ b/av1/encoder/av1_quantize.h
@@ -43,10 +43,12 @@
 
 typedef struct {
 #if CONFIG_NEW_QUANT
-  DECLARE_ALIGNED(16, tran_low_t, y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE]
-                                                 [COEF_BANDS][NUQ_KNOTS]);
-  DECLARE_ALIGNED(16, tran_low_t, uv_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE]
-                                                  [COEF_BANDS][NUQ_KNOTS]);
+  DECLARE_ALIGNED(
+      16, tran_low_t,
+      y_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE][COEF_BANDS][NUQ_KNOTS]);
+  DECLARE_ALIGNED(
+      16, tran_low_t,
+      uv_cuml_bins_nuq[QUANT_PROFILES][QINDEX_RANGE][COEF_BANDS][NUQ_KNOTS]);
 #endif  // CONFIG_NEW_QUANT
   // 0: dc 1: ac 2-8: ac repeated to SIMD width
   DECLARE_ALIGNED(16, int16_t, y_quant[QINDEX_RANGE][8]);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 0c9965f..bda7217 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1232,8 +1232,9 @@
     if (left_mi)
       palette_y_mode_ctx +=
           (left_mi->mbmi.palette_mode_info.palette_size[0] > 0);
-    aom_write(w, n > 0, av1_default_palette_y_mode_prob[bsize - BLOCK_8X8]
-                                                       [palette_y_mode_ctx]);
+    aom_write(
+        w, n > 0,
+        av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_y_mode_ctx]);
     if (n > 0) {
       av1_write_token(w, av1_palette_size_tree,
                       av1_default_palette_y_size_prob[bsize - BLOCK_8X8],
@@ -2987,12 +2988,11 @@
 #endif
 #if CONFIG_ENTROPY
 // Calculate the token counts between subsequent subframe updates.
-static void get_coef_counts_diff(AV1_COMP *cpi, int index,
-                                 av1_coeff_count coef_counts[TX_SIZES]
-                                                            [PLANE_TYPES],
-                                 unsigned int eob_counts[TX_SIZES][PLANE_TYPES]
-                                                        [REF_TYPES][COEF_BANDS]
-                                                        [COEFF_CONTEXTS]) {
+static void get_coef_counts_diff(
+    AV1_COMP *cpi, int index,
+    av1_coeff_count coef_counts[TX_SIZES][PLANE_TYPES],
+    unsigned int eob_counts[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
+                           [COEFF_CONTEXTS]) {
   int i, j, k, l, m, tx_size, val;
   const int max_idx = cpi->common.coef_probs_update_idx;
   const TX_MODE tx_mode = cpi->common.tx_mode;
@@ -3011,8 +3011,8 @@
                   cpi->common.counts.eob_branch[tx_size][i][j][k][l] -
                   subframe_stats->eob_counts_buf[max_idx][tx_size][i][j][k][l];
             } else {
-              val = subframe_stats->eob_counts_buf[index + 1][tx_size][i][j][k]
-                                                  [l] -
+              val = subframe_stats
+                        ->eob_counts_buf[index + 1][tx_size][i][j][k][l] -
                     subframe_stats->eob_counts_buf[index][tx_size][i][j][k][l];
             }
             assert(val >= 0);
@@ -3021,13 +3021,13 @@
             for (m = 0; m < ENTROPY_TOKENS; ++m) {
               if (index == max_idx) {
                 val = cpi->td.rd_counts.coef_counts[tx_size][i][j][k][l][m] -
-                      subframe_stats->coef_counts_buf[max_idx][tx_size][i][j][k]
-                                                     [l][m];
+                      subframe_stats
+                          ->coef_counts_buf[max_idx][tx_size][i][j][k][l][m];
               } else {
-                val = subframe_stats->coef_counts_buf[index + 1][tx_size][i][j]
-                                                     [k][l][m] -
-                      subframe_stats->coef_counts_buf[index][tx_size][i][j][k]
-                                                     [l][m];
+                val = subframe_stats
+                          ->coef_counts_buf[index + 1][tx_size][i][j][k][l][m] -
+                      subframe_stats
+                          ->coef_counts_buf[index][tx_size][i][j][k][l][m];
               }
               assert(val >= 0);
               coef_counts[tx_size][i][j][k][l][m] = val;
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 7917b19..6d98498 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -2083,8 +2083,8 @@
                               [ref0 != BWDREF_FRAME]++;
           } else {
             const int bit1 = !(ref0 == LAST2_FRAME || ref0 == LAST_FRAME);
-            counts->single_ref[av1_get_pred_context_single_ref_p3(xd)][2]
-                              [bit1]++;
+            counts
+                ->single_ref[av1_get_pred_context_single_ref_p3(xd)][2][bit1]++;
             if (!bit1) {
               counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3]
                                 [ref0 != LAST_FRAME]++;
@@ -2491,8 +2491,8 @@
             !xd->mi[0]->mbmi.skip) {
           int eset = get_ext_tx_set(supertx_size, bsize, 1);
           if (eset > 0) {
-            ++td->counts->inter_ext_tx[eset][supertx_size]
-                                      [xd->mi[0]->mbmi.tx_type];
+            ++td->counts
+                  ->inter_ext_tx[eset][supertx_size][xd->mi[0]->mbmi.tx_type];
           }
         }
 #else
@@ -3992,11 +3992,10 @@
 
         pc_tree->partitioning = PARTITION_SPLIT;
 
-        sum_rdc.rate +=
-            av1_cost_bit(cm->fc->supertx_prob
-                             [partition_supertx_context_lookup[PARTITION_SPLIT]]
-                             [supertx_size],
-                         0);
+        sum_rdc.rate += av1_cost_bit(
+            cm->fc->supertx_prob[partition_supertx_context_lookup
+                                     [PARTITION_SPLIT]][supertx_size],
+            0);
         sum_rdc.rdcost =
             RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist);
 
@@ -4010,9 +4009,8 @@
                         &tmp_rdc.rate, &tmp_rdc.dist, &best_tx, pc_tree);
 
           tmp_rdc.rate += av1_cost_bit(
-              cm->fc->supertx_prob
-                  [partition_supertx_context_lookup[PARTITION_SPLIT]]
-                  [supertx_size],
+              cm->fc->supertx_prob[partition_supertx_context_lookup
+                                       [PARTITION_SPLIT]][supertx_size],
               1);
           tmp_rdc.rdcost =
               RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist);
@@ -4076,11 +4074,10 @@
 
         pc_tree->partitioning = PARTITION_SPLIT;
 
-        sum_rdc.rate +=
-            av1_cost_bit(cm->fc->supertx_prob
-                             [partition_supertx_context_lookup[PARTITION_SPLIT]]
-                             [supertx_size],
-                         0);
+        sum_rdc.rate += av1_cost_bit(
+            cm->fc->supertx_prob[partition_supertx_context_lookup
+                                     [PARTITION_SPLIT]][supertx_size],
+            0);
         sum_rdc.rdcost =
             RDCOST(x->rdmult, x->rddiv, sum_rdc.rate, sum_rdc.dist);
 
@@ -4094,9 +4091,8 @@
                         &tmp_rdc.rate, &tmp_rdc.dist, &best_tx, pc_tree);
 
           tmp_rdc.rate += av1_cost_bit(
-              cm->fc->supertx_prob
-                  [partition_supertx_context_lookup[PARTITION_SPLIT]]
-                  [supertx_size],
+              cm->fc->supertx_prob[partition_supertx_context_lookup
+                                       [PARTITION_SPLIT]][supertx_size],
               1);
           tmp_rdc.rdcost =
               RDCOST(x->rdmult, x->rddiv, tmp_rdc.rate, tmp_rdc.dist);
@@ -5806,8 +5802,8 @@
       int eset = get_ext_tx_set(tx_size, bsize, is_inter);
       if (eset > 0) {
         if (is_inter) {
-          ++td->counts->inter_ext_tx[eset][txsize_sqr_map[tx_size]]
-                                    [mbmi->tx_type];
+          ++td->counts
+                ->inter_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->tx_type];
         } else {
           ++td->counts->intra_ext_tx[eset][txsize_sqr_map[tx_size]][mbmi->mode]
                                     [mbmi->tx_type];
@@ -5820,9 +5816,9 @@
       if (is_inter) {
         ++td->counts->inter_ext_tx[tx_size][mbmi->tx_type];
       } else {
-        ++td->counts->intra_ext_tx[tx_size]
-                                  [intra_mode_to_tx_type_context[mbmi->mode]]
-                                  [mbmi->tx_type];
+        ++td->counts
+              ->intra_ext_tx[tx_size][intra_mode_to_tx_type_context[mbmi->mode]]
+                            [mbmi->tx_type];
       }
     }
 #endif  // CONFIG_EXT_TX
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 8e39d57..1a87203 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -1153,11 +1153,11 @@
   assert(OD_COEFF_SHIFT >= 3);
   // DC quantizer for PVQ
   if (use_activity_masking)
-    pvq_dc_quant = OD_MAXI(
-        1, (quant[0] << (OD_COEFF_SHIFT - 3)) *
-                   daala_enc->state.pvq_qm_q4[plane]
-                                             [od_qm_get_index(tx_size, 0)] >>
-               4);
+    pvq_dc_quant =
+        OD_MAXI(1, (quant[0] << (OD_COEFF_SHIFT - 3)) *
+                           daala_enc->state
+                               .pvq_qm_q4[plane][od_qm_get_index(tx_size, 0)] >>
+                       4);
   else
     pvq_dc_quant = OD_MAXI(1, quant[0] << (OD_COEFF_SHIFT - 3));
 
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 683bde6..f78b977 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -1594,10 +1594,11 @@
   }
 
   // Clamp odd edge cases.
-  total_group_bits =
-      (total_group_bits < 0) ? 0 : (total_group_bits > twopass->kf_group_bits)
-                                       ? twopass->kf_group_bits
-                                       : total_group_bits;
+  total_group_bits = (total_group_bits < 0)
+                         ? 0
+                         : (total_group_bits > twopass->kf_group_bits)
+                               ? twopass->kf_group_bits
+                               : total_group_bits;
 
   // Clip based on user supplied data rate variability limit.
   if (total_group_bits > (int64_t)max_bits * rc->baseline_gf_interval)
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 2956447..af112e5 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -944,13 +944,12 @@
 // candidates as indicated in the num_candidates and candidates arrays
 // passed into this function
 //
-static int pattern_search(MACROBLOCK *x, MV *start_mv, int search_param,
-                          int sad_per_bit, int do_init_search, int *cost_list,
-                          const aom_variance_fn_ptr_t *vfp, int use_mvcost,
-                          const MV *center_mv,
-                          const int num_candidates[MAX_PATTERN_SCALES],
-                          const MV candidates[MAX_PATTERN_SCALES]
-                                             [MAX_PATTERN_CANDIDATES]) {
+static int pattern_search(
+    MACROBLOCK *x, MV *start_mv, int search_param, int sad_per_bit,
+    int do_init_search, int *cost_list, const aom_variance_fn_ptr_t *vfp,
+    int use_mvcost, const MV *center_mv,
+    const int num_candidates[MAX_PATTERN_SCALES],
+    const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) {
   const MACROBLOCKD *const xd = &x->e_mbd;
   static const int search_param_to_steps[MAX_MVSEARCH_STEPS] = {
     10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index e87e535..f1659a6 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4844,8 +4844,8 @@
 
 #if CONFIG_EXT_INTER
   if (is_compound) {
-    return cpi->inter_compound_mode_cost[mode_context]
-                                        [INTER_COMPOUND_OFFSET(mode)];
+    return cpi
+        ->inter_compound_mode_cost[mode_context][INTER_COMPOUND_OFFSET(mode)];
   } else {
     if (mode == NEWMV || mode == NEWFROMNEARMV) {
 #else
@@ -4885,8 +4885,8 @@
   assert(is_inter_mode(mode));
 #if CONFIG_EXT_INTER
   if (is_inter_compound_mode(mode)) {
-    return cpi->inter_compound_mode_cost[mode_context]
-                                        [INTER_COMPOUND_OFFSET(mode)];
+    return cpi
+        ->inter_compound_mode_cost[mode_context][INTER_COMPOUND_OFFSET(mode)];
   } else {
 #endif  // CONFIG_EXT_INTER
     return cpi->inter_mode_cost[mode_context][INTER_OFFSET(mode)];
@@ -4929,17 +4929,15 @@
 }
 #endif  // CONFIG_GLOBAL_MOTION
 
-static int set_and_cost_bmi_mvs(const AV1_COMP *const cpi, MACROBLOCK *x,
-                                MACROBLOCKD *xd, int i, PREDICTION_MODE mode,
-                                int_mv this_mv[2],
-                                int_mv frame_mv[MB_MODE_COUNT]
-                                               [TOTAL_REFS_PER_FRAME],
-                                int_mv seg_mvs[TOTAL_REFS_PER_FRAME],
+static int set_and_cost_bmi_mvs(
+    const AV1_COMP *const cpi, MACROBLOCK *x, MACROBLOCKD *xd, int i,
+    PREDICTION_MODE mode, int_mv this_mv[2],
+    int_mv frame_mv[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME],
+    int_mv seg_mvs[TOTAL_REFS_PER_FRAME],
 #if CONFIG_EXT_INTER
-                                int_mv compound_seg_newmvs[2],
+    int_mv compound_seg_newmvs[2],
 #endif  // CONFIG_EXT_INTER
-                                int_mv *best_ref_mv[2], const int *mvjcost,
-                                int *mvcost[2]) {
+    int_mv *best_ref_mv[2], const int *mvjcost, int *mvcost[2]) {
   MODE_INFO *const mic = xd->mi[0];
   const MB_MODE_INFO *const mbmi = &mic->mbmi;
   const MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
@@ -6739,13 +6737,12 @@
   ctx->hybrid_pred_diff = (int)comp_pred_diff[REFERENCE_MODE_SELECT];
 }
 
-static void setup_buffer_inter(const AV1_COMP *const cpi, MACROBLOCK *x,
-                               MV_REFERENCE_FRAME ref_frame,
-                               BLOCK_SIZE block_size, int mi_row, int mi_col,
-                               int_mv frame_nearest_mv[TOTAL_REFS_PER_FRAME],
-                               int_mv frame_near_mv[TOTAL_REFS_PER_FRAME],
-                               struct buf_2d yv12_mb[TOTAL_REFS_PER_FRAME]
-                                                    [MAX_MB_PLANE]) {
+static void setup_buffer_inter(
+    const AV1_COMP *const cpi, MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame,
+    BLOCK_SIZE block_size, int mi_row, int mi_col,
+    int_mv frame_nearest_mv[TOTAL_REFS_PER_FRAME],
+    int_mv frame_near_mv[TOTAL_REFS_PER_FRAME],
+    struct buf_2d yv12_mb[TOTAL_REFS_PER_FRAME][MAX_MB_PLANE]) {
   const AV1_COMMON *cm = &cpi->common;
   const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame);
   MACROBLOCKD *const xd = &x->e_mbd;
@@ -10282,8 +10279,9 @@
           clamp_mv2(&cur_mv.as_mv, xd);
 
           if (!mv_check_bounds(x, &cur_mv.as_mv)) {
-            int dummy_single_skippable[MB_MODE_COUNT]
-                                      [TOTAL_REFS_PER_FRAME] = { { 0 } };
+            int dummy_single_skippable[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME] = {
+              { 0 }
+            };
 #if CONFIG_EXT_INTER
             int_mv dummy_single_newmvs[2][TOTAL_REFS_PER_FRAME] = { { { 0 } },
                                                                     { { 0 } } };
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 6404fcc..81ef54f 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -182,10 +182,10 @@
     sf->tx_size_search_method =
         frame_is_boosted(cpi) ? USE_FULL_RD : USE_LARGESTALL;
     sf->mode_search_skip_flags =
-        (cm->frame_type == KEY_FRAME) ? 0 : FLAG_SKIP_INTRA_DIRMISMATCH |
-                                                FLAG_SKIP_INTRA_BESTINTER |
-                                                FLAG_SKIP_COMP_BESTINTRA |
-                                                FLAG_SKIP_INTRA_LOWVAR;
+        (cm->frame_type == KEY_FRAME)
+            ? 0
+            : FLAG_SKIP_INTRA_DIRMISMATCH | FLAG_SKIP_INTRA_BESTINTER |
+                  FLAG_SKIP_COMP_BESTINTRA | FLAG_SKIP_INTRA_LOWVAR;
     sf->disable_filter_search_var_thresh = 100;
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
     sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX;
@@ -322,10 +322,10 @@
 
   if (speed >= 2) {
     sf->mode_search_skip_flags =
-        (cm->frame_type == KEY_FRAME) ? 0 : FLAG_SKIP_INTRA_DIRMISMATCH |
-                                                FLAG_SKIP_INTRA_BESTINTER |
-                                                FLAG_SKIP_COMP_BESTINTRA |
-                                                FLAG_SKIP_INTRA_LOWVAR;
+        (cm->frame_type == KEY_FRAME)
+            ? 0
+            : FLAG_SKIP_INTRA_DIRMISMATCH | FLAG_SKIP_INTRA_BESTINTER |
+                  FLAG_SKIP_COMP_BESTINTRA | FLAG_SKIP_INTRA_LOWVAR;
     sf->adaptive_pred_interp_filter = 2;
     sf->disable_filter_search_var_thresh = 50;
     sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
diff --git a/av1/encoder/subexp.c b/av1/encoder/subexp.c
index c40ce37..577b618 100644
--- a/av1/encoder/subexp.c
+++ b/av1/encoder/subexp.c
@@ -216,10 +216,9 @@
   return bestsavings;
 }
 
-int av1_prob_update_search_model_subframe(unsigned int ct[ENTROPY_NODES]
-                                                         [COEF_PROBS_BUFS][2],
-                                          const aom_prob *oldp, aom_prob *bestp,
-                                          aom_prob upd, int stepsize, int n) {
+int av1_prob_update_search_model_subframe(
+    unsigned int ct[ENTROPY_NODES][COEF_PROBS_BUFS][2], const aom_prob *oldp,
+    aom_prob *bestp, aom_prob upd, int stepsize, int n) {
   int i, old_b, new_b, update_b, savings, bestsavings;
   int newp;
   const int step_sign = *bestp > oldp[PIVOT_NODE] ? -1 : 1;
diff --git a/av1/encoder/subexp.h b/av1/encoder/subexp.h
index 9cd3c0b..e331582 100644
--- a/av1/encoder/subexp.h
+++ b/av1/encoder/subexp.h
@@ -38,10 +38,9 @@
 #if CONFIG_ENTROPY
 int av1_prob_update_search_subframe(unsigned int ct[][2], aom_prob oldp,
                                     aom_prob *bestp, aom_prob upd, int n);
-int av1_prob_update_search_model_subframe(unsigned int ct[ENTROPY_NODES]
-                                                         [COEF_PROBS_BUFS][2],
-                                          const aom_prob *oldp, aom_prob *bestp,
-                                          aom_prob upd, int stepsize, int n);
+int av1_prob_update_search_model_subframe(
+    unsigned int ct[ENTROPY_NODES][COEF_PROBS_BUFS][2], const aom_prob *oldp,
+    aom_prob *bestp, aom_prob upd, int stepsize, int n);
 #endif  // CONFIG_ENTROPY
 
 //
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index 549815f..9f23b04 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -412,11 +412,10 @@
   int i, j;
   int this_rate = 0;
   uint8_t color_order[PALETTE_MAX_SIZE];
-  const aom_prob(*const probs)[PALETTE_COLOR_INDEX_CONTEXTS]
-                              [PALETTE_COLORS - 1] =
-                                  plane == 0
-                                      ? av1_default_palette_y_color_index_prob
-                                      : av1_default_palette_uv_color_index_prob;
+  const aom_prob(
+      *const probs)[PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1] =
+      plane == 0 ? av1_default_palette_y_color_index_prob
+                 : av1_default_palette_uv_color_index_prob;
   int plane_block_width, rows, cols;
   av1_get_block_dimensions(bsize, plane, xd, &plane_block_width, NULL, &rows,
                            &cols);
diff --git a/y4menc.c b/y4menc.c
index dbdc2b4..b094f74 100644
--- a/y4menc.c
+++ b/y4menc.c
@@ -20,9 +20,9 @@
     case 8:
       color = fmt == AOM_IMG_FMT_444A
                   ? "C444alpha\n"
-                  : fmt == AOM_IMG_FMT_I444 ? "C444\n" : fmt == AOM_IMG_FMT_I422
-                                                             ? "C422\n"
-                                                             : "C420jpeg\n";
+                  : fmt == AOM_IMG_FMT_I444
+                        ? "C444\n"
+                        : fmt == AOM_IMG_FMT_I422 ? "C422\n" : "C420jpeg\n";
       break;
     case 9:
       color = fmt == AOM_IMG_FMT_I44416