Cleanup unused variables in AV1_COMP This CL removes static_mb_pct and unused variables related to VAR_BASED_PARTITION. BUG=aomedia:2610 Change-Id: I506671a695f7270e4689b1dca44a60459ed92336
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index d5435ee..09f7241 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c
@@ -909,7 +909,6 @@ cm->mi_params.mi_rows * cm->mi_params.mi_cols); seg->update_map = 0; seg->update_data = 0; - cpi->static_mb_pct = 0; // Disable segmentation av1_disable_segmentation(seg); @@ -923,7 +922,6 @@ cm->mi_params.mi_rows * cm->mi_params.mi_cols); seg->update_map = 0; seg->update_data = 0; - cpi->static_mb_pct = 0; // Disable segmentation and individual segment features by default av1_disable_segmentation(seg); @@ -976,7 +974,7 @@ av1_enable_segfeature(seg, 1, SEG_LVL_ALT_LF_V); // Segment coding disabled for compred testing - if (high_q || (cpi->static_mb_pct == 100)) { + if (high_q) { av1_set_segdata(seg, 1, SEG_LVL_REF_FRAME, ALTREF_FRAME); av1_enable_segfeature(seg, 1, SEG_LVL_REF_FRAME); av1_enable_segfeature(seg, 1, SEG_LVL_SKIP); @@ -1471,7 +1469,6 @@ // change includes all joint functionality av1_change_config(cpi, oxcf); - cpi->static_mb_pct = 0; cpi->ref_frame_flags = 0; // Reset resize pending flags
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index cd41b76..55430a0 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h
@@ -920,7 +920,6 @@ struct aom_codec_pkt_list *output_pkt_list; - int static_mb_pct; // % forced skip mbs by segmentation int ref_frame_flags; int ext_ref_frame_flags; @@ -1039,9 +1038,6 @@ // 4 - vbp_threshold_8x8; int64_t vbp_thresholds[5]; int64_t vbp_threshold_minmax; - int64_t vbp_threshold_sad; - int64_t vbp_threshold_copy; - BLOCK_SIZE vbp_bsize_min; int obmc_probs[FRAME_UPDATE_TYPES][BLOCK_SIZES_ALL]; int warped_probs[FRAME_UPDATE_TYPES];
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c index 9e7b264..6740670 100644 --- a/av1/encoder/var_based_part.c +++ b/av1/encoder/var_based_part.c
@@ -563,36 +563,12 @@ void av1_set_variance_partition_thresholds(AV1_COMP *cpi, int q, int content_state) { - AV1_COMMON *const cm = &cpi->common; SPEED_FEATURES *const sf = &cpi->sf; - const int is_key_frame = frame_is_intra_only(cm); if (sf->part_sf.partition_search_type != VAR_BASED_PARTITION) { return; } else { set_vbp_thresholds(cpi, cpi->vbp_thresholds, q, content_state); - // The thresholds below are not changed locally. - if (is_key_frame) { - cpi->vbp_threshold_sad = 0; - cpi->vbp_threshold_copy = 0; - cpi->vbp_bsize_min = BLOCK_8X8; - } else { - if (cm->width <= 352 && cm->height <= 288) - cpi->vbp_threshold_sad = 10; - else - cpi->vbp_threshold_sad = (cpi->dequants.y_dequant_QTX[q][1] << 1) > 1000 - ? (cpi->dequants.y_dequant_QTX[q][1] << 1) - : 1000; - cpi->vbp_bsize_min = BLOCK_16X16; - if (cm->width <= 352 && cm->height <= 288) - cpi->vbp_threshold_copy = 4000; - else if (cm->width <= 640 && cm->height <= 360) - cpi->vbp_threshold_copy = 8000; - else - cpi->vbp_threshold_copy = - (cpi->dequants.y_dequant_QTX[q][1] << 3) > 8000 - ? (cpi->dequants.y_dequant_QTX[q][1] << 3) - : 8000; - } + // The threshold below is not changed locally. cpi->vbp_threshold_minmax = 15 + (q >> 3); } } @@ -777,21 +753,6 @@ d = xd->plane[0].dst.buf; dp = xd->plane[0].dst.stride; - - // If the y_sad is very small, take 64x64 as partition and exit. - // Don't check on boosted segment for now, as 64x64 is suppressed there. -#if 0 - if (segment_id == CR_SEGMENT_ID_BASE && y_sad < cpi->vbp_threshold_sad) { - const int block_width = num_8x8_blocks_wide_lookup[BLOCK_64X64]; - const int block_height = num_8x8_blocks_high_lookup[BLOCK_64X64]; - if (mi_col + block_width / 2 < cm->mi_params.mi_cols && - mi_row + block_height / 2 < cm->mi_params.mi_rows) { - set_block_size(cpi, x, xd, mi_row, mi_col, BLOCK_128X128); - x->variance_low[0] = 1; - return 0; - } - } -#endif } else { d = AV1_VAR_OFFS; dp = 0;