Commit 67948d31 authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

Change-Id: If22018f8911d9d7ee99c2127bdfcc56e42b0e2d7
parent 964a717a
......@@ -43,14 +43,14 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = {
(__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
......
......@@ -438,7 +438,7 @@ void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride,
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 @@ void aom_highbd_blend_a64_mask_sse4_1(uint8_t *dst_8, uint32_t dst_stride,
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);
......
......@@ -113,7 +113,7 @@ void aom_blend_a64_vmask_sse4_1(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) {
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 @@ void aom_highbd_blend_a64_vmask_sse4_1(
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);
......
......@@ -127,7 +127,7 @@ static INLINE uint64_t xgetbv(void) {
: "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)
......
......@@ -1967,8 +1967,7 @@ int main(int argc, const char **argv_) {
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);
});
......
......@@ -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
......
......@@ -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
......
......@@ -24,33 +24,34 @@ static const int cos_bit_max = 16;
// 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,
......
......@@ -288,8 +288,8 @@ typedef struct macroblockd_plane {
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;
......
......@@ -2857,8 +2857,8 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
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)
......
......@@ -135,10 +135,10 @@ extern const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS];
// #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 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) {
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 rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
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);
......
......@@ -319,10 +319,12 @@ static const aom_prob default_wedge_interinter_prob[BLOCK_SIZES] = {
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 },
#endif // CONFIG_EXT_PARTITION
......@@ -333,10 +335,12 @@ static const aom_prob default_motvar_prob[BLOCK_SIZES][MOTION_VARIATIONS - 1] =
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 },
#endif // CONFIG_EXT_PARTITION
......@@ -500,14 +504,17 @@ const aom_prob
#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
};
......@@ -538,8 +545,10 @@ const aom_tree_index
-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] = {
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 },
......@@ -676,8 +685,8 @@ const aom_prob av1_default_palette_y_color_prob
};
const aom_prob av1_default_palette_uv_color_prob
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] = {
{
[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 },
......@@ -809,8 +818,7 @@ const aom_prob av1_default_palette_uv_color_prob
{ 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,8 +846,8 @@ const aom_tree_index av1_tx_size_tree[TX_SIZES - 1][TREE_SIZE(TX_SIZES)] = {
},
};
static const aom_prob
default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES - 1] = {
static const aom_prob default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS]
[TX_SIZES - 1] = {
{
// Max tx_size is 8X8
{ 100 },
......@@ -962,20 +970,28 @@ static const aom_prob default_switchable_interp_prob
};
#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,8 +1096,9 @@ static const aom_prob
}
};
static const aom_prob default_intra_ext_tx_prob
[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES - 1] = {
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.
{
......@@ -1264,10 +1281,13 @@ static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = {
#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 };
......@@ -1278,9 +1298,10 @@ const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
#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
......
......@@ -57,9 +57,8 @@ typedef struct frame_contexts {
#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 @@ typedef struct frame_contexts {
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 @@ typedef struct frame_contexts {
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 @@ typedef struct FRAME_COUNTS {
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 @@ typedef struct FRAME_COUNTS {
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 @@ typedef struct FRAME_COUNTS {
#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
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
......
......@@ -95,8 +95,9 @@ static INLINE int av1_is_interpolating_filter(
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
......
......@@ -367,10 +367,10 @@ qm_val_t *aom_qmatrix(AV1_COMMON *cm, int qmlevel, int is_chroma,
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;
......
......@@ -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 @@ static int get_masked_weight(int m, int smoothness) {
}
// [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]);
......
......@@ -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 @@ void av1_loop_restoration_precal() {
}
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 +
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)));
exp(-(x * x) / (2 * sigma_x_d *
sigma_x_d) -
(y * y) / (2 * sigma_y_d *
sigma_y_d)));
}
}
}
......@@ -149,13 +151,14 @@ void av1_loop_restoration_precal() {
}
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 +
bilateral_filter_coeffs_s[i][y + RESTORATION_HALFWIN]
[x + RESTORATION_HALFWIN] = (uint8_t)(
0.5 +