apply clang-format
Change-Id: If22018f8911d9d7ee99c2127bdfcc56e42b0e2d7
diff --git a/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c
index eec2ef0..1449dd8 100644
--- a/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c
+++ b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c
@@ -43,14 +43,14 @@
(__clang_major__ == 5 && __clang_minor__ == 0)))
#define MM256_BROADCASTSI128_SI256(x) \
- _mm_broadcastsi128_si256((__m128i const *) & (x))
+ _mm_broadcastsi128_si256((__m128i const *)&(x))
#else // clang > 3.3, and not 5.0 on macosx.
#define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x)
#endif // clang <= 3.3
#elif defined(__GNUC__)
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 6)
#define MM256_BROADCASTSI128_SI256(x) \
- _mm_broadcastsi128_si256((__m128i const *) & (x))
+ _mm_broadcastsi128_si256((__m128i const *)&(x))
#elif __GNUC__ == 4 && __GNUC_MINOR__ == 7
#define MM256_BROADCASTSI128_SI256(x) _mm_broadcastsi128_si256(x)
#else // gcc > 4.7
diff --git a/aom_dsp/x86/blend_a64_mask_sse4.c b/aom_dsp/x86/blend_a64_mask_sse4.c
index cd85b1f..c3ce123 100644
--- a/aom_dsp/x86/blend_a64_mask_sse4.c
+++ b/aom_dsp/x86/blend_a64_mask_sse4.c
@@ -438,7 +438,7 @@
const uint8_t *mask, uint32_t mask_stride, int h,
int w, int suby, int subx) {
typedef void (*blend_fn)(
- uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
+ uint8_t * dst, uint32_t dst_stride, const uint8_t *src0,
uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w);
@@ -872,7 +872,7 @@
uint32_t mask_stride, int h, int w,
int suby, int subx, int bd) {
typedef void (*blend_fn)(
- uint16_t *dst, uint32_t dst_stride, const uint16_t *src0,
+ uint16_t * dst, uint32_t dst_stride, const uint16_t *src0,
uint32_t src0_stride, const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w);
diff --git a/aom_dsp/x86/blend_a64_vmask_sse4.c b/aom_dsp/x86/blend_a64_vmask_sse4.c
index 22b340f..c46f312 100644
--- a/aom_dsp/x86/blend_a64_vmask_sse4.c
+++ b/aom_dsp/x86/blend_a64_vmask_sse4.c
@@ -113,7 +113,7 @@
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w) {
- typedef void (*blend_fn)(uint8_t *dst, uint32_t dst_stride,
+ typedef void (*blend_fn)(uint8_t * dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w);
@@ -241,7 +241,7 @@
uint8_t *dst_8, uint32_t dst_stride, const uint8_t *src0_8,
uint32_t src0_stride, const uint8_t *src1_8, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd) {
- typedef void (*blend_fn)(uint16_t *dst, uint32_t dst_stride,
+ typedef void (*blend_fn)(uint16_t * dst, uint32_t dst_stride,
const uint16_t *src0, uint32_t src0_stride,
const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w);
diff --git a/aom_ports/x86.h b/aom_ports/x86.h
index 269a2a2..e5680ca 100644
--- a/aom_ports/x86.h
+++ b/aom_ports/x86.h
@@ -127,7 +127,7 @@
: "c"(ecx));
return ((uint64_t)edx << 32) | eax;
}
-#elif(defined(_M_X64) || defined(_M_IX86)) && defined(_MSC_FULL_VER) && \
+#elif (defined(_M_X64) || defined(_M_IX86)) && defined(_MSC_FULL_VER) && \
_MSC_FULL_VER >= 160040219 // >= VS2010 SP1
#include <immintrin.h>
#define xgetbv() _xgetbv(0)
diff --git a/aomenc.c b/aomenc.c
index 2f856d2..31f26c0 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -1967,8 +1967,7 @@
if (global.pass && global.passes == 2)
FOREACH_STREAM({
if (!stream->config.stats_fn)
- die(
- "Stream %d: Must specify --fpf when --pass=%d"
+ die("Stream %d: Must specify --fpf when --pass=%d"
" and --passes=2\n",
stream->index, global.pass);
});
diff --git a/av1/common/av1_fwd_txfm1d.c b/av1/common/av1_fwd_txfm1d.c
index 3dc960c..4c695ae 100644
--- a/av1/common/av1_fwd_txfm1d.c
+++ b/av1/common/av1_fwd_txfm1d.c
@@ -32,11 +32,11 @@
#else
#define range_check(stage, input, buf, size, bit) \
{ \
- (void) stage; \
- (void) input; \
- (void) buf; \
- (void) size; \
- (void) bit; \
+ (void)stage; \
+ (void)input; \
+ (void)buf; \
+ (void)size; \
+ (void)bit; \
}
#endif
diff --git a/av1/common/av1_inv_txfm1d.c b/av1/common/av1_inv_txfm1d.c
index dbb463f..2e9bbcb 100644
--- a/av1/common/av1_inv_txfm1d.c
+++ b/av1/common/av1_inv_txfm1d.c
@@ -32,11 +32,11 @@
#else
#define range_check(stage, input, buf, size, bit) \
{ \
- (void) stage; \
- (void) input; \
- (void) buf; \
- (void) size; \
- (void) bit; \
+ (void)stage; \
+ (void)input; \
+ (void)buf; \
+ (void)size; \
+ (void)bit; \
}
#endif
diff --git a/av1/common/av1_txfm.h b/av1/common/av1_txfm.h
index 289f953..3b78981 100644
--- a/av1/common/av1_txfm.h
+++ b/av1/common/av1_txfm.h
@@ -24,45 +24,46 @@
// cospi_arr[i][j] = (int)round(cos(M_PI*j/128) * (1<<(cos_bit_min+i)));
static const int32_t cospi_arr[7][64] = {
{ 1024, 1024, 1023, 1021, 1019, 1016, 1013, 1009, 1004, 999, 993, 987, 980,
- 972, 964, 955, 946, 936, 926, 915, 903, 891, 878, 865, 851, 837, 822, 807,
- 792, 775, 759, 742, 724, 706, 688, 669, 650, 630, 610, 590, 569, 548, 526,
- 505, 483, 460, 438, 415, 392, 369, 345, 321, 297, 273, 249, 224, 200, 175,
- 150, 125, 100, 75, 50, 25 },
- { 2048, 2047, 2046, 2042, 2038, 2033, 2026, 2018, 2009, 1998, 1987, 1974,
- 1960, 1945, 1928, 1911, 1892, 1872, 1851, 1829, 1806, 1782, 1757, 1730,
- 1703, 1674, 1645, 1615, 1583, 1551, 1517, 1483, 1448, 1412, 1375, 1338,
- 1299, 1260, 1220, 1179, 1138, 1096, 1053, 1009, 965, 921, 876, 830, 784,
- 737, 690, 642, 595, 546, 498, 449, 400, 350, 301, 251, 201, 151, 100, 50 },
- { 4096, 4095, 4091, 4085, 4076, 4065, 4052, 4036, 4017, 3996, 3973, 3948,
- 3920, 3889, 3857, 3822, 3784, 3745, 3703, 3659, 3612, 3564, 3513, 3461,
- 3406, 3349, 3290, 3229, 3166, 3102, 3035, 2967, 2896, 2824, 2751, 2675,
- 2598, 2520, 2440, 2359, 2276, 2191, 2106, 2019, 1931, 1842, 1751, 1660,
- 1567, 1474, 1380, 1285, 1189, 1092, 995, 897, 799, 700, 601, 501, 401, 301,
- 201, 101 },
- { 8192, 8190, 8182, 8170, 8153, 8130, 8103, 8071, 8035, 7993, 7946, 7895,
- 7839, 7779, 7713, 7643, 7568, 7489, 7405, 7317, 7225, 7128, 7027, 6921,
- 6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933, 5793, 5649, 5501, 5351,
- 5197, 5040, 4880, 4717, 4551, 4383, 4212, 4038, 3862, 3683, 3503, 3320,
- 3135, 2948, 2760, 2570, 2378, 2185, 1990, 1795, 1598, 1401, 1202, 1003, 803,
- 603, 402, 201 },
+ 972, 964, 955, 946, 936, 926, 915, 903, 891, 878, 865, 851, 837,
+ 822, 807, 792, 775, 759, 742, 724, 706, 688, 669, 650, 630, 610,
+ 590, 569, 548, 526, 505, 483, 460, 438, 415, 392, 369, 345, 321,
+ 297, 273, 249, 224, 200, 175, 150, 125, 100, 75, 50, 25 },
+ { 2048, 2047, 2046, 2042, 2038, 2033, 2026, 2018, 2009, 1998, 1987,
+ 1974, 1960, 1945, 1928, 1911, 1892, 1872, 1851, 1829, 1806, 1782,
+ 1757, 1730, 1703, 1674, 1645, 1615, 1583, 1551, 1517, 1483, 1448,
+ 1412, 1375, 1338, 1299, 1260, 1220, 1179, 1138, 1096, 1053, 1009,
+ 965, 921, 876, 830, 784, 737, 690, 642, 595, 546, 498,
+ 449, 400, 350, 301, 251, 201, 151, 100, 50 },
+ { 4096, 4095, 4091, 4085, 4076, 4065, 4052, 4036, 4017, 3996, 3973,
+ 3948, 3920, 3889, 3857, 3822, 3784, 3745, 3703, 3659, 3612, 3564,
+ 3513, 3461, 3406, 3349, 3290, 3229, 3166, 3102, 3035, 2967, 2896,
+ 2824, 2751, 2675, 2598, 2520, 2440, 2359, 2276, 2191, 2106, 2019,
+ 1931, 1842, 1751, 1660, 1567, 1474, 1380, 1285, 1189, 1092, 995,
+ 897, 799, 700, 601, 501, 401, 301, 201, 101 },
+ { 8192, 8190, 8182, 8170, 8153, 8130, 8103, 8071, 8035, 7993, 7946,
+ 7895, 7839, 7779, 7713, 7643, 7568, 7489, 7405, 7317, 7225, 7128,
+ 7027, 6921, 6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933, 5793,
+ 5649, 5501, 5351, 5197, 5040, 4880, 4717, 4551, 4383, 4212, 4038,
+ 3862, 3683, 3503, 3320, 3135, 2948, 2760, 2570, 2378, 2185, 1990,
+ 1795, 1598, 1401, 1202, 1003, 803, 603, 402, 201 },
{ 16384, 16379, 16364, 16340, 16305, 16261, 16207, 16143, 16069, 15986, 15893,
15791, 15679, 15557, 15426, 15286, 15137, 14978, 14811, 14635, 14449, 14256,
14053, 13842, 13623, 13395, 13160, 12916, 12665, 12406, 12140, 11866, 11585,
- 11297, 11003, 10702, 10394, 10080, 9760, 9434, 9102, 8765, 8423, 8076, 7723,
- 7366, 7005, 6639, 6270, 5897, 5520, 5139, 4756, 4370, 3981, 3590, 3196,
- 2801, 2404, 2006, 1606, 1205, 804, 402 },
+ 11297, 11003, 10702, 10394, 10080, 9760, 9434, 9102, 8765, 8423, 8076,
+ 7723, 7366, 7005, 6639, 6270, 5897, 5520, 5139, 4756, 4370, 3981,
+ 3590, 3196, 2801, 2404, 2006, 1606, 1205, 804, 402 },
{ 32768, 32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138, 31972, 31786,
31581, 31357, 31114, 30853, 30572, 30274, 29957, 29622, 29269, 28899, 28511,
28106, 27684, 27246, 26791, 26320, 25833, 25330, 24812, 24279, 23732, 23170,
22595, 22006, 21403, 20788, 20160, 19520, 18868, 18205, 17531, 16846, 16151,
- 15447, 14733, 14010, 13279, 12540, 11793, 11039, 10279, 9512, 8740, 7962,
- 7180, 6393, 5602, 4808, 4011, 3212, 2411, 1608, 804 },
+ 15447, 14733, 14010, 13279, 12540, 11793, 11039, 10279, 9512, 8740, 7962,
+ 7180, 6393, 5602, 4808, 4011, 3212, 2411, 1608, 804 },
{ 65536, 65516, 65457, 65358, 65220, 65043, 64827, 64571, 64277, 63944, 63572,
63162, 62714, 62228, 61705, 61145, 60547, 59914, 59244, 58538, 57798, 57022,
56212, 55368, 54491, 53581, 52639, 51665, 50660, 49624, 48559, 47464, 46341,
45190, 44011, 42806, 41576, 40320, 39040, 37736, 36410, 35062, 33692, 32303,
30893, 29466, 28020, 26558, 25080, 23586, 22078, 20557, 19024, 17479, 15924,
- 14359, 12785, 11204, 9616, 8022, 6424, 4821, 3216, 1608 }
+ 14359, 12785, 11204, 9616, 8022, 6424, 4821, 3216, 1608 }
};
static INLINE int32_t round_shift(int32_t value, int bit) {
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index f9f82e1..40f88a3 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -288,8 +288,8 @@
ENTROPY_CONTEXT *left_context;
int16_t seg_dequant[MAX_SEGMENTS][2];
#if CONFIG_NEW_QUANT
- dequant_val_type_nuq
- seg_dequant_nuq[MAX_SEGMENTS][QUANT_PROFILES][COEF_BANDS];
+ dequant_val_type_nuq seg_dequant_nuq[MAX_SEGMENTS][QUANT_PROFILES]
+ [COEF_BANDS];
#endif
uint8_t *color_index_map;
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 79ad094..25ac3ed 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -2857,8 +2857,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];
int i, j, k, l, m;
for (i = 0; i < PLANE_TYPES; ++i)
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 01db1e5..ac47b3b 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -135,10 +135,10 @@
// #define ENTROPY_STATS
-typedef unsigned int
- av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_TOKENS];
-typedef unsigned int
- av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_NODES][2];
+typedef unsigned int av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
+ [ENTROPY_TOKENS];
+typedef unsigned int av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
+ [ENTROPY_NODES][2];
#define SUBEXP_PARAM 4 /* Subexponential code parameter */
#define MODULUS_PARAM 13 /* Modulus parameter */
@@ -189,8 +189,8 @@
extern const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)];
extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
#if CONFIG_ANS
-extern const AnsP10
- av1_pareto8_token_probs[COEFF_PROB_MODELS][ENTROPY_TOKENS - 2];
+extern const AnsP10 av1_pareto8_token_probs[COEFF_PROB_MODELS]
+ [ENTROPY_TOKENS - 2];
typedef rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
#endif // CONFIG_ANS
@@ -198,8 +198,9 @@
typedef aom_prob av1_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[UNCONSTRAINED_NODES];
-typedef unsigned int av1_coeff_count_model
- [REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1];
+typedef unsigned int av1_coeff_count_model[REF_TYPES][COEF_BANDS]
+ [COEFF_CONTEXTS]
+ [UNCONSTRAINED_NODES + 1];
void av1_model_to_full_probs(const aom_prob *model, aom_prob *full);
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index e1593e3..62bf0a4 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -319,28 +319,32 @@
const aom_tree_index av1_motvar_tree[TREE_SIZE(MOTION_VARIATIONS)] = {
-SIMPLE_TRANSLATION, -OBMC_CAUSAL
};
-static const aom_prob default_motvar_prob[BLOCK_SIZES][MOTION_VARIATIONS - 1] =
- {
- { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
- { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
+static const aom_prob default_motvar_prob[BLOCK_SIZES]
+ [MOTION_VARIATIONS - 1] = {
+ { 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_OBMC && CONFIG_WARPED_MOTION
const aom_tree_index av1_motvar_tree[TREE_SIZE(MOTION_VARIATIONS)] = {
-SIMPLE_TRANSLATION, -WARPED_CAUSAL
};
-static const aom_prob default_motvar_prob[BLOCK_SIZES][MOTION_VARIATIONS - 1] =
- {
- { 255 }, { 255 }, { 255 }, { 151 }, { 153 }, { 144 }, { 178 },
- { 165 }, { 160 }, { 207 }, { 195 }, { 168 }, { 244 },
+static const aom_prob default_motvar_prob[BLOCK_SIZES]
+ [MOTION_VARIATIONS - 1] = {
+ { 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_OBMC && CONFIG_WARPED_MOTION
@@ -500,16 +504,19 @@
#endif // CONFIG_EXT_PARTITION
};
-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[2] = { 253, 229 };
@@ -538,279 +545,280 @@
-PALETTE_COLOR_SEVEN, -PALETTE_COLOR_EIGHT },
};
-const aom_prob av1_default_palette_y_color_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] = {
- {
- // 2 colors
- { 230, 255, 128, 128, 128, 128, 128 },
- { 214, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 240, 255, 128, 128, 128, 128, 128 },
- { 73, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 130, 255, 128, 128, 128, 128, 128 },
- { 227, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 188, 255, 128, 128, 128, 128, 128 },
- { 75, 255, 128, 128, 128, 128, 128 },
- { 250, 255, 128, 128, 128, 128, 128 },
- { 223, 255, 128, 128, 128, 128, 128 },
- { 252, 255, 128, 128, 128, 128, 128 },
- },
- {
- // 3 colors
- { 229, 137, 255, 128, 128, 128, 128 },
- { 197, 120, 255, 128, 128, 128, 128 },
- { 107, 195, 255, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 27, 151, 255, 128, 128, 128, 128 },
- { 230, 130, 255, 128, 128, 128, 128 },
- { 37, 230, 255, 128, 128, 128, 128 },
- { 67, 221, 255, 128, 128, 128, 128 },
- { 124, 230, 255, 128, 128, 128, 128 },
- { 195, 109, 255, 128, 128, 128, 128 },
- { 99, 122, 255, 128, 128, 128, 128 },
- { 205, 208, 255, 128, 128, 128, 128 },
- { 40, 235, 255, 128, 128, 128, 128 },
- { 251, 132, 255, 128, 128, 128, 128 },
- { 237, 186, 255, 128, 128, 128, 128 },
- { 253, 112, 255, 128, 128, 128, 128 },
- },
- {
- // 4 colors
- { 195, 87, 128, 255, 128, 128, 128 },
- { 143, 100, 123, 255, 128, 128, 128 },
- { 94, 124, 119, 255, 128, 128, 128 },
- { 77, 91, 130, 255, 128, 128, 128 },
- { 39, 114, 178, 255, 128, 128, 128 },
- { 222, 94, 125, 255, 128, 128, 128 },
- { 44, 203, 132, 255, 128, 128, 128 },
- { 68, 175, 122, 255, 128, 128, 128 },
- { 110, 187, 124, 255, 128, 128, 128 },
- { 152, 91, 128, 255, 128, 128, 128 },
- { 70, 109, 181, 255, 128, 128, 128 },
- { 133, 113, 164, 255, 128, 128, 128 },
- { 47, 205, 133, 255, 128, 128, 128 },
- { 247, 94, 136, 255, 128, 128, 128 },
- { 205, 122, 146, 255, 128, 128, 128 },
- { 251, 100, 141, 255, 128, 128, 128 },
- },
- {
- // 5 colors
- { 195, 65, 84, 125, 255, 128, 128 },
- { 150, 76, 84, 121, 255, 128, 128 },
- { 94, 110, 81, 117, 255, 128, 128 },
- { 79, 85, 91, 139, 255, 128, 128 },
- { 26, 102, 139, 127, 255, 128, 128 },
- { 220, 73, 91, 119, 255, 128, 128 },
- { 38, 203, 86, 127, 255, 128, 128 },
- { 61, 186, 72, 124, 255, 128, 128 },
- { 132, 199, 84, 128, 255, 128, 128 },
- { 172, 52, 62, 120, 255, 128, 128 },
- { 102, 89, 121, 122, 255, 128, 128 },
- { 182, 48, 69, 186, 255, 128, 128 },
- { 36, 206, 87, 126, 255, 128, 128 },
- { 249, 55, 67, 122, 255, 128, 128 },
- { 218, 88, 75, 122, 255, 128, 128 },
- { 253, 64, 80, 119, 255, 128, 128 },
- },
- {
- // 6 colors
- { 182, 54, 64, 75, 118, 255, 128 },
- { 126, 67, 70, 76, 116, 255, 128 },
- { 79, 92, 67, 85, 120, 255, 128 },
- { 63, 61, 81, 118, 132, 255, 128 },
- { 21, 80, 105, 83, 119, 255, 128 },
- { 215, 72, 74, 74, 111, 255, 128 },
- { 50, 176, 63, 79, 120, 255, 128 },
- { 72, 148, 66, 77, 120, 255, 128 },
- { 105, 177, 57, 78, 130, 255, 128 },
- { 150, 66, 66, 80, 127, 255, 128 },
- { 81, 76, 109, 85, 116, 255, 128 },
- { 113, 81, 62, 96, 148, 255, 128 },
- { 54, 179, 69, 82, 121, 255, 128 },
- { 244, 47, 48, 67, 118, 255, 128 },
- { 198, 83, 53, 65, 121, 255, 128 },
- { 250, 42, 51, 69, 110, 255, 128 },
- },
- {
- // 7 colors
- { 182, 45, 54, 62, 74, 113, 255 },
- { 124, 63, 57, 62, 77, 114, 255 },
- { 77, 80, 56, 66, 76, 117, 255 },
- { 63, 57, 69, 98, 85, 131, 255 },
- { 19, 81, 98, 63, 80, 116, 255 },
- { 215, 56, 60, 63, 68, 105, 255 },
- { 50, 174, 50, 60, 79, 118, 255 },
- { 68, 151, 50, 58, 73, 117, 255 },
- { 104, 182, 53, 57, 79, 127, 255 },
- { 156, 50, 51, 63, 77, 111, 255 },
- { 88, 67, 97, 59, 82, 120, 255 },
- { 114, 81, 46, 65, 103, 132, 255 },
- { 55, 166, 57, 66, 82, 120, 255 },
- { 245, 34, 38, 43, 63, 114, 255 },
- { 203, 68, 45, 47, 60, 118, 255 },
- { 250, 35, 37, 47, 66, 110, 255 },
- },
- {
- // 8 colors
- { 180, 43, 46, 50, 56, 69, 109 },
- { 116, 53, 51, 49, 57, 73, 115 },
- { 79, 70, 49, 50, 59, 74, 117 },
- { 60, 54, 57, 70, 62, 83, 129 },
- { 20, 73, 85, 52, 66, 81, 119 },
- { 213, 56, 52, 49, 53, 62, 104 },
- { 48, 161, 41, 45, 56, 77, 116 },
- { 68, 139, 40, 47, 54, 71, 116 },
- { 123, 166, 42, 43, 52, 76, 130 },
- { 153, 44, 44, 47, 54, 79, 129 },
- { 87, 64, 83, 49, 60, 75, 127 },
- { 131, 68, 43, 48, 73, 96, 130 },
- { 55, 152, 45, 51, 64, 77, 113 },
- { 243, 30, 28, 33, 41, 65, 114 },
- { 202, 56, 35, 36, 42, 63, 123 },
- { 249, 31, 29, 32, 45, 68, 111 },
- }
- };
+const aom_prob
+ av1_default_palette_y_color_prob[PALETTE_MAX_SIZE - 1]
+ [PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS - 1] = {
+ {
+ // 2 colors
+ { 230, 255, 128, 128, 128, 128, 128 },
+ { 214, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 240, 255, 128, 128, 128, 128, 128 },
+ { 73, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 130, 255, 128, 128, 128, 128, 128 },
+ { 227, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 188, 255, 128, 128, 128, 128, 128 },
+ { 75, 255, 128, 128, 128, 128, 128 },
+ { 250, 255, 128, 128, 128, 128, 128 },
+ { 223, 255, 128, 128, 128, 128, 128 },
+ { 252, 255, 128, 128, 128, 128, 128 },
+ },
+ {
+ // 3 colors
+ { 229, 137, 255, 128, 128, 128, 128 },
+ { 197, 120, 255, 128, 128, 128, 128 },
+ { 107, 195, 255, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 27, 151, 255, 128, 128, 128, 128 },
+ { 230, 130, 255, 128, 128, 128, 128 },
+ { 37, 230, 255, 128, 128, 128, 128 },
+ { 67, 221, 255, 128, 128, 128, 128 },
+ { 124, 230, 255, 128, 128, 128, 128 },
+ { 195, 109, 255, 128, 128, 128, 128 },
+ { 99, 122, 255, 128, 128, 128, 128 },
+ { 205, 208, 255, 128, 128, 128, 128 },
+ { 40, 235, 255, 128, 128, 128, 128 },
+ { 251, 132, 255, 128, 128, 128, 128 },
+ { 237, 186, 255, 128, 128, 128, 128 },
+ { 253, 112, 255, 128, 128, 128, 128 },
+ },
+ {
+ // 4 colors
+ { 195, 87, 128, 255, 128, 128, 128 },
+ { 143, 100, 123, 255, 128, 128, 128 },
+ { 94, 124, 119, 255, 128, 128, 128 },
+ { 77, 91, 130, 255, 128, 128, 128 },
+ { 39, 114, 178, 255, 128, 128, 128 },
+ { 222, 94, 125, 255, 128, 128, 128 },
+ { 44, 203, 132, 255, 128, 128, 128 },
+ { 68, 175, 122, 255, 128, 128, 128 },
+ { 110, 187, 124, 255, 128, 128, 128 },
+ { 152, 91, 128, 255, 128, 128, 128 },
+ { 70, 109, 181, 255, 128, 128, 128 },
+ { 133, 113, 164, 255, 128, 128, 128 },
+ { 47, 205, 133, 255, 128, 128, 128 },
+ { 247, 94, 136, 255, 128, 128, 128 },
+ { 205, 122, 146, 255, 128, 128, 128 },
+ { 251, 100, 141, 255, 128, 128, 128 },
+ },
+ {
+ // 5 colors
+ { 195, 65, 84, 125, 255, 128, 128 },
+ { 150, 76, 84, 121, 255, 128, 128 },
+ { 94, 110, 81, 117, 255, 128, 128 },
+ { 79, 85, 91, 139, 255, 128, 128 },
+ { 26, 102, 139, 127, 255, 128, 128 },
+ { 220, 73, 91, 119, 255, 128, 128 },
+ { 38, 203, 86, 127, 255, 128, 128 },
+ { 61, 186, 72, 124, 255, 128, 128 },
+ { 132, 199, 84, 128, 255, 128, 128 },
+ { 172, 52, 62, 120, 255, 128, 128 },
+ { 102, 89, 121, 122, 255, 128, 128 },
+ { 182, 48, 69, 186, 255, 128, 128 },
+ { 36, 206, 87, 126, 255, 128, 128 },
+ { 249, 55, 67, 122, 255, 128, 128 },
+ { 218, 88, 75, 122, 255, 128, 128 },
+ { 253, 64, 80, 119, 255, 128, 128 },
+ },
+ {
+ // 6 colors
+ { 182, 54, 64, 75, 118, 255, 128 },
+ { 126, 67, 70, 76, 116, 255, 128 },
+ { 79, 92, 67, 85, 120, 255, 128 },
+ { 63, 61, 81, 118, 132, 255, 128 },
+ { 21, 80, 105, 83, 119, 255, 128 },
+ { 215, 72, 74, 74, 111, 255, 128 },
+ { 50, 176, 63, 79, 120, 255, 128 },
+ { 72, 148, 66, 77, 120, 255, 128 },
+ { 105, 177, 57, 78, 130, 255, 128 },
+ { 150, 66, 66, 80, 127, 255, 128 },
+ { 81, 76, 109, 85, 116, 255, 128 },
+ { 113, 81, 62, 96, 148, 255, 128 },
+ { 54, 179, 69, 82, 121, 255, 128 },
+ { 244, 47, 48, 67, 118, 255, 128 },
+ { 198, 83, 53, 65, 121, 255, 128 },
+ { 250, 42, 51, 69, 110, 255, 128 },
+ },
+ {
+ // 7 colors
+ { 182, 45, 54, 62, 74, 113, 255 },
+ { 124, 63, 57, 62, 77, 114, 255 },
+ { 77, 80, 56, 66, 76, 117, 255 },
+ { 63, 57, 69, 98, 85, 131, 255 },
+ { 19, 81, 98, 63, 80, 116, 255 },
+ { 215, 56, 60, 63, 68, 105, 255 },
+ { 50, 174, 50, 60, 79, 118, 255 },
+ { 68, 151, 50, 58, 73, 117, 255 },
+ { 104, 182, 53, 57, 79, 127, 255 },
+ { 156, 50, 51, 63, 77, 111, 255 },
+ { 88, 67, 97, 59, 82, 120, 255 },
+ { 114, 81, 46, 65, 103, 132, 255 },
+ { 55, 166, 57, 66, 82, 120, 255 },
+ { 245, 34, 38, 43, 63, 114, 255 },
+ { 203, 68, 45, 47, 60, 118, 255 },
+ { 250, 35, 37, 47, 66, 110, 255 },
+ },
+ {
+ // 8 colors
+ { 180, 43, 46, 50, 56, 69, 109 },
+ { 116, 53, 51, 49, 57, 73, 115 },
+ { 79, 70, 49, 50, 59, 74, 117 },
+ { 60, 54, 57, 70, 62, 83, 129 },
+ { 20, 73, 85, 52, 66, 81, 119 },
+ { 213, 56, 52, 49, 53, 62, 104 },
+ { 48, 161, 41, 45, 56, 77, 116 },
+ { 68, 139, 40, 47, 54, 71, 116 },
+ { 123, 166, 42, 43, 52, 76, 130 },
+ { 153, 44, 44, 47, 54, 79, 129 },
+ { 87, 64, 83, 49, 60, 75, 127 },
+ { 131, 68, 43, 48, 73, 96, 130 },
+ { 55, 152, 45, 51, 64, 77, 113 },
+ { 243, 30, 28, 33, 41, 65, 114 },
+ { 202, 56, 35, 36, 42, 63, 123 },
+ { 249, 31, 29, 32, 45, 68, 111 },
+ }
+ };
const aom_prob av1_default_palette_uv_color_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] = {
- {
- // 2 colors
- { 228, 255, 128, 128, 128, 128, 128 },
- { 195, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 228, 255, 128, 128, 128, 128, 128 },
- { 71, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 129, 255, 128, 128, 128, 128, 128 },
- { 206, 255, 128, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 136, 255, 128, 128, 128, 128, 128 },
- { 98, 255, 128, 128, 128, 128, 128 },
- { 236, 255, 128, 128, 128, 128, 128 },
- { 222, 255, 128, 128, 128, 128, 128 },
- { 249, 255, 128, 128, 128, 128, 128 },
- },
- {
- // 3 colors
- { 198, 136, 255, 128, 128, 128, 128 },
- { 178, 105, 255, 128, 128, 128, 128 },
- { 100, 206, 255, 128, 128, 128, 128 },
- { 128, 128, 128, 128, 128, 128, 128 },
- { 12, 136, 255, 128, 128, 128, 128 },
- { 219, 134, 255, 128, 128, 128, 128 },
- { 50, 198, 255, 128, 128, 128, 128 },
- { 61, 231, 255, 128, 128, 128, 128 },
- { 110, 209, 255, 128, 128, 128, 128 },
- { 173, 106, 255, 128, 128, 128, 128 },
- { 145, 166, 255, 128, 128, 128, 128 },
- { 156, 175, 255, 128, 128, 128, 128 },
- { 69, 183, 255, 128, 128, 128, 128 },
- { 241, 163, 255, 128, 128, 128, 128 },
- { 224, 160, 255, 128, 128, 128, 128 },
- { 246, 154, 255, 128, 128, 128, 128 },
- },
- {
- // 4 colors
- { 173, 88, 143, 255, 128, 128, 128 },
- { 146, 81, 127, 255, 128, 128, 128 },
- { 84, 134, 102, 255, 128, 128, 128 },
- { 69, 138, 140, 255, 128, 128, 128 },
- { 31, 103, 200, 255, 128, 128, 128 },
- { 217, 101, 139, 255, 128, 128, 128 },
- { 51, 174, 121, 255, 128, 128, 128 },
- { 64, 177, 109, 255, 128, 128, 128 },
- { 96, 179, 145, 255, 128, 128, 128 },
- { 164, 77, 114, 255, 128, 128, 128 },
- { 87, 94, 156, 255, 128, 128, 128 },
- { 105, 57, 173, 255, 128, 128, 128 },
- { 63, 158, 137, 255, 128, 128, 128 },
- { 236, 102, 156, 255, 128, 128, 128 },
- { 197, 115, 153, 255, 128, 128, 128 },
- { 245, 106, 154, 255, 128, 128, 128 },
- },
- {
- // 5 colors
- { 179, 64, 97, 129, 255, 128, 128 },
- { 137, 56, 88, 125, 255, 128, 128 },
- { 82, 107, 61, 118, 255, 128, 128 },
- { 59, 113, 86, 115, 255, 128, 128 },
- { 23, 88, 118, 130, 255, 128, 128 },
- { 213, 66, 90, 125, 255, 128, 128 },
- { 37, 181, 103, 121, 255, 128, 128 },
- { 47, 188, 61, 131, 255, 128, 128 },
- { 104, 185, 103, 144, 255, 128, 128 },
- { 163, 39, 76, 112, 255, 128, 128 },
- { 94, 74, 131, 126, 255, 128, 128 },
- { 142, 42, 103, 163, 255, 128, 128 },
- { 53, 162, 99, 149, 255, 128, 128 },
- { 239, 54, 84, 108, 255, 128, 128 },
- { 203, 84, 110, 147, 255, 128, 128 },
- { 248, 70, 105, 151, 255, 128, 128 },
- },
- {
- // 6 colors
- { 189, 50, 67, 90, 130, 255, 128 },
- { 114, 50, 55, 90, 123, 255, 128 },
- { 66, 76, 54, 82, 128, 255, 128 },
- { 43, 69, 69, 80, 129, 255, 128 },
- { 22, 59, 87, 88, 141, 255, 128 },
- { 203, 49, 68, 87, 122, 255, 128 },
- { 43, 157, 74, 104, 146, 255, 128 },
- { 54, 138, 51, 95, 138, 255, 128 },
- { 82, 171, 58, 102, 146, 255, 128 },
- { 129, 38, 59, 64, 168, 255, 128 },
- { 56, 67, 119, 92, 112, 255, 128 },
- { 96, 62, 53, 132, 82, 255, 128 },
- { 60, 147, 77, 108, 145, 255, 128 },
- { 238, 76, 73, 93, 148, 255, 128 },
- { 189, 86, 73, 103, 157, 255, 128 },
- { 246, 62, 75, 83, 167, 255, 128 },
- },
- {
- // 7 colors
- { 179, 42, 51, 73, 99, 134, 255 },
- { 119, 52, 52, 61, 64, 114, 255 },
- { 53, 77, 35, 65, 71, 131, 255 },
- { 38, 70, 51, 68, 89, 144, 255 },
- { 23, 65, 128, 73, 97, 131, 255 },
- { 210, 47, 52, 63, 81, 143, 255 },
- { 42, 159, 57, 68, 98, 143, 255 },
- { 49, 153, 45, 82, 93, 143, 255 },
- { 81, 169, 52, 72, 113, 151, 255 },
- { 136, 46, 35, 56, 75, 96, 255 },
- { 57, 84, 109, 47, 107, 131, 255 },
- { 128, 78, 57, 36, 128, 85, 255 },
- { 54, 149, 68, 77, 94, 153, 255 },
- { 243, 58, 50, 71, 81, 167, 255 },
- { 189, 92, 64, 70, 121, 173, 255 },
- { 248, 35, 38, 51, 82, 201, 255 },
- },
- {
- // 8 colors
- { 201, 40, 36, 42, 64, 92, 123 },
- { 116, 43, 33, 43, 73, 102, 128 },
- { 46, 77, 37, 69, 62, 78, 150 },
- { 40, 65, 52, 50, 76, 89, 133 },
- { 28, 48, 91, 17, 64, 77, 133 },
- { 218, 43, 43, 37, 56, 72, 163 },
- { 41, 155, 44, 83, 82, 129, 180 },
- { 44, 141, 29, 55, 64, 89, 147 },
- { 92, 166, 48, 45, 59, 126, 179 },
- { 169, 35, 49, 41, 36, 99, 139 },
- { 55, 77, 77, 56, 60, 75, 156 },
- { 155, 81, 51, 64, 57, 182, 255 },
- { 60, 134, 49, 49, 93, 128, 174 },
- { 244, 98, 51, 46, 22, 73, 238 },
- { 189, 70, 40, 87, 93, 79, 201 },
- { 248, 54, 49, 40, 29, 42, 227 },
- }
- };
+ [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS - 1] = { {
+ // 2 colors
+ { 228, 255, 128, 128, 128, 128, 128 },
+ { 195, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 228, 255, 128, 128, 128, 128, 128 },
+ { 71, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 129, 255, 128, 128, 128, 128, 128 },
+ { 206, 255, 128, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 136, 255, 128, 128, 128, 128, 128 },
+ { 98, 255, 128, 128, 128, 128, 128 },
+ { 236, 255, 128, 128, 128, 128, 128 },
+ { 222, 255, 128, 128, 128, 128, 128 },
+ { 249, 255, 128, 128, 128, 128, 128 },
+ },
+ {
+ // 3 colors
+ { 198, 136, 255, 128, 128, 128, 128 },
+ { 178, 105, 255, 128, 128, 128, 128 },
+ { 100, 206, 255, 128, 128, 128, 128 },
+ { 128, 128, 128, 128, 128, 128, 128 },
+ { 12, 136, 255, 128, 128, 128, 128 },
+ { 219, 134, 255, 128, 128, 128, 128 },
+ { 50, 198, 255, 128, 128, 128, 128 },
+ { 61, 231, 255, 128, 128, 128, 128 },
+ { 110, 209, 255, 128, 128, 128, 128 },
+ { 173, 106, 255, 128, 128, 128, 128 },
+ { 145, 166, 255, 128, 128, 128, 128 },
+ { 156, 175, 255, 128, 128, 128, 128 },
+ { 69, 183, 255, 128, 128, 128, 128 },
+ { 241, 163, 255, 128, 128, 128, 128 },
+ { 224, 160, 255, 128, 128, 128, 128 },
+ { 246, 154, 255, 128, 128, 128, 128 },
+ },
+ {
+ // 4 colors
+ { 173, 88, 143, 255, 128, 128, 128 },
+ { 146, 81, 127, 255, 128, 128, 128 },
+ { 84, 134, 102, 255, 128, 128, 128 },
+ { 69, 138, 140, 255, 128, 128, 128 },
+ { 31, 103, 200, 255, 128, 128, 128 },
+ { 217, 101, 139, 255, 128, 128, 128 },
+ { 51, 174, 121, 255, 128, 128, 128 },
+ { 64, 177, 109, 255, 128, 128, 128 },
+ { 96, 179, 145, 255, 128, 128, 128 },
+ { 164, 77, 114, 255, 128, 128, 128 },
+ { 87, 94, 156, 255, 128, 128, 128 },
+ { 105, 57, 173, 255, 128, 128, 128 },
+ { 63, 158, 137, 255, 128, 128, 128 },
+ { 236, 102, 156, 255, 128, 128, 128 },
+ { 197, 115, 153, 255, 128, 128, 128 },
+ { 245, 106, 154, 255, 128, 128, 128 },
+ },
+ {
+ // 5 colors
+ { 179, 64, 97, 129, 255, 128, 128 },
+ { 137, 56, 88, 125, 255, 128, 128 },
+ { 82, 107, 61, 118, 255, 128, 128 },
+ { 59, 113, 86, 115, 255, 128, 128 },
+ { 23, 88, 118, 130, 255, 128, 128 },
+ { 213, 66, 90, 125, 255, 128, 128 },
+ { 37, 181, 103, 121, 255, 128, 128 },
+ { 47, 188, 61, 131, 255, 128, 128 },
+ { 104, 185, 103, 144, 255, 128, 128 },
+ { 163, 39, 76, 112, 255, 128, 128 },
+ { 94, 74, 131, 126, 255, 128, 128 },
+ { 142, 42, 103, 163, 255, 128, 128 },
+ { 53, 162, 99, 149, 255, 128, 128 },
+ { 239, 54, 84, 108, 255, 128, 128 },
+ { 203, 84, 110, 147, 255, 128, 128 },
+ { 248, 70, 105, 151, 255, 128, 128 },
+ },
+ {
+ // 6 colors
+ { 189, 50, 67, 90, 130, 255, 128 },
+ { 114, 50, 55, 90, 123, 255, 128 },
+ { 66, 76, 54, 82, 128, 255, 128 },
+ { 43, 69, 69, 80, 129, 255, 128 },
+ { 22, 59, 87, 88, 141, 255, 128 },
+ { 203, 49, 68, 87, 122, 255, 128 },
+ { 43, 157, 74, 104, 146, 255, 128 },
+ { 54, 138, 51, 95, 138, 255, 128 },
+ { 82, 171, 58, 102, 146, 255, 128 },
+ { 129, 38, 59, 64, 168, 255, 128 },
+ { 56, 67, 119, 92, 112, 255, 128 },
+ { 96, 62, 53, 132, 82, 255, 128 },
+ { 60, 147, 77, 108, 145, 255, 128 },
+ { 238, 76, 73, 93, 148, 255, 128 },
+ { 189, 86, 73, 103, 157, 255, 128 },
+ { 246, 62, 75, 83, 167, 255, 128 },
+ },
+ {
+ // 7 colors
+ { 179, 42, 51, 73, 99, 134, 255 },
+ { 119, 52, 52, 61, 64, 114, 255 },
+ { 53, 77, 35, 65, 71, 131, 255 },
+ { 38, 70, 51, 68, 89, 144, 255 },
+ { 23, 65, 128, 73, 97, 131, 255 },
+ { 210, 47, 52, 63, 81, 143, 255 },
+ { 42, 159, 57, 68, 98, 143, 255 },
+ { 49, 153, 45, 82, 93, 143, 255 },
+ { 81, 169, 52, 72, 113, 151, 255 },
+ { 136, 46, 35, 56, 75, 96, 255 },
+ { 57, 84, 109, 47, 107, 131, 255 },
+ { 128, 78, 57, 36, 128, 85, 255 },
+ { 54, 149, 68, 77, 94, 153, 255 },
+ { 243, 58, 50, 71, 81, 167, 255 },
+ { 189, 92, 64, 70, 121, 173, 255 },
+ { 248, 35, 38, 51, 82, 201, 255 },
+ },
+ {
+ // 8 colors
+ { 201, 40, 36, 42, 64, 92, 123 },
+ { 116, 43, 33, 43, 73, 102, 128 },
+ { 46, 77, 37, 69, 62, 78, 150 },
+ { 40, 65, 52, 50, 76, 89, 133 },
+ { 28, 48, 91, 17, 64, 77, 133 },
+ { 218, 43, 43, 37, 56, 72, 163 },
+ { 41, 155, 44, 83, 82, 129, 180 },
+ { 44, 141, 29, 55, 64, 89, 147 },
+ { 92, 166, 48, 45, 59, 126, 179 },
+ { 169, 35, 49, 41, 36, 99, 139 },
+ { 55, 77, 77, 56, 60, 75, 156 },
+ { 155, 81, 51, 64, 57, 182, 255 },
+ { 60, 134, 49, 49, 93, 128, 174 },
+ { 244, 98, 51, 46, 22, 73, 238 },
+ { 189, 70, 40, 87, 93, 79, 201 },
+ { 248, 54, 49, 40, 29, 42, 227 },
+ } };
static const int palette_color_context_lookup[PALETTE_COLOR_CONTEXTS] = {
// (3, 0, 0, 0), (3, 2, 0, 0), (3, 3, 2, 0), (3, 3, 2, 2),
@@ -838,24 +846,24 @@
},
};
-static const aom_prob
- default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES - 1] = {
- {
- // Max tx_size is 8X8
- { 100 },
- { 66 },
- },
- {
- // Max tx_size is 16X16
- { 20, 152 },
- { 15, 101 },
- },
- {
- // Max tx_size is 32X32
- { 3, 136, 37 },
- { 5, 52, 13 },
- },
- };
+static const aom_prob default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS]
+ [TX_SIZES - 1] = {
+ {
+ // Max tx_size is 8X8
+ { 100 },
+ { 66 },
+ },
+ {
+ // Max tx_size is 16X16
+ { 20, 152 },
+ { 15, 101 },
+ },
+ {
+ // Max tx_size is 32X32
+ { 3, 136, 37 },
+ { 5, 52, 13 },
+ },
+ };
#if CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_VAR_TX
// the probability of (0) using recursive square tx partition vs.
@@ -962,21 +970,29 @@
};
#else // CONFIG_EXT_INTERP
#if CONFIG_DUAL_FILTER
-static const aom_prob default_switchable_interp_prob
- [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = {
- { 235, 162 }, { 36, 255 }, { 34, 3 }, { 149, 144 },
+static const aom_prob
+ default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
+ [SWITCHABLE_FILTERS - 1] = {
+ { 235, 162 }, { 36, 255 },
+ { 34, 3 }, { 149, 144 },
- { 235, 162 }, { 36, 255 }, { 34, 3 }, { 10, 3 },
+ { 235, 162 }, { 36, 255 },
+ { 34, 3 }, { 10, 3 },
- { 235, 162 }, { 36, 255 }, { 34, 3 }, { 149, 144 },
+ { 235, 162 }, { 36, 255 },
+ { 34, 3 }, { 149, 144 },
- { 235, 162 }, { 36, 255 }, { 34, 3 }, { 10, 3 },
- };
+ { 235, 162 }, { 36, 255 },
+ { 34, 3 }, { 10, 3 },
+ };
#else
-static const aom_prob default_switchable_interp_prob
- [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = {
- { 235, 162 }, { 36, 255 }, { 34, 3 }, { 149, 144 },
- };
+static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
+ [SWITCHABLE_FILTERS - 1] = {
+ { 235, 162 },
+ { 36, 255 },
+ { 34, 3 },
+ { 149, 144 },
+ };
#endif
#endif // CONFIG_EXT_INTERP
@@ -1080,166 +1096,167 @@
}
};
-static const aom_prob default_intra_ext_tx_prob
- [EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES - 1] = {
- {
- // ToDo(yaowu): remove unused entry 0.
- {
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- },
- {
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- },
- {
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
+static const aom_prob
+ default_intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
+ [TX_TYPES - 1] = {
+ {
+ // ToDo(yaowu): remove unused entry 0.
+ {
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ },
+ {
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ },
+ {
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
#if EXT_TX_SIZES == 4
- },
- {
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
- { 0 },
+ },
+ {
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
+ { 0 },
#endif
- },
- },
- {
- {
- { 8, 224, 32, 128, 64, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 9, 200, 32, 128, 64, 128 },
- { 8, 8, 32, 128, 224, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 32, 32, 128, 16, 64 },
- },
- {
- { 8, 224, 32, 128, 64, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 9, 200, 32, 128, 64, 128 },
- { 8, 8, 32, 128, 224, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 32, 32, 128, 16, 64 },
- },
- {
- { 8, 224, 32, 128, 64, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 9, 200, 32, 128, 64, 128 },
- { 8, 8, 32, 128, 224, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 32, 32, 128, 16, 64 },
+ },
+ },
+ {
+ {
+ { 8, 224, 32, 128, 64, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 9, 200, 32, 128, 64, 128 },
+ { 8, 8, 32, 128, 224, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 32, 32, 128, 16, 64 },
+ },
+ {
+ { 8, 224, 32, 128, 64, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 9, 200, 32, 128, 64, 128 },
+ { 8, 8, 32, 128, 224, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 32, 32, 128, 16, 64 },
+ },
+ {
+ { 8, 224, 32, 128, 64, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 9, 200, 32, 128, 64, 128 },
+ { 8, 8, 32, 128, 224, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 32, 32, 128, 16, 64 },
#if EXT_TX_SIZES == 4
- },
- {
- { 8, 224, 32, 128, 64, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 9, 200, 32, 128, 64, 128 },
- { 8, 8, 32, 128, 224, 128 },
- { 10, 32, 32, 128, 16, 192 },
- { 10, 32, 32, 128, 16, 64 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 23, 32, 128, 80, 176 },
- { 10, 32, 32, 128, 16, 64 },
+ },
+ {
+ { 8, 224, 32, 128, 64, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 9, 200, 32, 128, 64, 128 },
+ { 8, 8, 32, 128, 224, 128 },
+ { 10, 32, 32, 128, 16, 192 },
+ { 10, 32, 32, 128, 16, 64 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 23, 32, 128, 80, 176 },
+ { 10, 32, 32, 128, 16, 64 },
#endif
- },
- },
- {
- {
- { 8, 224, 64, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 9, 200, 64, 128 },
- { 8, 8, 224, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 10, 23, 80, 176 },
- { 10, 23, 80, 176 },
- { 10, 32, 16, 64 },
- },
- {
- { 8, 224, 64, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 9, 200, 64, 128 },
- { 8, 8, 224, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 10, 23, 80, 176 },
- { 10, 23, 80, 176 },
- { 10, 32, 16, 64 },
- },
- {
- { 8, 224, 64, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 9, 200, 64, 128 },
- { 8, 8, 224, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 10, 23, 80, 176 },
- { 10, 23, 80, 176 },
- { 10, 32, 16, 64 },
+ },
+ },
+ {
+ {
+ { 8, 224, 64, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 9, 200, 64, 128 },
+ { 8, 8, 224, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 10, 23, 80, 176 },
+ { 10, 23, 80, 176 },
+ { 10, 32, 16, 64 },
+ },
+ {
+ { 8, 224, 64, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 9, 200, 64, 128 },
+ { 8, 8, 224, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 10, 23, 80, 176 },
+ { 10, 23, 80, 176 },
+ { 10, 32, 16, 64 },
+ },
+ {
+ { 8, 224, 64, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 9, 200, 64, 128 },
+ { 8, 8, 224, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 10, 23, 80, 176 },
+ { 10, 23, 80, 176 },
+ { 10, 32, 16, 64 },
#if EXT_TX_SIZES == 4
- },
- {
- { 8, 224, 64, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 9, 200, 64, 128 },
- { 8, 8, 224, 128 },
- { 10, 32, 16, 192 },
- { 10, 32, 16, 64 },
- { 10, 23, 80, 176 },
- { 10, 23, 80, 176 },
- { 10, 32, 16, 64 },
+ },
+ {
+ { 8, 224, 64, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 9, 200, 64, 128 },
+ { 8, 8, 224, 128 },
+ { 10, 32, 16, 192 },
+ { 10, 32, 16, 64 },
+ { 10, 23, 80, 176 },
+ { 10, 23, 80, 176 },
+ { 10, 32, 16, 64 },
#endif
- },
- },
- };
+ },
+ },
+ };
#else
@@ -1264,11 +1281,14 @@
#endif // CONFIG_EXT_TX
#if CONFIG_EXT_INTRA
-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 },
+ };
static const aom_prob default_ext_intra_probs[2] = { 230, 230 };
const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
@@ -1278,10 +1298,11 @@
#endif // CONFIG_EXT_INTRA
#if CONFIG_SUPERTX
-static const aom_prob
- default_supertx_prob[PARTITION_SUPERTX_CONTEXTS][TX_SIZES] = {
- { 1, 160, 160, 170 }, { 1, 200, 200, 210 },
- };
+static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS]
+ [TX_SIZES] = {
+ { 1, 160, 160, 170 },
+ { 1, 200, 200, 210 },
+ };
#endif // CONFIG_SUPERTX
// FIXME(someone) need real defaults here
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 7968484..16030c9 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -57,9 +57,8 @@
#if CONFIG_ANS
coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES];
#endif
- aom_prob
- switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS -
- 1];
+ aom_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
+ [SWITCHABLE_FILTERS - 1];
#if CONFIG_REF_MV
aom_prob newmv_prob[NEWMV_MODE_CONTEXTS];
@@ -74,8 +73,8 @@
aom_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1];
#if CONFIG_EXT_INTER
- aom_prob
- inter_compound_mode_probs[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES - 1];
+ aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS]
+ [INTER_COMPOUND_MODES - 1];
aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1];
aom_prob wedge_interintra_prob[BLOCK_SIZES];
@@ -110,9 +109,8 @@
int initialized;
#if CONFIG_EXT_TX
aom_prob inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1];
- aom_prob
- intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES -
- 1];
+ aom_prob intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
+ [TX_TYPES - 1];
#else
aom_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1];
aom_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1];
@@ -142,10 +140,10 @@
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
#endif
av1_coeff_count_model coef[TX_SIZES][PLANE_TYPES];
- unsigned int
- eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
- unsigned int
- switchable_interp[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
+ unsigned int eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
+ [COEFF_CONTEXTS];
+ unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
+ [SWITCHABLE_FILTERS];
#if CONFIG_REF_MV
unsigned int newmv_mode[NEWMV_MODE_CONTEXTS][2];
unsigned int zeromv_mode[ZEROMV_MODE_CONTEXTS][2];
@@ -198,8 +196,8 @@
unsigned int tx_size_implied[TX_SIZES][TX_SIZES];
#endif // CONFIG_RECT_TX
unsigned int inter_ext_tx[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
- unsigned int
- intra_ext_tx[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES];
+ unsigned int intra_ext_tx[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
+ [TX_TYPES];
#else
unsigned int intra_ext_tx[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES];
@@ -215,19 +213,21 @@
#endif // CONFIG_EXT_INTRA
} FRAME_COUNTS;
-extern const aom_prob
- av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1];
+extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
+ [INTRA_MODES - 1];
extern const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
[PALETTE_Y_MODE_CONTEXTS];
extern const aom_prob av1_default_palette_uv_mode_prob[2];
-extern const aom_prob
- av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES][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_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1];
-extern const aom_prob av1_default_palette_uv_color_prob
- [PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1];
+extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES]
+ [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_prob[PALETTE_MAX_SIZE - 1]
+ [PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS - 1];
+extern const aom_prob av1_default_palette_uv_color_prob[PALETTE_MAX_SIZE - 1]
+ [PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS - 1];
extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
extern const aom_tree_index av1_inter_mode_tree[TREE_SIZE(INTER_MODES)];
@@ -245,17 +245,17 @@
extern const aom_tree_index
av1_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)];
extern const aom_tree_index av1_palette_size_tree[TREE_SIZE(PALETTE_SIZES)];
-extern const aom_tree_index
- av1_palette_color_tree[PALETTE_MAX_SIZE - 1][TREE_SIZE(PALETTE_COLORS)];
+extern const aom_tree_index av1_palette_color_tree[PALETTE_MAX_SIZE - 1]
+ [TREE_SIZE(PALETTE_COLORS)];
extern const aom_tree_index av1_tx_size_tree[TX_SIZES - 1][TREE_SIZE(TX_SIZES)];
#if CONFIG_EXT_INTRA
extern const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)];
#endif // CONFIG_EXT_INTRA
#if CONFIG_EXT_TX
-extern const aom_tree_index
- av1_ext_tx_inter_tree[EXT_TX_SETS_INTER][TREE_SIZE(TX_TYPES)];
-extern const aom_tree_index
- av1_ext_tx_intra_tree[EXT_TX_SETS_INTRA][TREE_SIZE(TX_TYPES)];
+extern const aom_tree_index av1_ext_tx_inter_tree[EXT_TX_SETS_INTER]
+ [TREE_SIZE(TX_TYPES)];
+extern const aom_tree_index av1_ext_tx_intra_tree[EXT_TX_SETS_INTRA]
+ [TREE_SIZE(TX_TYPES)];
#else
extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)];
#endif // CONFIG_EXT_TX
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 8b3aaa3..b83a0b2 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -95,8 +95,9 @@
extern const int8_t sub_pel_filters_temporalfilter_12_signal_dir[15][2][16];
extern const int8_t sub_pel_filters_temporalfilter_12_ver_signal_dir[15][6][16];
#if CONFIG_AOM_HIGHBITDEPTH
-extern const int16_t
- sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8];
+extern const int16_t sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15]
+ [6]
+ [8];
#endif
#endif
diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c
index 33cda49..4b51016 100644
--- a/av1/common/quant_common.c
+++ b/av1/common/quant_common.c
@@ -367,10 +367,10 @@
return &cm->gqmatrix[qmlevel][!!is_chroma][!!is_intra][log2sizem2][0];
}
-static uint16_t
- iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
-static uint16_t
- wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
+static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2]
+ [4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
+static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2]
+ [4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
void aom_qm_init(AV1_COMMON *cm) {
int q, c, f, t, size;
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index a16f7ef..6ae3a95 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -34,10 +34,10 @@
static int get_masked_weight(int m, int smoothness) {
#define SMOOTHER_LEN 32
static const uint8_t smoothfn[NSMOOTHERS][2 * SMOOTHER_LEN + 1] = { {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 4, 7, 13, 21, 32, 43, 51, 57, 60, 62, 63, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 7, 13, 21, 32, 43,
+ 51, 57, 60, 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
} };
if (m < -SMOOTHER_LEN)
return 0;
@@ -48,10 +48,9 @@
}
// [smoother][negative][direction]
-DECLARE_ALIGNED(
- 16, static uint8_t,
- wedge_mask_obl[NSMOOTHERS][2][WEDGE_DIRECTIONS][MASK_MASTER_SIZE *
- MASK_MASTER_SIZE]);
+DECLARE_ALIGNED(16, static uint8_t,
+ wedge_mask_obl[NSMOOTHERS][2][WEDGE_DIRECTIONS]
+ [MASK_MASTER_SIZE * MASK_MASTER_SIZE]);
DECLARE_ALIGNED(16, static uint8_t,
wedge_signflip_lookup[BLOCK_SIZES][MAX_WEDGE_TYPES]);
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index d50181e..65e3d09 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -24,10 +24,10 @@
#define BILATERAL_AMP_RANGE 256
#define BILATERAL_AMP_RANGE_SYM (2 * BILATERAL_AMP_RANGE + 1)
-static uint8_t
- bilateral_filter_coeffs_r_kf[BILATERAL_LEVELS_KF][BILATERAL_AMP_RANGE_SYM];
-static uint8_t
- bilateral_filter_coeffs_r[BILATERAL_LEVELS][BILATERAL_AMP_RANGE_SYM];
+static uint8_t bilateral_filter_coeffs_r_kf[BILATERAL_LEVELS_KF]
+ [BILATERAL_AMP_RANGE_SYM];
+static uint8_t bilateral_filter_coeffs_r[BILATERAL_LEVELS]
+ [BILATERAL_AMP_RANGE_SYM];
static uint8_t bilateral_filter_coeffs_s_kf[BILATERAL_LEVELS_KF]
[RESTORATION_WIN][RESTORATION_WIN];
static uint8_t bilateral_filter_coeffs_s[BILATERAL_LEVELS][RESTORATION_WIN]
@@ -121,12 +121,14 @@
}
for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) {
for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) {
- bilateral_filter_coeffs_s_kf
- [i][y + RESTORATION_HALFWIN][x + RESTORATION_HALFWIN] =
- (uint8_t)(0.5 +
- RESTORATION_FILT_STEP *
- exp(-(x * x) / (2 * sigma_x_d * sigma_x_d) -
- (y * y) / (2 * sigma_y_d * sigma_y_d)));
+ bilateral_filter_coeffs_s_kf[i][y + RESTORATION_HALFWIN]
+ [x + RESTORATION_HALFWIN] = (uint8_t)(
+ 0.5 +
+ RESTORATION_FILT_STEP *
+ exp(-(x * x) / (2 * sigma_x_d *
+ sigma_x_d) -
+ (y * y) / (2 * sigma_y_d *
+ sigma_y_d)));
}
}
}
@@ -149,13 +151,14 @@
}
for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) {
for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) {
- bilateral_filter_coeffs_s[i][y +
- RESTORATION_HALFWIN][x +
- RESTORATION_HALFWIN] =
- (uint8_t)(0.5 +
- RESTORATION_FILT_STEP *
- exp(-(x * x) / (2 * sigma_x_d * sigma_x_d) -
- (y * y) / (2 * sigma_y_d * sigma_y_d)));
+ bilateral_filter_coeffs_s[i][y + RESTORATION_HALFWIN]
+ [x + RESTORATION_HALFWIN] = (uint8_t)(
+ 0.5 +
+ RESTORATION_FILT_STEP *
+ exp(-(x * x) /
+ (2 * sigma_x_d * sigma_x_d) -
+ (y * y) /
+ (2 * sigma_y_d * sigma_y_d)));
}
}
}
diff --git a/av1/common/x86/av1_highbd_convolve_filters_sse4.c b/av1/common/x86/av1_highbd_convolve_filters_sse4.c
index e2337fd..d7129c6 100644
--- a/av1/common/x86/av1_highbd_convolve_filters_sse4.c
+++ b/av1/common/x86/av1_highbd_convolve_filters_sse4.c
@@ -266,9 +266,9 @@
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if USE_TEMPORALFILTER_12TAP
-DECLARE_ALIGNED(
- 16, const int16_t,
- sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]) = {
+DECLARE_ALIGNED(16, 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/decodeframe.c b/av1/decoder/decodeframe.c
index de0b502..c3a0a83 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -2564,7 +2564,7 @@
const int tile_cols = cm->tile_cols;
const int tile_rows = cm->tile_rows;
const int n_tiles = tile_cols * tile_rows;
- TileBufferDec (*const tile_buffers)[MAX_TILE_COLS] = pbi->tile_buffers;
+ TileBufferDec(*const tile_buffers)[MAX_TILE_COLS] = pbi->tile_buffers;
#if CONFIG_EXT_TILE
const int dec_tile_row = AOMMIN(pbi->dec_tile_row, tile_rows);
const int single_row = pbi->dec_tile_row >= 0;
@@ -2823,7 +2823,7 @@
const int tile_cols = cm->tile_cols;
const int tile_rows = cm->tile_rows;
const int num_workers = AOMMIN(pbi->max_threads & ~1, tile_cols);
- TileBufferDec (*const tile_buffers)[MAX_TILE_COLS] = pbi->tile_buffers;
+ TileBufferDec(*const tile_buffers)[MAX_TILE_COLS] = pbi->tile_buffers;
#if CONFIG_EXT_TILE
const int dec_tile_row = AOMMIN(pbi->dec_tile_row, tile_rows);
const int single_row = pbi->dec_tile_row >= 0;
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 2f11dae..e166fef 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -220,7 +220,7 @@
int max_blocks_wide = num_4x4_blocks_wide_lookup[mbmi->sb_type];
int ctx = txfm_partition_context(xd->above_txfm_context + tx_col,
xd->left_txfm_context + tx_row, tx_size);
- TX_SIZE (*const inter_tx_size)
+ TX_SIZE(*const inter_tx_size)
[MAX_MIB_SIZE] =
(TX_SIZE(*)[MAX_MIB_SIZE]) & mbmi->inter_tx_size[tx_row][tx_col];
@@ -458,9 +458,8 @@
palette_ctx += (above_mi->mbmi.palette_mode_info.palette_size[0] > 0);
if (left_mi)
palette_ctx += (left_mi->mbmi.palette_mode_info.palette_size[0] > 0);
- if (aom_read(
- r,
- av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_ctx])) {
+ if (aom_read(r, av1_default_palette_y_mode_prob[bsize - BLOCK_8X8]
+ [palette_ctx])) {
pmi->palette_size[0] =
aom_read_tree(r, av1_palette_size_tree,
av1_default_palette_y_size_prob[bsize - BLOCK_8X8]) +
@@ -631,8 +630,8 @@
r, av1_ext_tx_intra_tree[eset],
cm->fc->intra_ext_tx_prob[eset][mbmi->tx_size][mbmi->mode]);
if (counts)
- ++counts
- ->intra_ext_tx[eset][mbmi->tx_size][mbmi->mode][mbmi->tx_type];
+ ++counts->intra_ext_tx[eset][mbmi->tx_size][mbmi->mode]
+ [mbmi->tx_type];
}
} else {
mbmi->tx_type = DCT_DCT;
@@ -1658,8 +1657,8 @@
#endif
if (xd->counts) {
const int ctx = get_tx_size_context(xd);
- ++xd->counts
- ->tx_size[tx_size_cat][ctx][txsize_sqr_up_map[mbmi->tx_size]];
+ ++xd->counts->tx_size[tx_size_cat][ctx]
+ [txsize_sqr_up_map[mbmi->tx_size]];
}
} else {
if (inter_block)
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 74b8655..778bf12 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -473,7 +473,7 @@
int n = mbmi->palette_mode_info.palette_size[plane != 0];
int i, j;
uint8_t *color_map = xd->plane[plane != 0].color_index_map;
- const aom_prob (*const prob)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
+ const aom_prob(*const prob)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
plane ? av1_default_palette_uv_color_prob
: av1_default_palette_y_color_prob;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 6578c0c..0f2daa1 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1461,8 +1461,9 @@
} else {
av1_write_token(
w, av1_ext_tx_tree,
- cm->fc->intra_ext_tx_prob
- [mbmi->tx_size][intra_mode_to_tx_type_context[mbmi->mode]],
+ cm->fc
+ ->intra_ext_tx_prob[mbmi->tx_size]
+ [intra_mode_to_tx_type_context[mbmi->mode]],
&ext_tx_encodings[mbmi->tx_type]);
}
} else {
@@ -2115,11 +2116,12 @@
#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;
@@ -2138,8 +2140,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);
@@ -2148,13 +2150,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;
@@ -2358,8 +2360,8 @@
#if CONFIG_ENTROPY
if (cm->do_subframe_update &&
cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
- unsigned int
- eob_counts_copy[PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
+ unsigned int eob_counts_copy[PLANE_TYPES][REF_TYPES][COEF_BANDS]
+ [COEFF_CONTEXTS];
av1_coeff_count coef_counts_copy[PLANE_TYPES];
av1_copy(eob_counts_copy, cpi->common.counts.eob_branch[tx_size]);
av1_copy(coef_counts_copy, cpi->td.rd_counts.coef_counts[tx_size]);
@@ -2814,7 +2816,7 @@
#endif // CONFIG_ANS
int tile_row, tile_col;
TOKENEXTRA *(*const tok_buffers)[MAX_TILE_COLS] = cpi->tile_tok;
- TileBufferEnc (*const tile_buffers)[MAX_TILE_COLS] = cpi->tile_buffers;
+ TileBufferEnc(*const tile_buffers)[MAX_TILE_COLS] = cpi->tile_buffers;
size_t total_size = 0;
const int tile_cols = cm->tile_cols;
const int tile_rows = cm->tile_rows;
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 4b93ab6..7de74d1 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -1823,8 +1823,8 @@
#endif // CONFIG_EXT_REFS
if (cm->reference_mode == REFERENCE_MODE_SELECT)
- counts->comp_inter[av1_get_reference_mode_context(
- cm, xd)][has_second_ref(mbmi)]++;
+ counts->comp_inter[av1_get_reference_mode_context(cm, xd)]
+ [has_second_ref(mbmi)]++;
if (has_second_ref(mbmi)) {
#if CONFIG_EXT_REFS
@@ -1832,18 +1832,18 @@
counts->comp_ref[av1_get_pred_context_comp_ref_p(cm, xd)][0][bit]++;
if (!bit) {
- counts->comp_ref[av1_get_pred_context_comp_ref_p1(
- cm, xd)][1][ref0 == LAST_FRAME]++;
+ counts->comp_ref[av1_get_pred_context_comp_ref_p1(cm, xd)][1]
+ [ref0 == LAST_FRAME]++;
} else {
- counts->comp_ref[av1_get_pred_context_comp_ref_p2(
- cm, xd)][2][ref0 == GOLDEN_FRAME]++;
+ counts->comp_ref[av1_get_pred_context_comp_ref_p2(cm, xd)][2]
+ [ref0 == GOLDEN_FRAME]++;
}
- counts->comp_bwdref[av1_get_pred_context_comp_bwdref_p(
- cm, xd)][0][ref1 == ALTREF_FRAME]++;
+ counts->comp_bwdref[av1_get_pred_context_comp_bwdref_p(cm, xd)][0]
+ [ref1 == ALTREF_FRAME]++;
#else
- counts->comp_ref[av1_get_pred_context_comp_ref_p(
- cm, xd)][0][ref0 == GOLDEN_FRAME]++;
+ counts->comp_ref[av1_get_pred_context_comp_ref_p(cm, xd)][0]
+ [ref0 == GOLDEN_FRAME]++;
#endif // CONFIG_EXT_REFS
} else {
#if CONFIG_EXT_REFS
@@ -1851,26 +1851,26 @@
counts->single_ref[av1_get_pred_context_single_ref_p1(xd)][0][bit]++;
if (bit) {
- counts->single_ref[av1_get_pred_context_single_ref_p2(
- xd)][1][ref0 != BWDREF_FRAME]++;
+ counts->single_ref[av1_get_pred_context_single_ref_p2(xd)][1]
+ [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]++;
+ counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3]
+ [ref0 != LAST_FRAME]++;
} else {
- counts->single_ref[av1_get_pred_context_single_ref_p5(
- xd)][4][ref0 != LAST3_FRAME]++;
+ counts->single_ref[av1_get_pred_context_single_ref_p5(xd)][4]
+ [ref0 != LAST3_FRAME]++;
}
}
#else
- counts->single_ref[av1_get_pred_context_single_ref_p1(
- xd)][0][ref0 != LAST_FRAME]++;
+ counts->single_ref[av1_get_pred_context_single_ref_p1(xd)][0]
+ [ref0 != LAST_FRAME]++;
if (ref0 != LAST_FRAME) {
- counts->single_ref[av1_get_pred_context_single_ref_p2(
- xd)][1][ref0 != GOLDEN_FRAME]++;
+ counts->single_ref[av1_get_pred_context_single_ref_p2(xd)][1]
+ [ref0 != GOLDEN_FRAME]++;
}
#endif // CONFIG_EXT_REFS
}
@@ -1990,8 +1990,8 @@
#if CONFIG_EXT_INTER
if (has_second_ref(mbmi)) {
mode_ctx = mbmi_ext->compound_mode_context[mbmi->ref_frame[0]];
- ++counts->inter_compound_mode[mode_ctx][INTER_COMPOUND_OFFSET(
- b_mode)];
+ ++counts->inter_compound_mode[mode_ctx]
+ [INTER_COMPOUND_OFFSET(b_mode)];
} else {
#endif // CONFIG_EXT_INTER
mode_ctx = av1_mode_context_analyzer(mbmi_ext->mode_context,
@@ -2007,8 +2007,8 @@
#else
#if CONFIG_EXT_INTER
if (is_inter_compound_mode(b_mode))
- ++counts->inter_compound_mode[mode_ctx][INTER_COMPOUND_OFFSET(
- b_mode)];
+ ++counts->inter_compound_mode[mode_ctx]
+ [INTER_COMPOUND_OFFSET(b_mode)];
else
#endif // CONFIG_EXT_INTER
++counts->inter_mode[mode_ctx][INTER_OFFSET(b_mode)];
@@ -2206,8 +2206,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
@@ -3608,10 +3608,11 @@
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);
@@ -3625,8 +3626,9 @@
&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);
@@ -3687,10 +3689,11 @@
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);
@@ -3704,8 +3707,9 @@
&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);
@@ -5187,8 +5191,8 @@
++td->counts->inter_ext_tx[eset][txsize_sqr_map[mbmi->tx_size]]
[mbmi->tx_type];
} else {
- ++td->counts
- ->intra_ext_tx[eset][mbmi->tx_size][mbmi->mode][mbmi->tx_type];
+ ++td->counts->intra_ext_tx[eset][mbmi->tx_size][mbmi->mode]
+ [mbmi->tx_type];
}
}
}
@@ -5198,9 +5202,9 @@
if (is_inter_block(mbmi)) {
++td->counts->inter_ext_tx[mbmi->tx_size][mbmi->tx_type];
} else {
- ++td->counts
- ->intra_ext_tx[mbmi->tx_size][intra_mode_to_tx_type_context
- [mbmi->mode]][mbmi->tx_type];
+ ++td->counts->intra_ext_tx[mbmi->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 718bddb..18fcb37 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -422,11 +422,13 @@
QUANT_FUNC_LAST = 1
} QUANT_FUNC;
-static AV1_QUANT_FACADE quant_func_list[AV1_XFORM_QUANT_LAST][QUANT_FUNC_LAST] =
- { { av1_quantize_fp_facade },
- { av1_quantize_b_facade },
- { av1_quantize_dc_facade },
- { NULL } };
+static AV1_QUANT_FACADE quant_func_list[AV1_XFORM_QUANT_LAST]
+ [QUANT_FUNC_LAST] = {
+ { av1_quantize_fp_facade },
+ { av1_quantize_b_facade },
+ { av1_quantize_dc_facade },
+ { NULL }
+ };
#endif
static FWD_TXFM_OPT fwd_txfm_opt_list[AV1_XFORM_QUANT_LAST] = {
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 821d2f1..86503d7 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -539,8 +539,8 @@
unsigned int inter_mode_cost[INTER_MODE_CONTEXTS][INTER_MODES];
#if CONFIG_EXT_INTER
- unsigned int
- inter_compound_mode_cost[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES];
+ unsigned int inter_compound_mode_cost[INTER_MODE_CONTEXTS]
+ [INTER_COMPOUND_MODES];
unsigned int interintra_mode_cost[BLOCK_SIZE_GROUPS][INTERINTRA_MODES];
#endif // CONFIG_EXT_INTER
#if CONFIG_OBMC || CONFIG_WARPED_MOTION
@@ -556,10 +556,10 @@
#endif
int palette_y_size_cost[PALETTE_BLOCK_SIZES][PALETTE_SIZES];
int palette_uv_size_cost[PALETTE_BLOCK_SIZES][PALETTE_SIZES];
- int palette_y_color_cost[PALETTE_MAX_SIZE -
- 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS];
- int palette_uv_color_cost[PALETTE_MAX_SIZE -
- 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS];
+ int palette_y_color_cost[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS];
+ int palette_uv_color_cost[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS]
+ [PALETTE_COLORS];
int tx_size_cost[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES];
#if CONFIG_EXT_TX
int inter_tx_type_costs[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index 6f4db31..9e63c0f 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -945,12 +945,13 @@
// 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/quantize.h b/av1/encoder/quantize.h
index dde3b19..7394887 100644
--- a/av1/encoder/quantize.h
+++ b/av1/encoder/quantize.h
@@ -33,12 +33,10 @@
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/ratectrl.c b/av1/encoder/ratectrl.c
index 59e2f1c..cbc5173 100644
--- a/av1/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -60,7 +60,7 @@
#else
#define ASSIGN_MINQ_TABLE(bit_depth, name) \
do { \
- (void) bit_depth; \
+ (void)bit_depth; \
name = name##_8; \
} while (0)
#endif
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 8874076..95b74a2 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1325,8 +1325,9 @@
const int ext_tx_set = get_ext_tx_set(tx_size, bs, is_inter);
if (is_inter) {
if (ext_tx_set > 0)
- *r += cpi->inter_tx_type_costs
- [ext_tx_set][txsize_sqr_map[mbmi->tx_size]][mbmi->tx_type];
+ *r +=
+ cpi->inter_tx_type_costs[ext_tx_set][txsize_sqr_map[mbmi->tx_size]]
+ [mbmi->tx_type];
} else {
if (ext_tx_set > 0 && ALLOW_INTRA_EXT_TX)
*r += cpi->intra_tx_type_costs[ext_tx_set][mbmi->tx_size][mbmi->mode]
@@ -2209,14 +2210,14 @@
#if CONFIG_EXT_TX
if (get_ext_tx_types(TX_4X4, bsize, 0) > 1) {
const int eset = get_ext_tx_set(TX_4X4, bsize, 0);
- rate_tx_type =
- cpi->intra_tx_type_costs[eset][TX_4X4][mic->mbmi.mode][mic->mbmi
- .tx_type];
+ rate_tx_type = cpi->intra_tx_type_costs[eset][TX_4X4][mic->mbmi.mode]
+ [mic->mbmi.tx_type];
}
#else
- rate_tx_type = cpi->intra_tx_type_costs
- [TX_4X4][intra_mode_to_tx_type_context[mic->mbmi.mode]]
- [mic->mbmi.tx_type];
+ rate_tx_type =
+ cpi->intra_tx_type_costs[TX_4X4]
+ [intra_mode_to_tx_type_context[mic->mbmi.mode]]
+ [mic->mbmi.tx_type];
#endif
assert(mic->mbmi.tx_size == TX_4X4);
cost += rate_tx_type;
@@ -2689,8 +2690,8 @@
// (prediction granularity), so we account for it in the full rate,
// not the tokenonly rate.
this_rate_tokenonly -=
- cpi->tx_size_cost[max_tx_size -
- TX_8X8][get_tx_size_context(xd)][mic->mbmi.tx_size];
+ cpi->tx_size_cost[max_tx_size - TX_8X8][get_tx_size_context(xd)]
+ [mic->mbmi.tx_size];
}
if (cpi->common.allow_screen_content_tools && mic->mbmi.mode == DC_PRED)
this_rate += av1_cost_bit(
@@ -2981,7 +2982,7 @@
struct macroblockd_plane *const pd = &xd->plane[plane];
const int tx_row = blk_row >> (1 - pd->subsampling_y);
const int tx_col = blk_col >> (1 - pd->subsampling_x);
- TX_SIZE (*const inter_tx_size)
+ TX_SIZE(*const inter_tx_size)
[MAX_MIB_SIZE] =
(TX_SIZE(*)[MAX_MIB_SIZE]) & mbmi->inter_tx_size[tx_row][tx_col];
const int bw = num_4x4_blocks_wide_lookup[plane_bsize];
@@ -3276,9 +3277,9 @@
int ext_tx_set = get_ext_tx_set(mbmi->tx_size, bsize, is_inter);
if (is_inter) {
if (ext_tx_set > 0)
- *rate +=
- cpi->inter_tx_type_costs
- [ext_tx_set][txsize_sqr_up_map[mbmi->tx_size]][mbmi->tx_type];
+ *rate += cpi->inter_tx_type_costs[ext_tx_set]
+ [txsize_sqr_up_map[mbmi->tx_size]]
+ [mbmi->tx_type];
} else {
if (ext_tx_set > 0 && ALLOW_INTRA_EXT_TX)
*rate += cpi->intra_tx_type_costs[ext_tx_set][mbmi->tx_size][mbmi->mode]
@@ -3290,9 +3291,10 @@
if (is_inter)
*rate += cpi->inter_tx_type_costs[mbmi->tx_size][mbmi->tx_type];
else
- *rate += cpi->intra_tx_type_costs
- [mbmi->tx_size][intra_mode_to_tx_type_context[mbmi->mode]]
- [mbmi->tx_type];
+ *rate +=
+ cpi->intra_tx_type_costs[mbmi->tx_size]
+ [intra_mode_to_tx_type_context[mbmi->mode]]
+ [mbmi->tx_type];
}
#endif // CONFIG_EXT_TX
@@ -4042,8 +4044,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
@@ -4083,8 +4085,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)];
@@ -4119,14 +4121,16 @@
2);
#endif // CONFIG_GLOBAL_MOTION
-static int set_and_cost_bmi_mvs(
- AV1_COMP *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(AV1_COMP *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]) {
#if CONFIG_GLOBAL_MOTION
const AV1_COMMON *cm = &cpi->common;
#endif // CONFIG_GLOBAL_MOTION
@@ -5734,12 +5738,13 @@
ctx->hybrid_pred_diff = (int)comp_pred_diff[REFERENCE_MODE_SELECT];
}
-static void setup_buffer_inter(
- AV1_COMP *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(AV1_COMP *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;
@@ -8088,8 +8093,8 @@
// tokenonly rate, but for intra blocks, tx_size is always coded
// (prediction granularity), so we account for it in the full rate,
// not the tokenonly rate.
- rate_y -= cpi->tx_size_cost[max_tx_size -
- TX_8X8][get_tx_size_context(xd)][mbmi->tx_size];
+ rate_y -= cpi->tx_size_cost[max_tx_size - TX_8X8][get_tx_size_context(xd)]
+ [mbmi->tx_size];
}
rate2 += av1_cost_bit(cm->fc->ext_intra_probs[0],
@@ -8813,8 +8818,8 @@
// tokenonly rate, but for intra blocks, tx_size is always coded
// (prediction granularity), so we account for it in the full rate,
// not the tokenonly rate.
- rate_y -= cpi->tx_size_cost[max_tx_size - TX_8X8][get_tx_size_context(
- xd)][mbmi->tx_size];
+ rate_y -= cpi->tx_size_cost[max_tx_size - TX_8X8]
+ [get_tx_size_context(xd)][mbmi->tx_size];
}
#if CONFIG_EXT_INTRA
if (is_directional_mode) {
@@ -8992,12 +8997,12 @@
clamp_mv2(&cur_mv.as_mv, xd);
if (!mv_check_bounds(x, &cur_mv.as_mv)) {
- InterpFilter
- dummy_single_inter_filter[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME] =
- { { 0 } };
- int dummy_single_skippable[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME] = {
- { 0 }
- };
+ InterpFilter dummy_single_inter_filter[MB_MODE_COUNT]
+ [TOTAL_REFS_PER_FRAME] = {
+ { 0 }
+ };
+ int dummy_single_skippable[MB_MODE_COUNT]
+ [TOTAL_REFS_PER_FRAME] = { { 0 } };
int dummy_disable_skip = 0;
#if CONFIG_EXT_INTER
int_mv dummy_single_newmvs[2][TOTAL_REFS_PER_FRAME] = { { { 0 } },
diff --git a/av1/encoder/subexp.c b/av1/encoder/subexp.c
index 84d748e..aa02e53 100644
--- a/av1/encoder/subexp.c
+++ b/av1/encoder/subexp.c
@@ -212,9 +212,10 @@
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 d9eae1b..93257a2 100644
--- a/av1/encoder/subexp.h
+++ b/av1/encoder/subexp.h
@@ -38,9 +38,10 @@
#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 b86baa8..bc462ee 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -409,7 +409,7 @@
(xd->plane[plane != 0].subsampling_y);
const int cols = (4 * num_4x4_blocks_wide_lookup[bsize]) >>
(xd->plane[plane != 0].subsampling_x);
- const aom_prob (*const probs)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
+ const aom_prob(*const probs)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
plane == 0 ? av1_default_palette_y_color_prob
: av1_default_palette_uv_color_prob;
@@ -458,21 +458,21 @@
const TX_TYPE tx_type = get_tx_type(type, xd, block, tx_size);
const scan_order *const so = get_scan(tx_size, tx_type, is_inter_block(mbmi));
const int ref = is_inter_block(mbmi);
- unsigned int (*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
+ unsigned int(*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
td->rd_counts.coef_counts[txsize_sqr_map[tx_size]][type][ref];
#if CONFIG_ENTROPY
aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
cpi->subframe_stats.coef_probs_buf[cpi->common.coef_probs_update_idx]
[txsize_sqr_map[tx_size]][type][ref];
#else
- aom_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
+ aom_prob(*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
cpi->common.fc->coef_probs[txsize_sqr_map[tx_size]][type][ref];
#endif // CONFIG_ENTROPY
#if CONFIG_ANS
- rans_dec_lut (*const coef_cdfs)[COEFF_CONTEXTS] =
+ rans_dec_lut(*const coef_cdfs)[COEFF_CONTEXTS] =
cpi->common.fc->coef_cdfs[txsize_sqr_map[tx_size]][type][ref];
#endif // CONFIG_ANS
- unsigned int (*const eob_branch)[COEFF_CONTEXTS] =
+ unsigned int(*const eob_branch)[COEFF_CONTEXTS] =
td->counts->eob_branch[txsize_sqr_map[tx_size]][type][ref];
const uint8_t *const band = get_band_translate(tx_size);
const int seg_eob = get_tx_eob(&cpi->common.seg, segment_id, tx_size);
diff --git a/test/av1_convolve_optimz_test.cc b/test/av1_convolve_optimz_test.cc
index a2923dd..b83ae94 100644
--- a/test/av1_convolve_optimz_test.cc
+++ b/test/av1_convolve_optimz_test.cc
@@ -35,13 +35,15 @@
// <width, height>, filter_params, subpel_x_q4, avg>
typedef tuple<int, int> BlockDimension;
typedef tuple<conv_filter_t, conv_filter_t, BlockDimension, InterpFilter, int,
- int> ConvParams;
+ int>
+ ConvParams;
#if CONFIG_AOM_HIGHBITDEPTH
// Test parameter list:
// <convolve_horiz_func, convolve_vert_func,
// <width, height>, filter_params, subpel_x_q4, avg, bit_dpeth>
typedef tuple<hbd_conv_filter_t, hbd_conv_filter_t, BlockDimension,
- InterpFilter, int, int, int> HbdConvParams;
+ InterpFilter, int, int, int>
+ HbdConvParams;
#endif
// Note:
diff --git a/test/masked_variance_test.cc b/test/masked_variance_test.cc
index 3e44bf7..c7726bf 100644
--- a/test/masked_variance_test.cc
+++ b/test/masked_variance_test.cc
@@ -349,7 +349,8 @@
}
typedef std::tr1::tuple<MaskedSubPixelVarianceFunc, MaskedSubPixelVarianceFunc,
- aom_bit_depth_t> HighbdMaskedSubPixelVarianceParam;
+ aom_bit_depth_t>
+ HighbdMaskedSubPixelVarianceParam;
class HighbdMaskedSubPixelVarianceTest
: public ::testing::TestWithParam<HighbdMaskedSubPixelVarianceParam> {