void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) { SPEED_FEATURES *const sf = &cpi->sf; const VP9EncoderConfig *const oxcf = &cpi->oxcf; RD_OPT *const rd = &cpi->rd; int i; if (oxcf->mode == REALTIME) { set_rt_speed_feature_framesize_dependent(cpi, sf, oxcf->speed); } else if (oxcf->mode == GOOD) { set_good_speed_feature_framesize_dependent(cpi, sf, oxcf->speed); } if (sf->disable_split_mask == DISABLE_ALL_SPLIT) { sf->adaptive_pred_interp_filter = 0; } if (cpi->encode_breakout && oxcf->mode == REALTIME && sf->encode_breakout_thresh > cpi->encode_breakout) { cpi->encode_breakout = sf->encode_breakout_thresh; } // Check for masked out split cases. for (i = 0; i < MAX_REFS; ++i) { if (sf->disable_split_mask & (1 << i)) { rd->thresh_mult_sub8x8[i] = INT_MAX; } } }
void av1_set_speed_features_framesize_dependent(AV1_COMP *cpi) { SPEED_FEATURES *const sf = &cpi->sf; const AV1EncoderConfig *const oxcf = &cpi->oxcf; AV1_COMMON *const cm = &cpi->common; RD_OPT *const rd = &cpi->rd; int i; // Limit memory usage for high resolutions #if CONFIG_EXT_REFS // TODO(zoeliu): Temporary solution to resolve the insufficient RAM issue for // ext-refs. Need to work with @yunqingwang to have a more // effective solution. if (AOMMIN(cm->width, cm->height) > 720) { // Turn off the use of upsampled references for HD resolution sf->use_upsampled_references = 0; } else if ((AOMMIN(cm->width, cm->height) > 540) && (oxcf->profile != PROFILE_0)) { sf->use_upsampled_references = 0; } #else if (AOMMIN(cm->width, cm->height) > 1080) { sf->use_upsampled_references = 0; } else if ((AOMMIN(cm->width, cm->height) > 720) && (oxcf->profile != PROFILE_0)) { sf->use_upsampled_references = 0; } #endif // CONFIG_EXT_REFS if (oxcf->mode == GOOD) { set_good_speed_feature_framesize_dependent(cpi, sf, oxcf->speed); } if (sf->disable_split_mask == DISABLE_ALL_SPLIT) { sf->adaptive_pred_interp_filter = 0; } // Check for masked out split cases. for (i = 0; i < MAX_REFS; ++i) { if (sf->disable_split_mask & (1 << i)) { rd->thresh_mult_sub8x8[i] = INT_MAX; } } // This is only used in motion vector unit test. if (cpi->oxcf.motion_vector_unit_test == 1) cpi->find_fractional_mv_step = av1_return_max_sub_pixel_mv; else if (cpi->oxcf.motion_vector_unit_test == 2) cpi->find_fractional_mv_step = av1_return_min_sub_pixel_mv; }