apply clang-format Change-Id: I863fc85c7dc1b4f4e5740ac086fe1a852c62d26e
diff --git a/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c index c6c32ea..ebff299 100644 --- a/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c +++ b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c
@@ -46,14 +46,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_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h index 8eafab5..5bc8a52 100644 --- a/aom_dsp/x86/convolve.h +++ b/aom_dsp/x86/convolve.h
@@ -26,10 +26,10 @@ const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h) { \ - (void) filter_x; \ - (void) x_step_q4; \ - (void) filter_y; \ - (void) y_step_q4; \ + (void)filter_x; \ + (void)x_step_q4; \ + (void)filter_y; \ + (void)y_step_q4; \ assert(filter[3] != 128); \ assert(step_q4 == 16); \ if (filter[0] || filter[1] || filter[2]) { \
diff --git a/aom_ports/x86.h b/aom_ports/x86.h index d823dbc..7cad83f 100644 --- a/aom_ports/x86.h +++ b/aom_ports/x86.h
@@ -126,7 +126,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 2cfb01f..3d79737 100644 --- a/aomenc.c +++ b/aomenc.c
@@ -1956,8 +1956,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/entropy.h b/av1/common/entropy.h index 85fe870..a19f771 100644 --- a/av1/common/entropy.h +++ b/av1/common/entropy.h
@@ -129,10 +129,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 */ @@ -171,16 +171,17 @@ 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); #if CONFIG_RANS || CONFIG_DAALA_EC -typedef aom_cdf_prob - coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_TOKENS]; -extern const aom_cdf_prob - av1_pareto8_token_probs[COEFF_PROB_MODELS][ENTROPY_TOKENS - 2]; +typedef aom_cdf_prob coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] + [ENTROPY_TOKENS]; +extern const aom_cdf_prob av1_pareto8_token_probs[COEFF_PROB_MODELS] + [ENTROPY_TOKENS - 2]; struct frame_contexts; void av1_coef_pareto_cdfs(struct frame_contexts *fc); #endif // CONFIG_RANS
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 4330b36..4477ba4 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c
@@ -415,279 +415,280 @@ }, }; -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), @@ -798,16 +799,23 @@ static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 }; #if CONFIG_EXT_INTERP -static const aom_prob default_switchable_interp_prob - [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = { - { 235, 192, 128, 128 }, { 36, 243, 208, 128 }, { 34, 16, 128, 128 }, - { 36, 243, 48, 128 }, { 34, 16, 128, 128 }, { 149, 160, 128, 128 }, - }; +static const aom_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS] + [SWITCHABLE_FILTERS - 1] = { + { 235, 192, 128, 128 }, + { 36, 243, 208, 128 }, + { 34, 16, 128, 128 }, + { 36, 243, 48, 128 }, + { 34, 16, 128, 128 }, + { 149, 160, 128, 128 }, + }; #else // CONFIG_EXT_INTERP -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 // CONFIG_EXT_INTERP #if CONFIG_MISC_FIXES
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h index c65f14d..3d6a97c 100644 --- a/av1/common/entropymode.h +++ b/av1/common/entropymode.h
@@ -65,9 +65,8 @@ #if CONFIG_RANS || CONFIG_DAALA_EC coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES]; #endif // CONFIG_RANS - 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]; @@ -106,8 +105,8 @@ aom_cdf_prob y_mode_cdf[BLOCK_SIZE_GROUPS][INTRA_MODES]; aom_cdf_prob uv_mode_cdf[INTRA_MODES][INTRA_MODES]; aom_cdf_prob partition_cdf[PARTITION_CONTEXTS][PARTITION_TYPES]; - aom_cdf_prob - switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS]; + aom_cdf_prob switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS] + [SWITCHABLE_FILTERS]; aom_cdf_prob inter_mode_cdf[INTER_MODE_CONTEXTS][INTER_MODES]; aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES][TX_TYPES]; aom_cdf_prob inter_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES]; @@ -123,10 +122,10 @@ unsigned int uv_mode[INTRA_MODES][INTRA_MODES]; unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES]; 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]; @@ -165,8 +164,8 @@ unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES]; } 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]; #if CONFIG_DAALA_EC extern aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][INTRA_MODES]; #endif @@ -175,14 +174,16 @@ 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]; #endif // CONFIG_PALETTE extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)]; @@ -202,8 +203,8 @@ #if CONFIG_PALETTE 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)]; #endif // CONFIG_PALETTE #if CONFIG_DAALA_EC
diff --git a/av1/common/loopfilter.c b/av1/common/loopfilter.c index 9a8f389..7971e86 100644 --- a/av1/common/loopfilter.c +++ b/av1/common/loopfilter.c
@@ -233,8 +233,8 @@ static uint8_t get_filter_level(const loop_filter_info_n *lfi_n, const MB_MODE_INFO *mbmi) { - return lfi_n - ->lvl[mbmi->segment_id][mbmi->ref_frame[0]][mode_lf_lut[mbmi->mode]]; + return lfi_n->lvl[mbmi->segment_id][mbmi->ref_frame[0]] + [mode_lf_lut[mbmi->mode]]; } void av1_loop_filter_init(AV1_COMMON *cm) {
diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c index cfb2ac9..789ac78 100644 --- a/av1/common/quant_common.c +++ b/av1/common/quant_common.c
@@ -222,10 +222,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/decoder/detokenize.c b/av1/decoder/detokenize.c index e67cdea..40e2925 100644 --- a/av1/decoder/detokenize.c +++ b/av1/decoder/detokenize.c
@@ -70,7 +70,7 @@ fc->coef_probs[tx_size][type][ref]; const aom_prob *prob; #if CONFIG_RANS || CONFIG_DAALA_EC - const aom_cdf_prob (*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] = + const aom_cdf_prob(*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] = fc->coef_cdfs[tx_size][type][ref]; const aom_cdf_prob(*cdf)[ENTROPY_TOKENS]; #endif // CONFIG_RANS @@ -293,7 +293,7 @@ const 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/encodeframe.c b/av1/encoder/encodeframe.c index ebea471..7dd1f4a 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -1267,9 +1267,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]; } } @@ -1313,26 +1313,26 @@ #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 const int bit = (ref0 == GOLDEN_FRAME || ref0 == LAST3_FRAME); - counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p(cm, - xd)][0][bit]++; + counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p(cm, xd)][0] + [bit]++; if (!bit) - counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p1( - cm, xd)][1][ref0 == LAST_FRAME]++; + counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p1(cm, xd)][1] + [ref0 == LAST_FRAME]++; else - counts->comp_fwdref[av1_get_pred_context_comp_fwdref_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_fwdref[av1_get_pred_context_comp_fwdref_p2(cm, xd)][2] + [ref0 == GOLDEN_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)][ref0 == GOLDEN_FRAME]++; + counts->comp_ref[av1_get_pred_context_comp_ref_p(cm, xd)] + [ref0 == GOLDEN_FRAME]++; #endif // CONFIG_EXT_REFS } else { #if CONFIG_EXT_REFS @@ -1340,26 +1340,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 } }
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c index 9682bb6..648904e 100644 --- a/av1/encoder/encodemb.c +++ b/av1/encoder/encodemb.c
@@ -165,12 +165,10 @@ if (next < default_eob) { band = band_translate[i + 1]; pt = trellis_get_coeff_context(scan, nb, i, t0, token_cache); - rate0 += - mb->token_costs[tx_size][type][ref][band][0][pt][tokens[next][0] - .token]; - rate1 += - mb->token_costs[tx_size][type][ref][band][0][pt][tokens[next][1] - .token]; + rate0 += mb->token_costs[tx_size][type][ref][band][0][pt] + [tokens[next][0].token]; + rate1 += mb->token_costs[tx_size][type][ref][band][0][pt] + [tokens[next][1].token]; } UPDATE_RD_COST(); /* And pick the best. */ @@ -229,15 +227,13 @@ band = band_translate[i + 1]; if (t0 != EOB_TOKEN) { pt = trellis_get_coeff_context(scan, nb, i, t0, token_cache); - rate0 += - mb->token_costs[tx_size][type][ref][band][!x][pt][tokens[next][0] - .token]; + rate0 += mb->token_costs[tx_size][type][ref][band][!x][pt] + [tokens[next][0].token]; } if (t1 != EOB_TOKEN) { pt = trellis_get_coeff_context(scan, nb, i, t1, token_cache); - rate1 += - mb->token_costs[tx_size][type][ref][band][!x][pt][tokens[next][1] - .token]; + rate1 += mb->token_costs[tx_size][type][ref][band][!x][pt] + [tokens[next][1].token]; } }
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index 773f4c8..0184872 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -499,10 +499,10 @@ #if CONFIG_PALETTE 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]; #endif // CONFIG_PALETTE int multi_arf_allowed;
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c index 0b56c0b..f2bb95b 100644 --- a/av1/encoder/mcomp.c +++ b/av1/encoder/mcomp.c
@@ -914,12 +914,13 @@ // candidates as indicated in the num_candidates and candidates arrays // passed into this function // -static int av1_pattern_search( - const MACROBLOCK *x, MV *ref_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, MV *best_mv, - const int num_candidates[MAX_PATTERN_SCALES], - const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) { +static int av1_pattern_search(const MACROBLOCK *x, MV *ref_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, MV *best_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, @@ -1564,97 +1565,97 @@ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; // Note that the largest candidate step at each scale is 2^scale - static const MV - square_candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES] = { - { { -1, -1 }, - { 0, -1 }, - { 1, -1 }, - { 1, 0 }, - { 1, 1 }, - { 0, 1 }, - { -1, 1 }, - { -1, 0 } }, - { { -2, -2 }, - { 0, -2 }, - { 2, -2 }, - { 2, 0 }, - { 2, 2 }, - { 0, 2 }, - { -2, 2 }, - { -2, 0 } }, - { { -4, -4 }, - { 0, -4 }, - { 4, -4 }, - { 4, 0 }, - { 4, 4 }, - { 0, 4 }, - { -4, 4 }, - { -4, 0 } }, - { { -8, -8 }, - { 0, -8 }, - { 8, -8 }, - { 8, 0 }, - { 8, 8 }, - { 0, 8 }, - { -8, 8 }, - { -8, 0 } }, - { { -16, -16 }, - { 0, -16 }, - { 16, -16 }, - { 16, 0 }, - { 16, 16 }, - { 0, 16 }, - { -16, 16 }, - { -16, 0 } }, - { { -32, -32 }, - { 0, -32 }, - { 32, -32 }, - { 32, 0 }, - { 32, 32 }, - { 0, 32 }, - { -32, 32 }, - { -32, 0 } }, - { { -64, -64 }, - { 0, -64 }, - { 64, -64 }, - { 64, 0 }, - { 64, 64 }, - { 0, 64 }, - { -64, 64 }, - { -64, 0 } }, - { { -128, -128 }, - { 0, -128 }, - { 128, -128 }, - { 128, 0 }, - { 128, 128 }, - { 0, 128 }, - { -128, 128 }, - { -128, 0 } }, - { { -256, -256 }, - { 0, -256 }, - { 256, -256 }, - { 256, 0 }, - { 256, 256 }, - { 0, 256 }, - { -256, 256 }, - { -256, 0 } }, - { { -512, -512 }, - { 0, -512 }, - { 512, -512 }, - { 512, 0 }, - { 512, 512 }, - { 0, 512 }, - { -512, 512 }, - { -512, 0 } }, - { { -1024, -1024 }, - { 0, -1024 }, - { 1024, -1024 }, - { 1024, 0 }, - { 1024, 1024 }, - { 0, 1024 }, - { -1024, 1024 }, - { -1024, 0 } }, - }; + static const MV square_candidates[MAX_PATTERN_SCALES] + [MAX_PATTERN_CANDIDATES] = { + { { -1, -1 }, + { 0, -1 }, + { 1, -1 }, + { 1, 0 }, + { 1, 1 }, + { 0, 1 }, + { -1, 1 }, + { -1, 0 } }, + { { -2, -2 }, + { 0, -2 }, + { 2, -2 }, + { 2, 0 }, + { 2, 2 }, + { 0, 2 }, + { -2, 2 }, + { -2, 0 } }, + { { -4, -4 }, + { 0, -4 }, + { 4, -4 }, + { 4, 0 }, + { 4, 4 }, + { 0, 4 }, + { -4, 4 }, + { -4, 0 } }, + { { -8, -8 }, + { 0, -8 }, + { 8, -8 }, + { 8, 0 }, + { 8, 8 }, + { 0, 8 }, + { -8, 8 }, + { -8, 0 } }, + { { -16, -16 }, + { 0, -16 }, + { 16, -16 }, + { 16, 0 }, + { 16, 16 }, + { 0, 16 }, + { -16, 16 }, + { -16, 0 } }, + { { -32, -32 }, + { 0, -32 }, + { 32, -32 }, + { 32, 0 }, + { 32, 32 }, + { 0, 32 }, + { -32, 32 }, + { -32, 0 } }, + { { -64, -64 }, + { 0, -64 }, + { 64, -64 }, + { 64, 0 }, + { 64, 64 }, + { 0, 64 }, + { -64, 64 }, + { -64, 0 } }, + { { -128, -128 }, + { 0, -128 }, + { 128, -128 }, + { 128, 0 }, + { 128, 128 }, + { 0, 128 }, + { -128, 128 }, + { -128, 0 } }, + { { -256, -256 }, + { 0, -256 }, + { 256, -256 }, + { 256, 0 }, + { 256, 256 }, + { 0, 256 }, + { -256, 256 }, + { -256, 0 } }, + { { -512, -512 }, + { 0, -512 }, + { 512, -512 }, + { 512, 0 }, + { 512, 512 }, + { 0, 512 }, + { -512, 512 }, + { -512, 0 } }, + { { -1024, -1024 }, + { 0, -1024 }, + { 1024, -1024 }, + { 1024, 0 }, + { 1024, 1024 }, + { 0, 1024 }, + { -1024, 1024 }, + { -1024, 0 } }, + }; return av1_pattern_search( x, ref_mv, search_param, sad_per_bit, do_init_search, cost_list, vfp, use_mvcost, center_mv, best_mv, square_num_candidates, square_candidates);
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c index e12ebaf..e05dff9 100644 --- a/av1/encoder/ratectrl.c +++ b/av1/encoder/ratectrl.c
@@ -63,7 +63,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 d863ea7..4b796cb 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c
@@ -3147,12 +3147,13 @@ ctx->hybrid_pred_diff = (int)comp_pred_diff[REFERENCE_MODE_SELECT]; } -static void setup_buffer_inter( - const AV1_COMP *const cpi, MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame, - BLOCK_SIZE block_size, int mi_row, int mi_col, - int_mv frame_nearest_mv[MAX_REF_FRAMES], - int_mv frame_near_mv[MAX_REF_FRAMES], - struct buf_2d yv12_mb[MAX_REF_FRAMES][MAX_MB_PLANE]) { +static void setup_buffer_inter(const AV1_COMP *const cpi, MACROBLOCK *x, + MV_REFERENCE_FRAME ref_frame, + BLOCK_SIZE block_size, int mi_row, int mi_col, + int_mv frame_nearest_mv[MAX_REF_FRAMES], + int_mv frame_near_mv[MAX_REF_FRAMES], + struct buf_2d yv12_mb[MAX_REF_FRAMES] + [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;
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c index fdb19c6..d1f5bea 100644 --- a/av1/encoder/tokenize.c +++ b/av1/encoder/tokenize.c
@@ -355,7 +355,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; @@ -397,15 +397,15 @@ const TX_TYPE tx_type = get_tx_type(type, xd, block); const SCAN_ORDER *const scan_order = get_scan(tx_size, tx_type); 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[tx_size][type][ref]; - aom_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = + aom_prob(*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = cpi->common.fc->coef_probs[tx_size][type][ref]; #if CONFIG_RANS || CONFIG_DAALA_EC - aom_cdf_prob (*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] = + aom_cdf_prob(*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] = cpi->common.fc->coef_cdfs[tx_size][type][ref]; #endif - unsigned int (*const eob_branch)[COEFF_CONTEXTS] = + unsigned int(*const eob_branch)[COEFF_CONTEXTS] = td->counts->eob_branch[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 0db1542..e78b01e 100644 --- a/test/av1_convolve_optimz_test.cc +++ b/test/av1_convolve_optimz_test.cc
@@ -36,13 +36,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: