av1/encoder: apply clang-format v5.0.0 Change-Id: If88516ac3dcd72b528f4f7e27aab181a5137b285
diff --git a/av1/encoder/av1_quantize.c b/av1/encoder/av1_quantize.c index b1df95c..f767ddb 100644 --- a/av1/encoder/av1_quantize.c +++ b/av1/encoder/av1_quantize.c
@@ -2051,16 +2051,15 @@ const QUANTS *const quants = &cpi->quants; #if CONFIG_EXT_DELTA_Q - int current_q_index = - AOMMAX(0, AOMMIN(QINDEX_RANGE - 1, - cpi->oxcf.deltaq_mode != NO_DELTA_Q - ? cm->base_qindex + xd->delta_qindex - : cm->base_qindex)); + int current_q_index = AOMMAX( + 0, AOMMIN(QINDEX_RANGE - 1, cpi->oxcf.deltaq_mode != NO_DELTA_Q + ? cm->base_qindex + xd->delta_qindex + : cm->base_qindex)); #else int current_q_index = AOMMAX( - 0, AOMMIN(QINDEX_RANGE - 1, - cm->delta_q_present_flag ? cm->base_qindex + xd->delta_qindex - : cm->base_qindex)); + 0, AOMMIN(QINDEX_RANGE - 1, cm->delta_q_present_flag + ? cm->base_qindex + xd->delta_qindex + : cm->base_qindex)); #endif const int qindex = av1_get_qindex(&cm->seg, segment_id, current_q_index); const int rdmult = av1_compute_rd_mult(cpi, qindex + cm->y_dc_delta_q);
diff --git a/av1/encoder/bgsprite.c b/av1/encoder/bgsprite.c index 36f31fe..6dc552b 100644 --- a/av1/encoder/bgsprite.c +++ b/av1/encoder/bgsprite.c
@@ -1027,7 +1027,7 @@ build_mask(x_min[center_idx], y_min[center_idx], x_offset, y_offset, x_block_width, y_block_height, N_1, (const YuvPixelGaussian **)gauss, - (YV12_BUFFER_CONFIG * const) frames[center_idx], panorama, mask); + (YV12_BUFFER_CONFIG *const)frames[center_idx], panorama, mask); YV12_BUFFER_CONFIG temporal_arf; memset(&temporal_arf, 0, sizeof(temporal_arf));
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index b92d197..4feaca1 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -285,7 +285,7 @@ #if CONFIG_SEGMENT_GLOBALMV || segfeature_active(&cm->seg, segment_id, SEG_LVL_GLOBALMV) #endif - ) + ) if (!av1_is_valid_scale(&cm->frame_refs[0].sf)) return; // LAST_FRAME not valid for reference @@ -440,10 +440,9 @@ const int is_cat6 = (extra_bits->base_val == CAT6_MIN_VAL); // be written excluding // the sign bit. - int skip_bits = - is_cat6 - ? CAT6_BIT_SIZE - av1_get_cat6_extrabits_size(tx_size, bit_depth) - : 0; + int skip_bits = is_cat6 ? CAT6_BIT_SIZE - av1_get_cat6_extrabits_size( + tx_size, bit_depth) + : 0; assert(!(bit_string >> (bit_string_length - skip_bits + 1))); if (bit_string_length > 0) @@ -2254,9 +2253,8 @@ if (num_planes > 1) { int s = AOMMIN(cm->subsampling_x, cm->subsampling_y); if (s && !chroma_none) { - aom_wb_write_bit(wb, - cm->rst_info[1].restoration_unit_size != - cm->rst_info[0].restoration_unit_size); + aom_wb_write_bit(wb, cm->rst_info[1].restoration_unit_size != + cm->rst_info[0].restoration_unit_size); assert(cm->rst_info[1].restoration_unit_size == cm->rst_info[0].restoration_unit_size || cm->rst_info[1].restoration_unit_size == @@ -4526,7 +4524,7 @@ , uint8_t enhancement_layers_cnt) { #else - ) { +) { #endif AV1_COMMON *const cm = &cpi->common; struct aom_write_bit_buffer wb = { dst, 0 };
diff --git a/av1/encoder/block.h b/av1/encoder/block.h index d4c59c4..9f93591 100644 --- a/av1/encoder/block.h +++ b/av1/encoder/block.h
@@ -70,7 +70,9 @@ int lps_cost[LEVEL_CONTEXTS][COEFF_BASE_RANGE + 1]; } LV_MAP_COEFF_COST; -typedef struct { int eob_cost[2][11]; } LV_MAP_EOB_COST; +typedef struct { + int eob_cost[2][11]; +} LV_MAP_EOB_COST; typedef struct { tran_low_t tcoeff[MAX_MB_PLANE][MAX_SB_SQUARE];
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c index fa397f6..5bd85f1 100644 --- a/av1/encoder/encodemb.c +++ b/av1/encoder/encodemb.c
@@ -114,7 +114,8 @@ // These numbers are empirically obtained. static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] = { - { 10, 7 }, { 8, 5 }, + { 10, 7 }, + { 8, 5 }, }; static int optimize_b_greedy(const AV1_COMMON *cm, MACROBLOCK *mb, int plane,
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index 3e31446..92ee64c 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c
@@ -84,12 +84,12 @@ #define AM_SEGMENT_ID_INACTIVE 7 #define AM_SEGMENT_ID_ACTIVE 0 -#define ALTREF_HIGH_PRECISION_MV 1 // Whether to use high precision mv - // for altref computation. -#define HIGH_PRECISION_MV_QTHRESH 200 // Q threshold for high precision - // mv. Choose a very high value for - // now so that HIGH_PRECISION is always - // chosen. +// Whether to use high precision mv for altref computation. +#define ALTREF_HIGH_PRECISION_MV 1 + +// Q threshold for high precision mv. Choose a very high value for now so that +// HIGH_PRECISION is always chosen. +#define HIGH_PRECISION_MV_QTHRESH 200 // #define OUTPUT_YUV_REC #ifdef OUTPUT_YUV_SKINMAP @@ -268,7 +268,7 @@ , int cur_frame_force_integer_mv #endif - ) { +) { MACROBLOCK *const mb = &cpi->td.mb; cpi->common.allow_high_precision_mv = allow_high_precision_mv; @@ -319,11 +319,11 @@ static void setup_frame(AV1_COMP *cpi) { AV1_COMMON *const cm = &cpi->common; -// Set up entropy context depending on frame type. The decoder mandates -// the use of the default context, index 0, for keyframes and inter -// frames where the error_resilient_mode or intra_only flag is set. For -// other inter-frames the encoder currently uses only two contexts; -// context 1 for ALTREF frames and context 0 for the others. + // Set up entropy context depending on frame type. The decoder mandates + // the use of the default context, index 0, for keyframes and inter + // frames where the error_resilient_mode or intra_only flag is set. For + // other inter-frames the encoder currently uses only two contexts; + // context 1 for ALTREF frames and context 0 for the others. #if CONFIG_SEGMENT_PRED_LAST if (cm->prev_frame) cm->last_frame_seg_map = cm->prev_frame->seg_map; @@ -3426,14 +3426,12 @@ int buf_scaler = 2; CHECK_MEM_ERROR( cm, cpi->td.mb.above_pred_buf, - (uint8_t *)aom_memalign(16, - buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * - sizeof(*cpi->td.mb.above_pred_buf))); + (uint8_t *)aom_memalign(16, buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * + sizeof(*cpi->td.mb.above_pred_buf))); CHECK_MEM_ERROR( cm, cpi->td.mb.left_pred_buf, - (uint8_t *)aom_memalign(16, - buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * - sizeof(*cpi->td.mb.left_pred_buf))); + (uint8_t *)aom_memalign(16, buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * + sizeof(*cpi->td.mb.left_pred_buf))); CHECK_MEM_ERROR(cm, cpi->td.mb.wsrc_buf, (int32_t *)aom_memalign( @@ -5175,7 +5173,7 @@ #if CONFIG_EXT_TILE || cm->large_scale_tile #endif // CONFIG_EXT_TILE - ) { + ) { no_loopfilter = 1; #if CONFIG_LOOP_RESTORATION no_restoration = 1; @@ -5190,7 +5188,7 @@ #if CONFIG_EXT_TILE || cm->large_scale_tile #endif - ) { + ) { no_cdef = 1; }
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c index e21fe79..e37bd45 100644 --- a/av1/encoder/encodetxb.c +++ b/av1/encoder/encodetxb.c
@@ -1103,11 +1103,15 @@ #if FAST_OPTIMIZE_TXB #define ALNB_REF_OFFSET_NUM 2 static const int alnb_ref_offset[ALNB_REF_OFFSET_NUM][2] = { - { -1, 0 }, { 0, -1 }, + { -1, 0 }, + { 0, -1 }, }; #define NB_REF_OFFSET_NUM 4 static const int nb_ref_offset[NB_REF_OFFSET_NUM][2] = { - { -1, 0 }, { 0, -1 }, { 1, 0 }, { 0, 1 }, + { -1, 0 }, + { 0, -1 }, + { 1, 0 }, + { 0, 1 }, }; #endif // FAST_OPTIMIZE_TXB @@ -1841,7 +1845,8 @@ // These numbers are empirically obtained. static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] = { - { 17, 13 }, { 16, 10 }, + { 17, 13 }, + { 16, 10 }, }; void hbt_hash_init() {
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c index 7f6c641..cf7b465 100644 --- a/av1/encoder/ethread.c +++ b/av1/encoder/ethread.c
@@ -88,14 +88,12 @@ int buf_scaler = 2; CHECK_MEM_ERROR(cm, thread_data->td->above_pred_buf, (uint8_t *)aom_memalign( - 16, - buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * - sizeof(*thread_data->td->above_pred_buf))); + 16, buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * + sizeof(*thread_data->td->above_pred_buf))); CHECK_MEM_ERROR(cm, thread_data->td->left_pred_buf, (uint8_t *)aom_memalign( - 16, - buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * - sizeof(*thread_data->td->left_pred_buf))); + 16, buf_scaler * MAX_MB_PLANE * MAX_SB_SQUARE * + sizeof(*thread_data->td->left_pred_buf))); CHECK_MEM_ERROR( cm, thread_data->td->wsrc_buf, (int32_t *)aom_memalign(
diff --git a/av1/encoder/global_motion.c b/av1/encoder/global_motion.c index 3bfbdd7..040e35d 100644 --- a/av1/encoder/global_motion.c +++ b/av1/encoder/global_motion.c
@@ -135,9 +135,7 @@ int r_stride, uint8_t *dst, int d_width, int d_height, int d_stride, int n_refinements, int64_t best_frame_error) { - static const int max_trans_model_params[TRANS_TYPES] = { - 0, 2, 4, 6, - }; + static const int max_trans_model_params[TRANS_TYPES] = { 0, 2, 4, 6 }; const int border = ERRORADV_BORDER; int i = 0, p; int n_params = max_trans_model_params[wmtype];
diff --git a/av1/encoder/grain_test_vectors.h b/av1/encoder/grain_test_vectors.h index c85f74c..054c3d9 100644 --- a/av1/encoder/grain_test_vectors.h +++ b/av1/encoder/grain_test_vectors.h
@@ -77,17 +77,11 @@ { 1 /* apply_grain */, 1 /* update_parameters */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 2 /* num_points_y */, - { - { 0, 64 }, { 255, 64 }, - }, + { { 0, 64 }, { 255, 64 } }, 2 /* num_cb_points */, - { - { 0, 64 }, { 255, 64 }, - }, + { { 0, 64 }, { 255, 64 } }, 2 /* num_cr_points */, 11 /* scaling_shift */, 3 /* ar_coeff_lag */, @@ -120,17 +114,11 @@ { 1 /* apply_grain */, 1 /* update_parameters */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 2 /* num_points_y */, - { - { 0, 64 }, { 255, 64 }, - }, + { { 0, 64 }, { 255, 64 } }, 2 /* num_cb_points */, - { - { 0, 64 }, { 255, 64 }, - }, + { { 0, 64 }, { 255, 64 } }, 2 /* num_cr_points */, 11 /* scaling_shift */, 3 /* ar_coeff_lag */, @@ -230,9 +218,7 @@ { 1 /* apply_grain */, 0 /* update_parameters */, - { - { 0, 64 }, { 255, 64 }, - }, + { { 0, 64 }, { 255, 64 } }, 2 /* num_points_y */, { { 0, 96 }, @@ -358,13 +344,9 @@ { 255, 96 }, }, 14 /* num_points_y */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 2 /* num_cb_points */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 2 /* num_cr_points */, 11 /* scaling_shift */, 3 /* ar_coeff_lag */, @@ -397,17 +379,11 @@ { 1 /* apply_grain */, 1 /* update_parameters */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 2 /* num_points_y */, - { - { 0, 62 }, { 255, 62 }, - }, + { { 0, 62 }, { 255, 62 } }, 2 /* num_cb_points */, - { - { 0, 62 }, { 255, 62 }, - }, + { { 0, 62 }, { 255, 62 } }, 2 /* num_cr_points */, 11 /* scaling_shift */, 3 /* ar_coeff_lag */, @@ -440,29 +416,17 @@ { 1 /* apply_grain */, 0 /* update_parameters */, - { - { 0, 48 }, { 255, 48 }, - }, + { { 0, 48 }, { 255, 48 } }, 2 /* num_points_y */, - { - { 0, 32 }, { 255, 32 }, - }, + { { 0, 32 }, { 255, 32 } }, 2 /* num_cb_points */, - { - { 0, 32 }, { 255, 32 }, - }, + { { 0, 32 }, { 255, 32 } }, 2 /* num_cr_points */, 10 /* scaling_shift */, 2 /* ar_coeff_lag */, - { - 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113, - }, - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, - }, - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, - }, + { 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127 }, 8 /* ar_coeff_shift */, 128 /* cb_mult */, 192 /* cb_luma_mult */, @@ -480,29 +444,17 @@ { 1 /* apply_grain */, 1 /* update_parameters */, - { - { 0, 48 }, { 255, 48 }, - }, + { { 0, 48 }, { 255, 48 } }, 2 /* num_points_y */, - { - { 0, 32 }, { 255, 32 }, - }, + { { 0, 32 }, { 255, 32 } }, 2 /* num_cb_points */, - { - { 0, 32 }, { 255, 32 }, - }, + { { 0, 32 }, { 255, 32 } }, 2 /* num_cr_points */, 10 /* scaling_shift */, 2 /* ar_coeff_lag */, - { - 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113, - }, - { - -7, -6, -48, -22, 2, -3, -45, 73, -11, -26, -52, 76, 0, - }, - { - -7, -6, -48, -22, 2, -3, -45, 73, -11, -26, -52, 76, 0, - }, + { 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113 }, + { -7, -6, -48, -22, 2, -3, -45, 73, -11, -26, -52, 76, 0 }, + { -7, -6, -48, -22, 2, -3, -45, 73, -11, -26, -52, 76, 0 }, 8 /* ar_coeff_shift */, 128 /* cb_mult */, 192 /* cb_luma_mult */, @@ -520,9 +472,7 @@ { 1 /* apply_grain */, 0 /* update_parameters */, - { - { 0, 32 }, { 255, 32 }, - }, + { { 0, 32 }, { 255, 32 } }, 2 /* num_points_y */, { { 0, 48 }, @@ -654,25 +604,15 @@ { 255, 0 }, }, 14 /* num_points_y */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 0 /* num_cb_points */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 0 /* num_cr_points */, 10 /* scaling_shift */, 2 /* ar_coeff_lag */, - { - 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113, - }, - { - 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, - }, + { 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113 }, + { 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 }, 8 /* ar_coeff_shift */, 128 /* cb_mult */, 192 /* cb_luma_mult */, @@ -707,25 +647,15 @@ { 255, 48 }, }, 14 /* num_points_y */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 0 /* num_cb_points */, - { - { 0, 0 }, { 255, 0 }, - }, + { { 0, 0 }, { 255, 0 } }, 0 /* num_cr_points */, 10 /* scaling_shift */, 2 /* ar_coeff_lag */, - { - 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113, - }, - { - 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, - }, + { 10, -30, -20, -39, 1, -24, 12, 103, 60, -9, -24, 113 }, + { 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 }, 8 /* ar_coeff_shift */, 128 /* cb_mult */, 192 /* cb_luma_mult */, @@ -743,29 +673,17 @@ { 1 /* apply_grain */, 1 /* update_parameters */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 1 /* num_points_y */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 0 /* num_cb_points */, - { - { 0, 96 }, { 255, 96 }, - }, + { { 0, 96 }, { 255, 96 } }, 0 /* num_cr_points */, 11 /* scaling_shift */, 2 /* ar_coeff_lag */, - { - 5, -15, -10, -19, 0, -12, 6, 51, 30, -5, -12, 56, - }, - { - 2, 2, -24, -5, 1, 1, -18, 37, -2, 0, -15, 39, -70, - }, - { - 2, 3, -24, -5, -1, 0, -18, 38, -2, 0, -15, 39, -55, - }, + { 5, -15, -10, -19, 0, -12, 6, 51, 30, -5, -12, 56 }, + { 2, 2, -24, -5, 1, 1, -18, 37, -2, 0, -15, 39, -70 }, + { 2, 3, -24, -5, -1, 0, -18, 38, -2, 0, -15, 39, -55 }, 7 /* ar_coeff_shift */, 128 /* cb_mult */, 192 /* cb_luma_mult */,
diff --git a/av1/encoder/hash_motion.h b/av1/encoder/hash_motion.h index 26e1ac4..d455006 100644 --- a/av1/encoder/hash_motion.h +++ b/av1/encoder/hash_motion.h
@@ -29,7 +29,9 @@ uint32_t hash_value2; } block_hash; -typedef struct _hash_table { Vector **p_lookup_table; } hash_table; +typedef struct _hash_table { + Vector **p_lookup_table; +} hash_table; void av1_hash_table_init(hash_table *p_hash_table); void av1_hash_table_destroy(hash_table *p_hash_table);
diff --git a/av1/encoder/mbgraph.h b/av1/encoder/mbgraph.h index 758e2ad..e5c84a2 100644 --- a/av1/encoder/mbgraph.h +++ b/av1/encoder/mbgraph.h
@@ -26,7 +26,9 @@ } ref[TOTAL_REFS_PER_FRAME]; } MBGRAPH_MB_STATS; -typedef struct { MBGRAPH_MB_STATS *mb_stats; } MBGRAPH_FRAME_STATS; +typedef struct { + MBGRAPH_MB_STATS *mb_stats; +} MBGRAPH_FRAME_STATS; struct AV1_COMP;
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c index af48656..c82f7a0 100644 --- a/av1/encoder/mcomp.c +++ b/av1/encoder/mcomp.c
@@ -1915,7 +1915,10 @@ } static const MV search_pos[4] = { - { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 }, + { -1, 0 }, + { 0, -1 }, + { 0, 1 }, + { 1, 0 }, }; unsigned int av1_int_pro_motion_estimation(const AV1_COMP *cpi, MACROBLOCK *x, @@ -2006,7 +2009,10 @@ { const uint8_t *const pos[4] = { - ref_buf - ref_stride, ref_buf - 1, ref_buf + 1, ref_buf + ref_stride, + ref_buf - ref_stride, + ref_buf - 1, + ref_buf + 1, + ref_buf + ref_stride, }; cpi->fn_ptr[bsize].sdx4df(src_buf, src_stride, pos, ref_stride, sad_arr);
diff --git a/av1/encoder/pickcdef.c b/av1/encoder/pickcdef.c index e3bd10c..6f8d78b 100644 --- a/av1/encoder/pickcdef.c +++ b/av1/encoder/pickcdef.c
@@ -199,10 +199,9 @@ svar = sum_s2 - ((sum_s * sum_s + 32) >> 6); dvar = sum_d2 - ((sum_d * sum_d + 32) >> 6); return (uint64_t)floor( - .5 + - (sum_d2 + sum_s2 - 2 * sum_sd) * .5 * - (svar + dvar + (400 << 2 * coeff_shift)) / - (sqrt((20000 << 4 * coeff_shift) + svar * (double)dvar))); + .5 + (sum_d2 + sum_s2 - 2 * sum_sd) * .5 * + (svar + dvar + (400 << 2 * coeff_shift)) / + (sqrt((20000 << 4 * coeff_shift) + svar * (double)dvar))); } static INLINE uint64_t mse_8x8_16bit(uint16_t *dst, int dstride, uint16_t *src,
diff --git a/av1/encoder/picklpf.c b/av1/encoder/picklpf.c index 69d67b1..f467936 100644 --- a/av1/encoder/picklpf.c +++ b/av1/encoder/picklpf.c
@@ -53,7 +53,7 @@ , int plane, int dir #endif - ) { +) { AV1_COMMON *const cm = &cpi->common; int64_t filt_err; @@ -94,7 +94,7 @@ , int plane, int dir #endif - ) { +) { const AV1_COMMON *const cm = &cpi->common; const struct loopfilter *const lf = &cm->lf; const int min_filter_level = 0;
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index 0e4b0a5..b755a18 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c
@@ -83,11 +83,15 @@ EXT_TX_SETS_INTER)] = { { // Intra - EXT_TX_SET_DCTONLY, EXT_TX_SET_DTT4_IDTX_1DDCT, EXT_TX_SET_DTT4_IDTX, + EXT_TX_SET_DCTONLY, + EXT_TX_SET_DTT4_IDTX_1DDCT, + EXT_TX_SET_DTT4_IDTX, }, { // Inter - EXT_TX_SET_DCTONLY, EXT_TX_SET_ALL16, EXT_TX_SET_DTT9_IDTX_1DDCT, + EXT_TX_SET_DCTONLY, + EXT_TX_SET_ALL16, + EXT_TX_SET_DTT9_IDTX_1DDCT, EXT_TX_SET_DCT_IDTX, }, };
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index c7b3d04..9360a32 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c
@@ -123,7 +123,9 @@ MV_REFERENCE_FRAME ref_frame[2]; } MODE_DEFINITION; -typedef struct { MV_REFERENCE_FRAME ref_frame[2]; } REF_DEFINITION; +typedef struct { + MV_REFERENCE_FRAME ref_frame[2]; +} REF_DEFINITION; struct rdcost_block_args { const AV1_COMP *cpi; @@ -435,10 +437,9 @@ const uint64_t c1 = (400 * a << 2 * coeff_shift); const uint64_t c2 = (b * 20000 * a * a << 4 * coeff_shift); - dist = - (uint64_t)floor(.5 + - (sum_d2 + sum_s2 - 2 * sum_sd) * .5 * (svar + dvar + c1) / - (sqrt(svar * (double)dvar + c2))); + dist = (uint64_t)floor(.5 + (sum_d2 + sum_s2 - 2 * sum_sd) * .5 * + (svar + dvar + c1) / + (sqrt(svar * (double)dvar + c2))); // Calibrate dist to have similar rate for the same QP with MSE only // distortion (as in master branch) @@ -1011,7 +1012,10 @@ // 1D Transforms used in inter set, this needs to be changed if // ext_tx_used_inter is changed static const int ext_tx_used_inter_1D[EXT_TX_SETS_INTER][TX_TYPES_1D] = { - { 1, 0, 0, 0 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 0, 0, 1 }, + { 1, 0, 0, 0 }, + { 1, 1, 1, 1 }, + { 1, 1, 1, 1 }, + { 1, 0, 0, 1 }, }; static void get_energy_distribution_finer(const int16_t *diff, int stride, @@ -1739,7 +1743,7 @@ #if CONFIG_DIST_8X8 && !x->using_dist_8x8 #endif - ) { + ) { // Transform domain distortion computation is more efficient as it does // not involve an inverse transform, but it is less accurate. const int buffer_length = av1_get_max_eob(tx_size); @@ -5817,7 +5821,7 @@ int_mv frame_mv[MB_MODE_COUNT][TOTAL_REFS_PER_FRAME], int this_mode, const MV_REFERENCE_FRAME ref_frames[2], const BLOCK_SIZE bsize, int mi_row, int mi_col) { - int_mv zeromv[2] = { {.as_int = 0 } }; + int_mv zeromv[2] = { { .as_int = 0 } }; int comp_pred_mode = ref_frames[1] > INTRA_FRAME; (void)mi_row; (void)mi_col; @@ -6115,7 +6119,7 @@ #else unsigned int *ref_costs_comp #endif // CONFIG_EXT_COMP_REFS - ) { +) { int seg_ref_active = segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME); if (seg_ref_active) { @@ -8880,7 +8884,7 @@ x->mv_limits = tmp_mv_limits; if (bestsme == INT_MAX) continue; mvp_full = x->best_mv.as_mv; - MV dv = {.row = mvp_full.row * 8, .col = mvp_full.col * 8 }; + MV dv = { .row = mvp_full.row * 8, .col = mvp_full.col * 8 }; if (mv_check_bounds(&x->mv_limits, &dv)) continue; if (!av1_is_dv_valid(dv, tile, mi_row, mi_col, bsize, cm->seq_params.mib_size_log2))
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c index c823a84..ff6bcd4 100644 --- a/av1/encoder/tokenize.c +++ b/av1/encoder/tokenize.c
@@ -407,10 +407,10 @@ const int ref = is_inter_block(mbmi); FRAME_CONTEXT *ec_ctx = xd->tile_ctx; aom_cdf_prob( - *const coef_head_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] = + *const coef_head_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] = ec_ctx->coef_head_cdfs[get_txsize_entropy_ctx(tx_size)][type][ref]; aom_cdf_prob( - *const coef_tail_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] = + *const coef_tail_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] = ec_ctx->coef_tail_cdfs[get_txsize_entropy_ctx(tx_size)][type][ref]; int8_t eob_val; int8_t first_val = 1;