av1/[common|decoder]: apply clang-format v5.0.0
Change-Id: I86befaf7aa35f3f9b18618db1a27d191c1f7af36
diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c
index 6a4f8a1..fd527db 100644
--- a/av1/common/av1_loopfilter.c
+++ b/av1/common/av1_loopfilter.c
@@ -396,7 +396,7 @@
,
int plane
#endif
- ) {
+) {
int seg_id;
// n_shift is the multiplier for lf_deltas
// the multiplier is 1 for when filter_lvl is between 0 and 31;
diff --git a/av1/common/av1_loopfilter.h b/av1/common/av1_loopfilter.h
index cd6297d..a4e2cae 100644
--- a/av1/common/av1_loopfilter.h
+++ b/av1/common/av1_loopfilter.h
@@ -143,7 +143,7 @@
,
int plane
#endif
- );
+);
void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
struct macroblockd *mbd, int filter_level,
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 0c43f45..5011a9c 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -326,7 +326,9 @@
#endif
} MB_MODE_INFO;
-typedef struct MODE_INFO { MB_MODE_INFO mbmi; } MODE_INFO;
+typedef struct MODE_INFO {
+ MB_MODE_INFO mbmi;
+} MODE_INFO;
#if CONFIG_INTRABC
#define NO_FILTER_FOR_IBC 1 // Disable in-loop filters for frame with intrabc
@@ -737,33 +739,15 @@
};
static const int av1_ext_tx_used[EXT_TX_SET_TYPES][TX_TYPES] = {
- {
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- },
- {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
};
static INLINE TxSetType get_ext_tx_set_type(TX_SIZE tx_size, BLOCK_SIZE bs,
@@ -791,14 +775,10 @@
// Maps tx set types to the indices.
static const int ext_tx_set_index[2][EXT_TX_SET_TYPES] = {
- {
- // Intra
- 0, -1, 2, -1, 1, -1, -1, -1, -1,
- },
- {
- // Inter
- 0, 3, -1, -1, -1, -1, 2, -1, 1,
- },
+ { // Intra
+ 0, -1, 2, -1, 1, -1, -1, -1, -16 },
+ { // Inter
+ 0, 3, -1, -1, -1, -1, 2, -1, 1 },
};
static INLINE int get_ext_tx_set(TX_SIZE tx_size, BLOCK_SIZE bs, int is_inter,
diff --git a/av1/common/cdef.c b/av1/common/cdef.c
index 8046f08..c448c91 100644
--- a/av1/common/cdef.c
+++ b/av1/common/cdef.c
@@ -31,9 +31,9 @@
for (int r = 0; r < maxr; r++) {
for (int c = 0; c < maxc; c++) {
- skip = skip &&
- cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
- ->mbmi.skip;
+ skip =
+ skip && cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
+ ->mbmi.skip;
}
}
return skip;
diff --git a/av1/common/convolve.h b/av1/common/convolve.h
index f9ee3e3..b95a58f 100644
--- a/av1/common/convolve.h
+++ b/av1/common/convolve.h
@@ -88,7 +88,7 @@
,
int w, int h
#endif
- ) {
+) {
#if CONFIG_DUAL_FILTER
InterpFilter filter_x = av1_extract_interp_filter(interp_filters, 1);
InterpFilter filter_y = av1_extract_interp_filter(interp_filters, 0);
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 3e3fa52..3a91fe6 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -145,8 +145,8 @@
#define DCT_MAX_VALUE_HIGH10 65536
#define DCT_MAX_VALUE_HIGH12 262144
-/* Coefficients are predicted via a 3-dimensional probability table. */
-
+/* Coefficients are predicted via a 3-dimensional probability table indexed on
+ * REF_TYPES, COEF_BANDS and COEF_CONTEXTS. */
#define REF_TYPES 2 // intra=0, inter=1
/* Middle dimension reflects the coefficient position within the transform. */
@@ -167,7 +167,6 @@
in meaning is perfectly OK because our context depends also on the
coefficient band (and since zigzag positions 0, 1, and 2 are in
distinct bands). */
-
#define COEFF_CONTEXTS 6
#define COEFF_CONTEXTS0 3 // for band 0
#define BAND_COEFF_CONTEXTS(band) \
@@ -205,7 +204,6 @@
// 128 lists of probabilities are stored for the following ONE node probs:
// 1, 3, 5, 7, ..., 253, 255
// In between probabilities are interpolated linearly
-
#define COEFF_PROB_MODELS 255
#define UNCONSTRAINED_NODES 3
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 091e437..1357c66 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -312,63 +312,27 @@
[CDF_SIZE(INTRA_MODES)];
static const int av1_ext_tx_ind[EXT_TX_SET_TYPES][TX_TYPES] = {
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0,
- },
- {
- 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0,
- },
- {
- 1, 2, 3, 6, 4, 5, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 3, 4, 5, 8, 6, 7, 9, 10, 11, 0, 1, 2, 0, 0, 0, 0,
- },
- {
- 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
- },
- {
- 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
- },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 3, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0 },
+ { 1, 5, 6, 4, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0 },
+ { 1, 2, 3, 6, 4, 5, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0 },
+ { 3, 4, 5, 8, 6, 7, 9, 10, 11, 0, 1, 2, 0, 0, 0, 0 },
+ { 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6 },
+ { 7, 8, 9, 12, 10, 11, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6 },
};
static const int av1_ext_tx_inv[EXT_TX_SET_TYPES][TX_TYPES] = {
- {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0, 0, 0,
- },
- {
- 9, 10, 11, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0,
- },
- {
- 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8,
- },
- {
- 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8,
- },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 9, 0, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 9, 0, 10, 11, 3, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 9, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0, 0, 0 },
+ { 9, 10, 11, 0, 1, 2, 4, 5, 3, 6, 7, 8, 0, 0, 0, 0 },
+ { 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8 },
+ { 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 4, 5, 3, 6, 7, 8 },
};
void av1_setup_frame_contexts(struct AV1Common *cm);
diff --git a/av1/common/mv.h b/av1/common/mv.h
index bd05fdc..4c547fe 100644
--- a/av1/common/mv.h
+++ b/av1/common/mv.h
@@ -235,7 +235,7 @@
,
int is_integer
#endif
- ) {
+) {
int_mv res;
const int32_t *mat = gm->wmmat;
int x, y, tx, ty;
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 56f2aba..c35ee80 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -102,7 +102,7 @@
,
int is_integer
#endif
- ) {
+) {
#if CONFIG_INTRABC
if (!is_inter_block(candidate)) return 0;
#endif // CONFIG_INTRABC
@@ -803,7 +803,9 @@
const int blk_col_end = AOMMIN(xd->n8_w, mi_size_wide[BLOCK_64X64]);
const int tpl_sample_pos[3][2] = {
- { voffset, -2 }, { voffset, hoffset }, { voffset - 2, hoffset },
+ { voffset, -2 },
+ { voffset, hoffset },
+ { voffset - 2, hoffset },
};
const int allow_extension = (xd->n8_h >= mi_size_high[BLOCK_8X8]) &&
(xd->n8_h < mi_size_high[BLOCK_64X64]) &&
@@ -1269,7 +1271,7 @@
,
int is_integer
#endif
- ) {
+) {
int i;
// Make sure all the candidates are properly clamped etc
for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h
index 7ab8ec0..775a9a7 100644
--- a/av1/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -241,7 +241,7 @@
,
int is_integer
#endif
- ) {
+) {
#if CONFIG_AMVR
if (is_integer) {
integer_mv_precision(mv);
diff --git a/av1/common/pred_common.c b/av1/common/pred_common.c
index 3ad1309..3097604 100644
--- a/av1/common/pred_common.c
+++ b/av1/common/pred_common.c
@@ -255,9 +255,8 @@
const MV_REFERENCE_FRAME frfl = left_mbmi->ref_frame[0];
if (a_sg && l_sg) { // single/single
- pred_context =
- 1 +
- 2 * (!(IS_BACKWARD_REF_FRAME(frfa) ^ IS_BACKWARD_REF_FRAME(frfl)));
+ pred_context = 1 + 2 * (!(IS_BACKWARD_REF_FRAME(frfa) ^
+ IS_BACKWARD_REF_FRAME(frfl)));
} else if (l_sg || a_sg) { // single/comp
const int uni_rfc =
a_sg ? has_uni_comp_refs(left_mbmi) : has_uni_comp_refs(above_mbmi);
@@ -412,9 +411,8 @@
pred_context =
1 + 2 * (!CHECK_GOLDEN_OR_LAST3(edge_mbmi->ref_frame[0]));
else // comp pred (1/3)
- pred_context = 1 +
- 2 * (!CHECK_GOLDEN_OR_LAST3(
- edge_mbmi->ref_frame[fwd_ref_sign_idx]));
+ pred_context = 1 + 2 * (!CHECK_GOLDEN_OR_LAST3(
+ edge_mbmi->ref_frame[fwd_ref_sign_idx]));
} else { // inter/inter
const int l_sg = !has_second_ref(left_mbmi);
const int a_sg = !has_second_ref(above_mbmi);
@@ -821,9 +819,8 @@
else
pred_context = 4 * CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]);
} else { // comp
- pred_context = 1 +
- 2 * (CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]) ||
- CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[1]));
+ pred_context = 1 + 2 * (CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[0]) ||
+ CHECK_LAST_OR_LAST2(edge_mbmi->ref_frame[1]));
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
@@ -917,9 +914,8 @@
else
pred_context = 4 * (edge_mbmi->ref_frame[0] == LAST_FRAME);
} else { // comp
- pred_context = 1 +
- 2 * (edge_mbmi->ref_frame[0] == LAST_FRAME ||
- edge_mbmi->ref_frame[1] == LAST_FRAME);
+ pred_context = 1 + 2 * (edge_mbmi->ref_frame[0] == LAST_FRAME ||
+ edge_mbmi->ref_frame[1] == LAST_FRAME);
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
@@ -1009,9 +1005,8 @@
else
pred_context = 4 * (edge_mbmi->ref_frame[0] == LAST3_FRAME);
} else { // comp
- pred_context = 1 +
- 2 * (edge_mbmi->ref_frame[0] == LAST3_FRAME ||
- edge_mbmi->ref_frame[1] == LAST3_FRAME);
+ pred_context = 1 + 2 * (edge_mbmi->ref_frame[0] == LAST3_FRAME ||
+ edge_mbmi->ref_frame[1] == LAST3_FRAME);
}
} else { // inter/inter
const int above_has_second = has_second_ref(above_mbmi);
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index 98597ea..e8412a6 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -78,7 +78,7 @@
#if CONFIG_AMVR
&& xd->cur_frame_force_integer_mv == 0
#endif
- ) {
+ ) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
const struct buf_2d *const pre_buf = &pd->pre[ref];
av1_warp_plane(&final_warp_params,
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index 72f3744..8dc3be1 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -101,12 +101,8 @@
uint8_t has_tr_16x16[8] = {
255, 85, 119, 85, 127, 85, 119, 85,
};
-uint8_t has_tr_16x32[4] = {
- 255, 119, 127, 119,
-};
-uint8_t has_tr_32x16[4] = {
- 15, 5, 7, 5,
-};
+uint8_t has_tr_16x32[4] = { 255, 119, 127, 119 };
+uint8_t has_tr_32x16[4] = { 15, 5, 7, 5 };
uint8_t has_tr_32x32[2] = { 95, 87 };
uint8_t has_tr_32x64[1] = { 127 };
uint8_t has_tr_64x32[1] = { 19 };
@@ -129,18 +125,10 @@
uint8_t has_tr_32x8[8] = {
15, 0, 5, 0, 7, 0, 5, 0,
};
-uint8_t has_tr_16x64[2] = {
- 255, 127,
-};
-uint8_t has_tr_64x16[2] = {
- 3, 1,
-};
-uint8_t has_tr_32x128[1] = {
- 15,
-};
-uint8_t has_tr_128x32[1] = {
- 1,
-};
+uint8_t has_tr_16x64[2] = { 255, 127 };
+uint8_t has_tr_64x16[2] = { 3, 1 };
+uint8_t has_tr_32x128[1] = { 15 };
+uint8_t has_tr_128x32[1] = { 1 };
#if CONFIG_EXT_PARTITION
static const uint8_t *const has_tr_tables[BLOCK_SIZES_ALL] = {
@@ -184,9 +172,9 @@
// 4x16, 16x4, 8x32
has_tr_8x32, has_tr_32x8, has_tr_16x64,
// 32x8, 16x64, 64x16
- has_tr_64x16, has_tr_32x128, has_tr_128x32,
+ has_tr_64x16, has_tr_32x128, has_tr_128x32
#else
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL
#endif
};
#endif // CONFIG_EXT_PARTITION
@@ -224,7 +212,7 @@
// 32X64, 64X32, 64X64
has_tr_32x64, NULL, has_tr_vert_64x64,
// 64x128, 128x64, 128x128
- has_tr_64x128, NULL, has_tr_128x128,
+ has_tr_64x128, NULL, has_tr_128x128
};
#else
static const uint8_t *const has_tr_vert_tables[BLOCK_SIZES] = {
@@ -237,7 +225,7 @@
// 16X32, 32X16, 32X32
has_tr_32x64, NULL, has_tr_vert_64x64,
// 32X64, 64X32, 64X64
- has_tr_64x128, NULL, has_tr_128x128,
+ has_tr_64x128, NULL, has_tr_128x128
};
#endif
#endif // CONFIG_EXT_PARTITION_TYPES
@@ -348,15 +336,9 @@
uint8_t has_bl_16x16[8] = {
84, 16, 84, 0, 84, 16, 84, 0,
};
-uint8_t has_bl_16x32[4] = {
- 16, 0, 16, 0,
-};
-uint8_t has_bl_32x16[4] = {
- 78, 14, 78, 14,
-};
-uint8_t has_bl_32x32[2] = {
- 4, 4,
-};
+uint8_t has_bl_16x32[4] = { 16, 0, 16, 0 };
+uint8_t has_bl_32x16[4] = { 78, 14, 78, 14 };
+uint8_t has_bl_32x32[2] = { 4, 4 };
uint8_t has_bl_32x64[1] = { 0 };
uint8_t has_bl_64x32[1] = { 34 };
uint8_t has_bl_64x64[1] = { 0 };
@@ -377,18 +359,10 @@
uint8_t has_bl_32x8[8] = {
238, 78, 238, 14, 238, 78, 238, 14,
};
-uint8_t has_bl_16x64[2] = {
- 0, 0,
-};
-uint8_t has_bl_64x16[2] = {
- 42, 42,
-};
-uint8_t has_bl_32x128[1] = {
- 0,
-};
-uint8_t has_bl_128x32[1] = {
- 0,
-};
+uint8_t has_bl_16x64[2] = { 0, 0 };
+uint8_t has_bl_64x16[2] = { 42, 42 };
+uint8_t has_bl_32x128[1] = { 0 };
+uint8_t has_bl_128x32[1] = { 0 };
#if CONFIG_EXT_PARTITION
static const uint8_t *const has_bl_tables[BLOCK_SIZES_ALL] = {
@@ -432,9 +406,9 @@
// 4x16, 16x4, 8x32
has_bl_8x32, has_bl_32x8, has_bl_16x64,
// 32x8, 16x64, 64x16
- has_bl_64x16, has_bl_32x128, has_bl_128x32,
+ has_bl_64x16, has_bl_32x128, has_bl_128x32
#else
- NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL
#endif
};
#endif // CONFIG_EXT_PARTITION
@@ -472,7 +446,7 @@
// 32X64, 64X32, 64X64
has_bl_32x64, NULL, has_bl_vert_64x64,
// 64x128, 128x64, 128x128
- has_bl_64x128, NULL, has_bl_128x128,
+ has_bl_64x128, NULL, has_bl_128x128
};
#else
static const uint8_t *const has_bl_vert_tables[BLOCK_SIZES] = {
@@ -485,7 +459,7 @@
// 16X32, 32X16, 32X32
has_bl_32x64, NULL, has_bl_vert_64x64,
// 32X64, 64X32, 64X64
- has_bl_64x128, NULL, has_bl_128x128,
+ has_bl_64x128, NULL, has_bl_128x128
};
#endif
#endif // CONFIG_EXT_PARTITION_TYPES
diff --git a/av1/common/restoration.h b/av1/common/restoration.h
index 394c9ac..2f55ec4 100644
--- a/av1/common/restoration.h
+++ b/av1/common/restoration.h
@@ -132,10 +132,9 @@
#define WIENER_FILT_TAP0_MIDV (3)
#define WIENER_FILT_TAP1_MIDV (-7)
#define WIENER_FILT_TAP2_MIDV (15)
-#define WIENER_FILT_TAP3_MIDV \
- (WIENER_FILT_STEP - \
- 2 * (WIENER_FILT_TAP0_MIDV + WIENER_FILT_TAP1_MIDV + \
- WIENER_FILT_TAP2_MIDV))
+#define WIENER_FILT_TAP3_MIDV \
+ (WIENER_FILT_STEP - 2 * (WIENER_FILT_TAP0_MIDV + WIENER_FILT_TAP1_MIDV + \
+ WIENER_FILT_TAP2_MIDV))
#define WIENER_FILT_TAP0_BITS 4
#define WIENER_FILT_TAP1_BITS 5
@@ -258,7 +257,9 @@
wiener_info->vfilter[6] = wiener_info->hfilter[6] = WIENER_FILT_TAP0_MIDV;
}
-typedef struct { int h_start, h_end, v_start, v_end; } RestorationTileLimits;
+typedef struct {
+ int h_start, h_end, v_start, v_end;
+} RestorationTileLimits;
extern const sgr_params_type sgr_params[SGRPROJ_PARAMS];
extern int sgrproj_mtable[MAX_EPS][MAX_NELEM];
diff --git a/av1/common/seg_common.h b/av1/common/seg_common.h
index 3be785f..0e8717b 100644
--- a/av1/common/seg_common.h
+++ b/av1/common/seg_common.h
@@ -46,7 +46,7 @@
SEG_LVL_ALT_Q = 0, // Use alternate Quantizer ....
SEG_LVL_ALT_LF = 1, // Use alternate loop filter value...
SEG_LVL_REF_FRAME = 2, // Optional Segment reference frame
- SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
+ SEG_LVL_SKIP = 3, // Optional Segment (0,0) + skip mode
#if CONFIG_SEGMENT_GLOBALMV
SEG_LVL_GLOBALMV = 4,
#endif
diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c
index d842ece..25e588e 100644
--- a/av1/common/thread_common.c
+++ b/av1/common/thread_common.c
@@ -322,7 +322,6 @@
// performance because of contention. If the multithreading code changes in
// the future then the number of workers used by the loopfilter should be
// revisited.
-
#if CONFIG_PARALLEL_DEBLOCKING
// Initialize cur_sb_col to -1 for all SB rows.
memset(lf_sync->cur_sb_col, -1, sizeof(*lf_sync->cur_sb_col) * sb_rows);
diff --git a/av1/common/tile_common.h b/av1/common/tile_common.h
index c7f1565..64cc2ab 100644
--- a/av1/common/tile_common.h
+++ b/av1/common/tile_common.h
@@ -48,7 +48,9 @@
// tiles horizontally or vertically in the frame.
int get_tile_size(int mi_frame_size, int log2_tile_num, int *ntiles);
-typedef struct { int left, top, right, bottom; } AV1PixelRect;
+typedef struct {
+ int left, top, right, bottom;
+} AV1PixelRect;
// Return the pixel extents of the given tile
AV1PixelRect av1_get_tile_rect(const TileInfo *tile_info,
diff --git a/av1/common/token_cdfs.h b/av1/common/token_cdfs.h
index d871f42..aa60a65 100644
--- a/av1/common/token_cdfs.h
+++ b/av1/common/token_cdfs.h
@@ -7527,6 +7527,6 @@
typedef coeff_cdf_model coeff_cdf_table[TX_SIZES][PLANE_TYPES];
static const coeff_cdf_table *av1_default_qctx_coef_cdfs[TOKEN_CDF_Q_CTXS] = {
&av1_default_coef_head_cdfs_q0, &av1_default_coef_head_cdfs_q1,
- &av1_default_coef_head_cdfs_q2, &av1_default_coef_head_cdfs_q3,
+ &av1_default_coef_head_cdfs_q2, &av1_default_coef_head_cdfs_q3
};
#endif // CONFIG_LV_MAP
diff --git a/av1/common/txb_common.h b/av1/common/txb_common.h
index 0bd9998..ab18d97 100644
--- a/av1/common/txb_common.h
+++ b/av1/common/txb_common.h
@@ -368,7 +368,7 @@
,
const TX_TYPE tx_type
#endif
- ) {
+) {
const int row = c >> bwl;
const int col = c - (row << bwl);
const int stride = (1 << bwl) + TX_PAD_HOR;
diff --git a/av1/common/x86/av1_inv_txfm_sse2.c b/av1/common/x86/av1_inv_txfm_sse2.c
index fdc5a13..bf595a1 100644
--- a/av1/common/x86/av1_inv_txfm_sse2.c
+++ b/av1/common/x86/av1_inv_txfm_sse2.c
@@ -1654,15 +1654,21 @@
}
static const transform_1d_sse2 lowbd_txfm8_1d_arr[TX_TYPES_1D] = {
- idct8_new_sse2, iadst8_new_sse2, iadst8_new_sse2, iidentity8_new_sse2,
+ idct8_new_sse2, iadst8_new_sse2, iadst8_new_sse2, iidentity8_new_sse2
};
static const transform_1d_sse2 lowbd_txfm16_1d_arr[TX_TYPES_1D] = {
- idct16_new_sse2, iadst16_new_sse2, iadst16_new_sse2, iidentity16_new_sse2,
+ idct16_new_sse2,
+ iadst16_new_sse2,
+ iadst16_new_sse2,
+ iidentity16_new_sse2,
};
static const transform_1d_sse2 lowbd_txfm32_1d_arr[TX_TYPES_1D] = {
- idct32_new_sse2, NULL, NULL, iidentity32_new_sse2,
+ idct32_new_sse2,
+ NULL,
+ NULL,
+ iidentity32_new_sse2,
};
void av1_lowbd_inv_txfm2d_add_8x8_sse2(const int32_t *input, uint8_t *output,
diff --git a/av1/common/x86/convolve_2d_avx2.c b/av1/common/x86/convolve_2d_avx2.c
index 605bc69..9a0dd45 100644
--- a/av1/common/x86/convolve_2d_avx2.c
+++ b/av1/common/x86/convolve_2d_avx2.c
@@ -64,8 +64,9 @@
_mm_loadu_si128((__m128i *)&src_ptr[(i * src_stride) + j]));
if (i + 1 < im_h)
data = _mm256_inserti128_si256(
- data, _mm_loadu_si128(
- (__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
+ data,
+ _mm_loadu_si128(
+ (__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
1);
__m256i res = convolve_x(data, coeffs_x, filt);
@@ -198,8 +199,9 @@
// Load the next line
if (i + 1 < im_h)
data = _mm256_inserti128_si256(
- data, _mm_loadu_si128(
- (__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
+ data,
+ _mm_loadu_si128(
+ (__m128i *)&src_ptr[(i * src_stride) + j + src_stride]),
1);
__m256i res = convolve_x(data, coeffs_h, filt);
diff --git a/av1/common/x86/convolve_avx2.c b/av1/common/x86/convolve_avx2.c
index b450ff2..3692b60 100644
--- a/av1/common/x86/convolve_avx2.c
+++ b/av1/common/x86/convolve_avx2.c
@@ -425,8 +425,9 @@
for (i = 0; i < h; i += 2) {
data = &src_ptr[i * src_stride + j];
const __m256i src_67a = _mm256_permute2x128_si256(
- src6, _mm256_castsi128_si256(
- _mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
+ src6,
+ _mm256_castsi128_si256(
+ _mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
0x20);
src6 = _mm256_castsi128_si256(
@@ -577,8 +578,9 @@
for (i = 0; i < h; i += 2) {
data = &src_ptr[i * src_stride + j];
const __m256i src_67a = _mm256_permute2x128_si256(
- src6, _mm256_castsi128_si256(
- _mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
+ src6,
+ _mm256_castsi128_si256(
+ _mm_loadu_si128((__m128i *)(data + 7 * src_stride))),
0x20);
src6 = _mm256_castsi128_si256(
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index c649c8e..16dce8a 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -3306,8 +3306,6 @@
return rb;
}
-//------------------------------------------------------------------------------
-
#if CONFIG_FRAME_SIZE
void av1_read_frame_size(struct aom_read_bit_buffer *rb, int num_bits_width,
int num_bits_height, int *width, int *height) {
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index b9939a0..6d79df9 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -1629,7 +1629,7 @@
#if CONFIG_SEGMENT_GLOBALMV
|| segfeature_active(&cm->seg, segment_id, SEG_LVL_GLOBALMV)
#endif
- ) {
+ ) {
if (!av1_is_valid_scale(&cm->frame_refs[0].sf)) return 0;
}
const int ctx = av1_get_intra_inter_context(xd);
@@ -2002,7 +2002,7 @@
#if CONFIG_EXT_SKIP
&& !mbmi->skip_mode
#endif // CONFIG_EXT_SKIP
- ) {
+ ) {
// Read idx to indicate current compound inter prediction mode group
const int masked_compound_used =
is_any_masked_compound_used(bsize) && cm->allow_masked_compound;
@@ -2050,7 +2050,7 @@
#if CONFIG_EXT_SKIP
&& !mbmi->skip_mode
#endif // CONFIG_EXT_SKIP
- ) {
+ ) {
if (is_any_masked_compound_used(bsize)) {
if (cm->allow_masked_compound) {
if (!is_interinter_compound_used(COMPOUND_WEDGE, bsize))