Merge "cosmetics: Beautify whitespaces and line wrapping"
This commit is contained in:
@@ -1327,8 +1327,7 @@ static int set_segment_rdmult(VP9_COMP *const cpi,
|
||||
VP9_COMMON *const cm = &cpi->common;
|
||||
vp9_init_plane_quantizers(cpi, x);
|
||||
vpx_clear_system_state();
|
||||
segment_qindex = vp9_get_qindex(&cm->seg, segment_id,
|
||||
cm->base_qindex);
|
||||
segment_qindex = vp9_get_qindex(&cm->seg, segment_id, cm->base_qindex);
|
||||
return vp9_compute_rd_mult(cpi, segment_qindex + cm->y_dc_delta_q);
|
||||
}
|
||||
|
||||
@@ -2727,6 +2726,7 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (skip) {
|
||||
if (src_diff_var == UINT_MAX) {
|
||||
set_offsets(cpi, tile_info, x, mi_row, mi_col, bsize);
|
||||
@@ -2761,6 +2761,7 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
|
||||
ctx->mic.interp_filter;
|
||||
rd_pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &sum_rdc, subsize,
|
||||
pc_tree->leaf_split[0], best_rdc.rdcost);
|
||||
|
||||
if (sum_rdc.rate == INT_MAX)
|
||||
sum_rdc.rdcost = INT64_MAX;
|
||||
} else {
|
||||
@@ -2870,6 +2871,7 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
|
||||
}
|
||||
restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
|
||||
}
|
||||
|
||||
// PARTITION_VERT
|
||||
if (partition_vert_allowed &&
|
||||
(do_rect || vp9_active_v_edge(cpi, mi_col, mi_step))) {
|
||||
@@ -2952,6 +2954,8 @@ static void encode_rd_sb_row(VP9_COMP *cpi,
|
||||
MACROBLOCK *const x = &td->mb;
|
||||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
SPEED_FEATURES *const sf = &cpi->sf;
|
||||
const int mi_col_start = tile_info->mi_col_start;
|
||||
const int mi_col_end = tile_info->mi_col_end;
|
||||
int mi_col;
|
||||
|
||||
// Initialize the left context for the new SB row
|
||||
@@ -2959,8 +2963,7 @@ static void encode_rd_sb_row(VP9_COMP *cpi,
|
||||
memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
|
||||
// Code each SB in the row
|
||||
for (mi_col = tile_info->mi_col_start; mi_col < tile_info->mi_col_end;
|
||||
mi_col += MI_BLOCK_SIZE) {
|
||||
for (mi_col = mi_col_start; mi_col < mi_col_end; mi_col += MI_BLOCK_SIZE) {
|
||||
const struct segmentation *const seg = &cm->seg;
|
||||
int dummy_rate;
|
||||
int64_t dummy_dist;
|
||||
@@ -3760,6 +3763,8 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
|
||||
TileInfo *const tile_info = &tile_data->tile_info;
|
||||
MACROBLOCK *const x = &td->mb;
|
||||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
const int mi_col_start = tile_info->mi_col_start;
|
||||
const int mi_col_end = tile_info->mi_col_end;
|
||||
int mi_col;
|
||||
|
||||
// Initialize the left context for the new SB row
|
||||
@@ -3767,8 +3772,7 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
|
||||
memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
|
||||
// Code each SB in the row
|
||||
for (mi_col = tile_info->mi_col_start; mi_col < tile_info->mi_col_end;
|
||||
mi_col += MI_BLOCK_SIZE) {
|
||||
for (mi_col = mi_col_start; mi_col < mi_col_end; mi_col += MI_BLOCK_SIZE) {
|
||||
const struct segmentation *const seg = &cm->seg;
|
||||
RD_COST dummy_rdc;
|
||||
const int idx_str = cm->mi_stride * mi_row + mi_col;
|
||||
@@ -3979,8 +3983,7 @@ static int get_skip_encode_frame(const VP9_COMMON *cm, ThreadData *const td) {
|
||||
}
|
||||
|
||||
return (intra_count << 2) < inter_count &&
|
||||
cm->frame_type != KEY_FRAME &&
|
||||
cm->show_frame;
|
||||
cm->frame_type != KEY_FRAME && cm->show_frame;
|
||||
}
|
||||
|
||||
void vp9_init_tile_data(VP9_COMP *cpi) {
|
||||
@@ -4033,14 +4036,15 @@ void vp9_encode_tile(VP9_COMP *cpi, ThreadData *td,
|
||||
&cpi->tile_data[tile_row * tile_cols + tile_col];
|
||||
const TileInfo * const tile_info = &this_tile->tile_info;
|
||||
TOKENEXTRA *tok = cpi->tile_tok[tile_row][tile_col];
|
||||
const int mi_row_start = tile_info->mi_row_start;
|
||||
const int mi_row_end = tile_info->mi_row_end;
|
||||
int mi_row;
|
||||
|
||||
// Set up pointers to per thread motion search counters.
|
||||
td->mb.m_search_count_ptr = &td->rd_counts.m_search_count;
|
||||
td->mb.ex_search_count_ptr = &td->rd_counts.ex_search_count;
|
||||
|
||||
for (mi_row = tile_info->mi_row_start; mi_row < tile_info->mi_row_end;
|
||||
mi_row += MI_BLOCK_SIZE) {
|
||||
for (mi_row = mi_row_start; mi_row < mi_row_end; mi_row += MI_BLOCK_SIZE) {
|
||||
if (cpi->sf.use_nonrd_pick_mode)
|
||||
encode_nonrd_sb_row(cpi, td, this_tile, mi_row, &tok);
|
||||
else
|
||||
@@ -4488,8 +4492,8 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
|
||||
} else {
|
||||
mi->tx_size = (bsize >= BLOCK_8X8) ? mi->tx_size : TX_4X4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
++td->counts->tx.tx_totals[mi->tx_size];
|
||||
++td->counts->tx.tx_totals[get_uv_tx_size(mi, &xd->plane[1])];
|
||||
if (cm->seg.enabled && cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
|
||||
|
@@ -135,12 +135,17 @@ static INLINE void Scale2Ratio(VPX_SCALING mode, int *hr, int *hs) {
|
||||
// so memset cannot be used, instead only inactive blocks should be reset.
|
||||
static void suppress_active_map(VP9_COMP *cpi) {
|
||||
unsigned char *const seg_map = cpi->segmentation_map;
|
||||
|
||||
if (cpi->active_map.enabled || cpi->active_map.update) {
|
||||
const int rows = cpi->common.mi_rows;
|
||||
const int cols = cpi->common.mi_cols;
|
||||
int i;
|
||||
if (cpi->active_map.enabled || cpi->active_map.update)
|
||||
for (i = 0; i < cpi->common.mi_rows * cpi->common.mi_cols; ++i)
|
||||
|
||||
for (i = 0; i < rows * cols; ++i)
|
||||
if (seg_map[i] == AM_SEGMENT_ID_INACTIVE)
|
||||
seg_map[i] = AM_SEGMENT_ID_ACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
static void apply_active_map(VP9_COMP *cpi) {
|
||||
struct segmentation *const seg = &cpi->common.seg;
|
||||
|
@@ -477,7 +477,6 @@ typedef struct VP9_COMP {
|
||||
|
||||
YV12_BUFFER_CONFIG alt_ref_buffer;
|
||||
|
||||
|
||||
#if CONFIG_INTERNAL_STATS
|
||||
unsigned int mode_chosen_counts[MAX_MODES];
|
||||
|
||||
|
@@ -349,6 +349,7 @@ static void model_rd_norm(int xsq_q10, int *r_q10, int *d_q10) {
|
||||
38, 28, 21, 16, 12, 10, 8, 6,
|
||||
5, 3, 2, 1, 1, 1, 0, 0,
|
||||
};
|
||||
|
||||
// Normalized distortion:
|
||||
// This table models the normalized distortion for a Laplacian source
|
||||
// with given variance when quantized with a uniform quantizer
|
||||
|
@@ -3400,9 +3400,10 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
|
||||
rate2 += skip_cost0;
|
||||
} else {
|
||||
// FIXME(rbultje) make this work for splitmv also
|
||||
assert(total_sse >= 0);
|
||||
|
||||
rate2 += skip_cost1;
|
||||
distortion2 = total_sse;
|
||||
assert(total_sse >= 0);
|
||||
rate2 -= (rate_y + rate_uv);
|
||||
this_skip2 = 1;
|
||||
}
|
||||
|
@@ -433,9 +433,8 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
|
||||
vp9_highbd_temporal_filter_apply_c(f->u_buffer + mb_uv_offset,
|
||||
f->uv_stride, predictor + 256,
|
||||
mb_uv_width, mb_uv_height,
|
||||
adj_strength,
|
||||
filter_weight, accumulator + 256,
|
||||
count + 256);
|
||||
adj_strength, filter_weight,
|
||||
accumulator + 256, count + 256);
|
||||
vp9_highbd_temporal_filter_apply_c(f->v_buffer + mb_uv_offset,
|
||||
f->uv_stride, predictor + 512,
|
||||
mb_uv_width, mb_uv_height,
|
||||
|
Reference in New Issue
Block a user