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]) = { ...@@ -43,14 +43,14 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = {
(__clang_major__ == 5 && __clang_minor__ == 0))) (__clang_major__ == 5 && __clang_minor__ == 0)))
#define MM256_BROADCASTSI128_SI256(x) \ #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. #else // clang > 3.3, and not 5.0 on macosx.
#define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x) #define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x)
#endif // clang <= 3.3 #endif // clang <= 3.3
#elif defined(__GNUC__) #elif defined(__GNUC__)
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 6) #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 6)
#define MM256_BROADCASTSI128_SI256(x) \ #define MM256_BROADCASTSI128_SI256(x) \
_mm_broadcastsi128_si256((__m128i const *) & (x)) _mm_broadcastsi128_si256((__m128i const *)&(x))
#elif __GNUC__ == 4 && __GNUC_MINOR__ == 7 #elif __GNUC__ == 4 && __GNUC_MINOR__ == 7
#define MM256_BROADCASTSI128_SI256(x) _mm_broadcastsi128_si256(x) #define MM256_BROADCASTSI128_SI256(x) _mm_broadcastsi128_si256(x)
#else // gcc > 4.7 #else // gcc > 4.7
......
...@@ -438,7 +438,7 @@ void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride, ...@@ -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, const uint8_t *mask, uint32_t mask_stride, int h,
int w, int suby, int subx) { int w, int suby, int subx) {
typedef void (*blend_fn)( 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, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w); 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, ...@@ -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, uint32_t mask_stride, int h, int w,
int suby, int subx, int bd) { int suby, int subx, int bd) {
typedef void (*blend_fn)( 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, uint32_t src0_stride, const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w); 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, ...@@ -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 *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride, const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w) { 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 *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride, const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w); const uint8_t *mask, int h, int w);
...@@ -241,7 +241,7 @@ void aom_highbd_blend_a64_vmask_sse4_1( ...@@ -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, 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, uint32_t src0_stride, const uint8_t *src1_8, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd) { 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 *src0, uint32_t src0_stride,
const uint16_t *src1, uint32_t src1_stride, const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w); const uint8_t *mask, int h, int w);
......
...@@ -127,7 +127,7 @@ static INLINE uint64_t xgetbv(void) { ...@@ -127,7 +127,7 @@ static INLINE uint64_t xgetbv(void) {
: "c"(ecx)); : "c"(ecx));
return ((uint64_t)edx << 32) | eax; 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 _MSC_FULL_VER >= 160040219 // >= VS2010 SP1
#include <immintrin.h> #include <immintrin.h>
#define xgetbv() _xgetbv(0) #define xgetbv() _xgetbv(0)
......
...@@ -1967,8 +1967,7 @@ int main(int argc, const char **argv_) { ...@@ -1967,8 +1967,7 @@ int main(int argc, const char **argv_) {
if (global.pass && global.passes == 2) if (global.pass && global.passes == 2)
FOREACH_STREAM({ FOREACH_STREAM({
if (!stream->config.stats_fn) if (!stream->config.stats_fn)
die( die("Stream %d: Must specify --fpf when --pass=%d"
"Stream %d: Must specify --fpf when --pass=%d"
" and --passes=2\n", " and --passes=2\n",
stream->index, global.pass); stream->index, global.pass);
}); });
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
#else #else
#define range_check(stage, input, buf, size, bit) \ #define range_check(stage, input, buf, size, bit) \
{ \ { \
(void) stage; \ (void)stage; \
(void) input; \ (void)input; \
(void) buf; \ (void)buf; \
(void) size; \ (void)size; \
(void) bit; \ (void)bit; \
} }
#endif #endif
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
#else #else
#define range_check(stage, input, buf, size, bit) \ #define range_check(stage, input, buf, size, bit) \
{ \ { \
(void) stage; \ (void)stage; \
(void) input; \ (void)input; \
(void) buf; \ (void)buf; \
(void) size; \ (void)size; \
(void) bit; \ (void)bit; \
} }
#endif #endif
......
...@@ -24,45 +24,46 @@ static const int cos_bit_max = 16; ...@@ -24,45 +24,46 @@ static const int cos_bit_max = 16;
// cospi_arr[i][j] = (int)round(cos(M_PI*j/128) * (1<<(cos_bit_min+i))); // cospi_arr[i][j] = (int)round(cos(M_PI*j/128) * (1<<(cos_bit_min+i)));
static const int32_t cospi_arr[7][64] = { static const int32_t cospi_arr[7][64] = {
{ 1024, 1024, 1023, 1021, 1019, 1016, 1013, 1009, 1004, 999, 993, 987, 980, { 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, 972, 964, 955, 946, 936, 926, 915, 903, 891, 878, 865, 851, 837,
792, 775, 759, 742, 724, 706, 688, 669, 650, 630, 610, 590, 569, 548, 526, 822, 807, 792, 775, 759, 742, 724, 706, 688, 669, 650, 630, 610,
505, 483, 460, 438, 415, 392, 369, 345, 321, 297, 273, 249, 224, 200, 175, 590, 569, 548, 526, 505, 483, 460, 438, 415, 392, 369, 345, 321,
150, 125, 100, 75, 50, 25 }, 297, 273, 249, 224, 200, 175, 150, 125, 100, 75, 50, 25 },
{ 2048, 2047, 2046, 2042, 2038, 2033, 2026, 2018, 2009, 1998, 1987, 1974, { 2048, 2047, 2046, 2042, 2038, 2033, 2026, 2018, 2009, 1998, 1987,
1960, 1945, 1928, 1911, 1892, 1872, 1851, 1829, 1806, 1782, 1757, 1730, 1974, 1960, 1945, 1928, 1911, 1892, 1872, 1851, 1829, 1806, 1782,
1703, 1674, 1645, 1615, 1583, 1551, 1517, 1483, 1448, 1412, 1375, 1338, 1757, 1730, 1703, 1674, 1645, 1615, 1583, 1551, 1517, 1483, 1448,
1299, 1260, 1220, 1179, 1138, 1096, 1053, 1009, 965, 921, 876, 830, 784, 1412, 1375, 1338, 1299, 1260, 1220, 1179, 1138, 1096, 1053, 1009,
737, 690, 642, 595, 546, 498, 449, 400, 350, 301, 251, 201, 151, 100, 50 }, 965, 921, 876, 830, 784, 737, 690, 642, 595, 546, 498,
{ 4096, 4095, 4091, 4085, 4076, 4065, 4052, 4036, 4017, 3996, 3973, 3948, 449, 400, 350, 301, 251, 201, 151, 100, 50 },
3920, 3889, 3857, 3822, 3784, 3745, 3703, 3659, 3612, 3564, 3513, 3461, { 4096, 4095, 4091, 4085, 4076, 4065, 4052, 4036, 4017, 3996, 3973,
3406, 3349, 3290, 3229, 3166, 3102, 3035, 2967, 2896, 2824, 2751, 2675, 3948, 3920, 3889, 3857, 3822, 3784, 3745, 3703, 3659, 3612, 3564,
2598, 2520, 2440, 2359, 2276, 2191, 2106, 2019, 1931, 1842, 1751, 1660, 3513, 3461, 3406, 3349, 3290, 3229, 3166, 3102, 3035, 2967, 2896,
1567, 1474, 1380, 1285, 1189, 1092, 995, 897, 799, 700, 601, 501, 401, 301, 2824, 2751, 2675, 2598, 2520, 2440, 2359, 2276, 2191, 2106, 2019,
201, 101 }, 1931, 1842, 1751, 1660, 1567, 1474, 1380, 1285, 1189, 1092, 995,
{ 8192, 8190, 8182, 8170, 8153, 8130, 8103, 8071, 8035, 7993, 7946, 7895, 897, 799, 700, 601, 501, 401, 301, 201, 101 },
7839, 7779, 7713, 7643, 7568, 7489, 7405, 7317, 7225, 7128, 7027, 6921, { 8192, 8190, 8182, 8170, 8153, 8130, 8103, 8071, 8035, 7993, 7946,
6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933, 5793, 5649, 5501, 5351, 7895, 7839, 7779, 7713, 7643, 7568, 7489, 7405, 7317, 7225, 7128,
5197, 5040, 4880, 4717, 4551, 4383, 4212, 4038, 3862, 3683, 3503, 3320, 7027, 6921, 6811, 6698, 6580, 6458, 6333, 6203, 6070, 5933, 5793,
3135, 2948, 2760, 2570, 2378, 2185, 1990, 1795, 1598, 1401, 1202, 1003, 803, 5649, 5501, 5351, 5197, 5040, 4880, 4717, 4551, 4383, 4212, 4038,
603, 402, 201 }, 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, { 16384, 16379, 16364, 16340, 16305, 16261, 16207, 16143, 16069, 15986, 15893,
15791, 15679, 15557, 15426, 15286, 15137, 14978, 14811, 14635, 14449, 14256, 15791, 15679, 15557, 15426, 15286, 15137, 14978, 14811, 14635, 14449, 14256,
14053, 13842, 13623, 13395, 13160, 12916, 12665, 12406, 12140, 11866, 11585, 14053, 13842, 13623, 13395, 13160, 12916, 12665, 12406, 12140, 11866, 11585,
11297, 11003, 10702, 10394, 10080, 9760, 9434, 9102, 8765, 8423, 8076, 7723, 11297, 11003, 10702, 10394, 10080, 9760, 9434, 9102, 8765, 8423, 8076,
7366, 7005, 6639, 6270, 5897, 5520, 5139, 4756, 4370, 3981, 3590, 3196, 7723, 7366, 7005, 6639, 6270, 5897, 5520, 5139, 4756, 4370, 3981,
2801, 2404, 2006, 1606, 1205, 804, 402 }, 3590, 3196, 2801, 2404, 2006, 1606, 1205, 804, 402 },
{ 32768, 32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138, 31972, 31786, { 32768, 32758, 32729, 32679, 32610, 32522, 32413, 32286, 32138, 31972, 31786,
31581, 31357, 31114, 30853, 30572, 30274, 29957, 29622, 29269, 28899, 28511, 31581, 31357, 31114, 30853, 30572, 30274, 29957, 29622, 29269, 28899, 28511,
28106, 27684, 27246, 26791, 26320, 25833, 25330, 24812, 24279, 23732, 23170, 28106, 27684, 27246, 26791, 26320, 25833, 25330, 24812, 24279, 23732, 23170,
22595, 22006, 21403, 20788, 20160, 19520, 18868, 18205, 17531, 16846, 16151, 22595, 22006, 21403, 20788, 20160, 19520, 18868, 18205, 17531, 16846, 16151,
15447, 14733, 14010, 13279, 12540, 11793, 11039, 10279, 9512, 8740, 7962, 15447, 14733, 14010, 13279, 12540, 11793, 11039, 10279, 9512, 8740, 7962,
7180, 6393, 5602, 4808, 4011, 3212, 2411, 1608, 804 }, 7180, 6393, 5602, 4808, 4011, 3212, 2411, 1608, 804 },
{ 65536, 65516, 65457, 65358, 65220, 65043, 64827, 64571, 64277, 63944, 63572, { 65536, 65516, 65457, 65358, 65220, 65043, 64827, 64571, 64277, 63944, 63572,
63162, 62714, 62228, 61705, 61145, 60547, 59914, 59244, 58538, 57798, 57022, 63162, 62714, 62228, 61705, 61145, 60547, 59914, 59244, 58538, 57798, 57022,
56212, 55368, 54491, 53581, 52639, 51665, 50660, 49624, 48559, 47464, 46341, 56212, 55368, 54491, 53581, 52639, 51665, 50660, 49624, 48559, 47464, 46341,
45190, 44011, 42806, 41576, 40320, 39040, 37736, 36410, 35062, 33692, 32303, 45190, 44011, 42806, 41576, 40320, 39040, 37736, 36410, 35062, 33692, 32303,
30893, 29466, 28020, 26558, 25080, 23586, 22078, 20557, 19024, 17479, 15924, 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) { static INLINE int32_t round_shift(int32_t value, int bit) {
......
...@@ -288,8 +288,8 @@ typedef struct macroblockd_plane { ...@@ -288,8 +288,8 @@ typedef struct macroblockd_plane {
ENTROPY_CONTEXT *left_context; ENTROPY_CONTEXT *left_context;
int16_t seg_dequant[MAX_SEGMENTS][2]; int16_t seg_dequant[MAX_SEGMENTS][2];
#if CONFIG_NEW_QUANT #if CONFIG_NEW_QUANT
dequant_val_type_nuq dequant_val_type_nuq seg_dequant_nuq[MAX_SEGMENTS][QUANT_PROFILES]
seg_dequant_nuq[MAX_SEGMENTS][QUANT_PROFILES][COEF_BANDS]; [COEF_BANDS];
#endif #endif
uint8_t *color_index_map; uint8_t *color_index_map;
......
...@@ -2857,8 +2857,8 @@ static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size, ...@@ -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 *const counts =
(const av1_coeff_count_model *)cm->counts.coef[tx_size]; (const av1_coeff_count_model *)cm->counts.coef[tx_size];
const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] = const unsigned int(*eob_counts)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] =
(const unsigned int(*)[ (const unsigned int(*)[REF_TYPES][COEF_BANDS]
REF_TYPES][COEF_BANDS][COEFF_CONTEXTS])cm->counts.eob_branch[tx_size]; [COEFF_CONTEXTS])cm->counts.eob_branch[tx_size];
int i, j, k, l, m; int i, j, k, l, m;
for (i = 0; i < PLANE_TYPES; ++i) for (i = 0; i < PLANE_TYPES; ++i)
......
...@@ -135,10 +135,10 @@ extern const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS]; ...@@ -135,10 +135,10 @@ extern const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS];
// #define ENTROPY_STATS // #define ENTROPY_STATS
typedef unsigned int typedef unsigned int av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_TOKENS]; [ENTROPY_TOKENS];
typedef unsigned int typedef unsigned int av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_NODES][2]; [ENTROPY_NODES][2];
#define SUBEXP_PARAM 4 /* Subexponential code parameter */ #define SUBEXP_PARAM 4 /* Subexponential code parameter */
#define MODULUS_PARAM 13 /* Modulus parameter */ #define MODULUS_PARAM 13 /* Modulus parameter */
...@@ -189,8 +189,8 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) { ...@@ -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_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)];
extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES]; extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
#if CONFIG_ANS #if CONFIG_ANS
extern const AnsP10 extern const AnsP10 av1_pareto8_token_probs[COEFF_PROB_MODELS]
av1_pareto8_token_probs[COEFF_PROB_MODELS][ENTROPY_TOKENS - 2]; [ENTROPY_TOKENS - 2];
typedef rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]; typedef rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
#endif // CONFIG_ANS #endif // CONFIG_ANS
...@@ -198,8 +198,9 @@ typedef rans_dec_lut coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]; ...@@ -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] typedef aom_prob av1_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[UNCONSTRAINED_NODES]; [UNCONSTRAINED_NODES];
typedef unsigned int av1_coeff_count_model typedef unsigned int av1_coeff_count_model[REF_TYPES][COEF_BANDS]
[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1]; [COEFF_CONTEXTS]
[UNCONSTRAINED_NODES + 1];
void av1_model_to_full_probs(const aom_prob *model, aom_prob *full); void av1_model_to_full_probs(const aom_prob *model, aom_prob *full);
......
This diff is collapsed.
...@@ -57,9 +57,8 @@ typedef struct frame_contexts { ...@@ -57,9 +57,8 @@ typedef struct frame_contexts {
#if CONFIG_ANS #if CONFIG_ANS
coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES]; coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES];
#endif #endif
aom_prob aom_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - [SWITCHABLE_FILTERS - 1];
1];
#if CONFIG_REF_MV #if CONFIG_REF_MV
aom_prob newmv_prob[NEWMV_MODE_CONTEXTS]; aom_prob newmv_prob[NEWMV_MODE_CONTEXTS];
...@@ -74,8 +73,8 @@ typedef struct frame_contexts { ...@@ -74,8 +73,8 @@ typedef struct frame_contexts {
aom_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1]; aom_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1];
#if CONFIG_EXT_INTER #if CONFIG_EXT_INTER
aom_prob aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS]
inter_compound_mode_probs[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES - 1]; [INTER_COMPOUND_MODES - 1];
aom_prob interintra_prob[BLOCK_SIZE_GROUPS]; aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1]; aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1];
aom_prob wedge_interintra_prob[BLOCK_SIZES]; aom_prob wedge_interintra_prob[BLOCK_SIZES];
...@@ -110,9 +109,8 @@ typedef struct frame_contexts { ...@@ -110,9 +109,8 @@ typedef struct frame_contexts {
int initialized; int initialized;
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
aom_prob inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1]; aom_prob inter_ext_tx_prob[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES - 1];
aom_prob aom_prob intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
intra_ext_tx_prob[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES - [TX_TYPES - 1];
1];
#else #else
aom_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1]; 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]; aom_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1];
...@@ -142,10 +140,10 @@ typedef struct FRAME_COUNTS { ...@@ -142,10 +140,10 @@ typedef struct FRAME_COUNTS {
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES]; unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
#endif #endif
av1_coeff_count_model coef[TX_SIZES][PLANE_TYPES]; av1_coeff_count_model coef[TX_SIZES][PLANE_TYPES];
unsigned int unsigned int eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]; [COEFF_CONTEXTS];
unsigned int unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
switchable_interp[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS]; [SWITCHABLE_FILTERS];
#if CONFIG_REF_MV #if CONFIG_REF_MV
unsigned int newmv_mode[NEWMV_MODE_CONTEXTS][2]; unsigned int newmv_mode[NEWMV_MODE_CONTEXTS][2];
unsigned int zeromv_mode[ZEROMV_MODE_CONTEXTS][2]; unsigned int zeromv_mode[ZEROMV_MODE_CONTEXTS][2];
...@@ -198,8 +196,8 @@ typedef struct FRAME_COUNTS { ...@@ -198,8 +196,8 @@ typedef struct FRAME_COUNTS {
unsigned int tx_size_implied[TX_SIZES][TX_SIZES]; unsigned int tx_size_implied[TX_SIZES][TX_SIZES];
#endif // CONFIG_RECT_TX #endif // CONFIG_RECT_TX
unsigned int inter_ext_tx[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES]; unsigned int inter_ext_tx[EXT_TX_SETS_INTER][EXT_TX_SIZES][TX_TYPES];
unsigned int unsigned int intra_ext_tx[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES]
intra_ext_tx[EXT_TX_SETS_INTRA][EXT_TX_SIZES][INTRA_MODES][TX_TYPES]; [TX_TYPES];
#else #else
unsigned int intra_ext_tx[EXT_TX_SIZES][TX_TYPES][TX_TYPES]; unsigned int intra_ext_tx[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES]; unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES];
...@@ -215,19 +213,21 @@ typedef struct FRAME_COUNTS { ...@@ -215,19 +213,21 @@ typedef struct FRAME_COUNTS {
#endif // CONFIG_EXT_INTRA #endif // CONFIG_EXT_INTRA
} FRAME_COUNTS; } FRAME_COUNTS;
extern const aom_prob extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1]; [INTRA_MODES - 1];
extern const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES] extern const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
[PALETTE_Y_MODE_CONTEXTS]; [PALETTE_Y_MODE_CONTEXTS];
extern const aom_prob av1_default_palette_uv_mode_prob[2]; extern const aom_prob av1_default_palette_uv_mode_prob[2];
extern const aom_prob extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES]
av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES][PALETTE_SIZES - 1]; [PALETTE_SIZES - 1];
extern const aom_prob extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES]
av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES][PALETTE_SIZES - 1]; [PALETTE_SIZES - 1];
extern const aom_prob av1_default_palette_y_color_prob extern const aom_prob av1_default_palette_y_color_prob[PALETTE_MAX_SIZE - 1]
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1]; [PALETTE_COLOR_CONTEXTS]
extern const aom_prob av1_default_palette_uv_color_prob [PALETTE_COLORS - 1];
[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_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
extern const aom_tree_index av1_inter_mode_tree[TREE_SIZE(INTER_MODES)]; extern const aom_tree_index av1_inter_mode_tree[TREE_SIZE(INTER_MODES)];
...@@ -245,17 +245,17 @@ extern const aom_tree_index ...@@ -245,17 +245,17 @@ extern const aom_tree_index
extern const aom_tree_index extern const aom_tree_index
av1_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)]; 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_size_tree[TREE_SIZE(PALETTE_SIZES)];
extern const aom_tree_index extern const aom_tree_index av1_palette_color_tree[PALETTE_MAX_SIZE - 1]
av1_palette_color_tree[PALETTE_MAX_SIZE - 1][TREE_SIZE(PALETTE_COLORS)]; [TREE_SIZE(PALETTE_COLORS)];
extern const aom_tree_index av1_tx_size_tree[TX_SIZES - 1][TREE_SIZE(TX_SIZES)]; extern const aom_tree_index av1_tx_size_tree[TX_SIZES - 1][TREE_SIZE(TX_SIZES)];
#if CONFIG_EXT_INTRA #if CONFIG_EXT_INTRA
extern const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)]; extern const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)];
#endif // CONFIG_EXT_INTRA #endif // CONFIG_EXT_INTRA
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
extern const aom_tree_index extern const aom_tree_index av1_ext_tx_inter_tree[EXT_TX_SETS_INTER]
av1_ext_tx_inter_tree[EXT_TX_SETS_INTER][TREE_SIZE(TX_TYPES)]; [TREE_SIZE(TX_TYPES)];
extern const aom_tree_index extern const aom_tree_index av1_ext_tx_intra_tree[EXT_TX_SETS_INTRA]
av1_ext_tx_intra_tree[EXT_TX_SETS_INTRA][TREE_SIZE(TX_TYPES)]; [TREE_SIZE(TX_TYPES)];
#else #else
extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)]; extern const aom_tree_index av1_ext_tx_tree[TREE_SIZE(TX_TYPES)];
#endif // CONFIG_EXT_TX #endif // CONFIG_EXT_TX
......
...@@ -95,8 +95,9 @@ static INLINE int av1_is_interpolating_filter( ...@@ -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_signal_dir[15][2][16];
extern const int8_t sub_pel_filters_temporalfilter_12_ver_signal_dir[15][6][16]; extern const int8_t sub_pel_filters_temporalfilter_12_ver_signal_dir[15][6][16];
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
extern const int16_t extern const int16_t sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15]
sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]; [6]
[8];
#endif #endif
#endif #endif
......
...@@ -367,10 +367,10 @@ qm_val_t *aom_qmatrix(AV1_COMMON *cm, int qmlevel, int is_chroma, ...@@ -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]; return &cm->gqmatrix[qmlevel][!!is_chroma][!!is_intra][log2sizem2][0];
} }
static uint16_t static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2]
iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32]; [4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
static uint16_t static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2]
wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32]; [4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
void aom_qm_init(AV1_COMMON *cm) { void aom_qm_init(AV1_COMMON *cm) {
int q, c, f, t, size; int q, c, f, t, size;
......
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
static int get_masked_weight(int m, int smoothness) { static int get_masked_weight(int m, int smoothness) {
#define SMOOTHER_LEN 32 #define SMOOTHER_LEN 32
static const uint8_t smoothfn[NSMOOTHERS][2 * SMOOTHER_LEN + 1] = { { 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 7, 13, 21, 32, 43,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 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, 64, 64,
} }; } };
if (m < -SMOOTHER_LEN) if (m < -SMOOTHER_LEN)
return 0; return 0;
...@@ -48,10 +48,9 @@ static int get_masked_weight(int m, int smoothness) { ...@@ -48,10 +48,9 @@ static int get_masked_weight(int m, int smoothness) {
} }
// [smoother][negative][direction] // [smoother][negative][direction]
DECLARE_ALIGNED( DECLARE_ALIGNED(16, static uint8_t,
16, static uint8_t, wedge_mask_obl[NSMOOTHERS][2][WEDGE_DIRECTIONS]
wedge_mask_obl[NSMOOTHERS][2][WEDGE_DIRECTIONS][MASK_MASTER_SIZE * [MASK_MASTER_SIZE * MASK_MASTER_SIZE]);
MASK_MASTER_SIZE]);
DECLARE_ALIGNED(16, static uint8_t, DECLARE_ALIGNED(16, static uint8_t,
wedge_signflip_lookup[BLOCK_SIZES][MAX_WEDGE_TYPES]); wedge_signflip_lookup[BLOCK_SIZES][MAX_WEDGE_TYPES]);
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#define BILATERAL_AMP_RANGE 256 #define BILATERAL_AMP_RANGE 256
#define BILATERAL_AMP_RANGE_SYM (2 * BILATERAL_AMP_RANGE + 1) #define BILATERAL_AMP_RANGE_SYM (2 * BILATERAL_AMP_RANGE + 1)
static uint8_t static uint8_t bilateral_filter_coeffs_r_kf[BILATERAL_LEVELS_KF]
bilateral_filter_coeffs_r_kf[BILATERAL_LEVELS_KF][BILATERAL_AMP_RANGE_SYM]; [BILATERAL_AMP_RANGE_SYM];
static uint8_t static uint8_t bilateral_filter_coeffs_r[BILATERAL_LEVELS]
bilateral_filter_coeffs_r[BILATERAL_LEVELS][BILATERAL_AMP_RANGE_SYM]; [BILATERAL_AMP_RANGE_SYM];
static uint8_t bilateral_filter_coeffs_s_kf[BILATERAL_LEVELS_KF] static uint8_t bilateral_filter_coeffs_s_kf[BILATERAL_LEVELS_KF]
[RESTORATION_WIN][RESTORATION_WIN]; [RESTORATION_WIN][RESTORATION_WIN];
static uint8_t bilateral_filter_coeffs_s[BILATERAL_LEVELS][RESTORATION_WIN] static uint8_t bilateral_filter_coeffs_s[BILATERAL_LEVELS][RESTORATION_WIN]
...@@ -121,12 +121,14 @@ void av1_loop_restoration_precal() { ...@@ -121,12 +121,14 @@ void av1_loop_restoration_precal() {
} }
for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) { for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) {
for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) { for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) {
bilateral_filter_coeffs_s_kf bilateral_filter_coeffs_s_kf[i][y + RESTORATION_HALFWIN]
[i][y + RESTORATION_HALFWIN][x + RESTORATION_HALFWIN] = [x + RESTORATION_HALFWIN] = (uint8_t)(
(uint8_t)(0.5 + 0.5 +
RESTORATION_FILT_STEP * RESTORATION_FILT_STEP *
exp(-(x * x) / (2 * sigma_x_d * sigma_x_d) - exp(-(x * x) / (2 * sigma_x_d *
(y * y) / (2 * sigma_y_d * sigma_y_d))); sigma_x_d) -
(y * y) / (2 * sigma_y_d *
sigma_y_d)));
} }
} }
} }
...@@ -149,13 +151,14 @@ void av1_loop_restoration_precal() { ...@@ -149,13 +151,14 @@ void av1_loop_restoration_precal() {
} }
for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) { for (y = -RESTORATION_HALFWIN; y <= RESTORATION_HALFWIN; y++) {
for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) { for (x = -RESTORATION_HALFWIN; x <= RESTORATION_HALFWIN; x++) {
bilateral_filter_coeffs_s[i][y + bilateral_filter_coeffs_s[i][y + RESTORATION_HALFWIN]
RESTORATION_HALFWIN][x + [x + RESTORATION_HALFWIN] = (uint8_t)(
RESTORATION_HALFWIN] = 0.5 +
(uint8_t)(0.5 + RESTORATION_FILT_STEP *
RESTORATION_FILT_STEP * exp(-(x * x) /
exp(-(x * x) / (2 * sigma_x_d * sigma_x_d) - (2 * sigma_x_d * sigma_x_d) -
(y * y) / (2 * sigma_y_d * sigma_y_d))); (y * y) /
(2 * sigma_y_d * sigma_y_d)));
} }
} }
} }
......
...@@ -266,9 +266,9 @@ DECLARE_ALIGNED(16, const int16_t, ...@@ -266,9 +266,9 @@ DECLARE_ALIGNED(16, const int16_t,
#endif #endif
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH