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,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)));
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) {
......
......@@ -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);
......
This diff is collapsed.
......@@ -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 +
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 @@ 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 +
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)));
}
}
}
......
......@@ -266,9 +266,9 @@ DECLARE_ALIGNED(16, const int16_t,
#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 },
......
......@@ -2564,7 +2564,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
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 @@ static const uint8_t *decode_tiles_mt(AV1Decoder *pbi, const uint8_t *data,
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;
......
......@@ -220,7 +220,7 @@ static void read_tx_size_vartx(AV1_COMMON *cm, MACROBLOCKD *xd,
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 @@ static void read_palette_mode_info(AV1_COMMON *const cm, MACROBLOCKD *const xd,
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 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
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 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
#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)
......
......@@ -473,7 +473,7 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane,
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;
......
<
......@@ -1461,8 +1461,9 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi,
} 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 @@ static void update_coef_probs_common(aom_writer *const bc, AV1_COMP *cpi,
#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;