Abstract use_svc to AV1_PRIMARY
Moved use_svc from AV1_COMP to AV1_PRIMARY.
Change-Id: Ia45a29fb4186c9f25ea75452c0f8a34d210a6010
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index a879aed..ed2e1e1 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -2391,7 +2391,7 @@
aom_codec_frame_flags_t flags = lib_flags << 16;
if (lib_flags & FRAMEFLAGS_KEY ||
- (cpi->use_svc &&
+ (cpi->ppi->use_svc &&
svc->layer_context[svc->spatial_layer_id * svc->number_temporal_layers +
svc->temporal_layer_id]
.is_key_frame))
@@ -2483,7 +2483,7 @@
cpi_lap->common.error.setjmp = 1;
}
- if (cpi->use_svc && cpi->svc.use_flexible_mode == 0 && flags == 0)
+ if (cpi->ppi->use_svc && cpi->svc.use_flexible_mode == 0 && flags == 0)
av1_set_svc_fixed_mode(cpi);
// Note(yunqing): While applying encoding flags, always start from enabling
@@ -2951,7 +2951,7 @@
cpi->svc.number_temporal_layers = params->number_temporal_layers;
if (cm->number_spatial_layers > 1 || cm->number_temporal_layers > 1) {
unsigned int sl, tl;
- cpi->use_svc = 1;
+ ctx->ppi->use_svc = 1;
for (sl = 0; sl < cm->number_spatial_layers; ++sl) {
for (tl = 0; tl < cm->number_temporal_layers; ++tl) {
const int layer = LAYER_IDS_TO_IDX(sl, tl, cm->number_temporal_layers);
diff --git a/av1/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c
index f3a06a9..63f99b3 100644
--- a/av1/encoder/aq_cyclicrefresh.c
+++ b/av1/encoder/aq_cyclicrefresh.c
@@ -234,15 +234,15 @@
const int avg_cnt_zeromv =
100 * cr->cnt_zeromv / (mi_params->mi_rows * mi_params->mi_cols);
- if (!cpi->use_svc ||
- (cpi->use_svc &&
+ if (!cpi->ppi->use_svc ||
+ (cpi->ppi->use_svc &&
!cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame &&
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1)) {
rc->avg_frame_low_motion =
(3 * rc->avg_frame_low_motion + avg_cnt_zeromv) / 4;
// For SVC: set avg_frame_low_motion (only computed on top spatial layer)
// to all lower spatial layers.
- if (cpi->use_svc &&
+ if (cpi->ppi->use_svc &&
svc->spatial_layer_id == svc->number_spatial_layers - 1) {
for (int i = 0; i < svc->number_spatial_layers - 1; ++i) {
const int layer = LAYER_IDS_TO_IDX(i, svc->temporal_layer_id,
diff --git a/av1/encoder/av1_noise_estimate.c b/av1/encoder/av1_noise_estimate.c
index c5c088f..33d0255 100644
--- a/av1/encoder/av1_noise_estimate.c
+++ b/av1/encoder/av1_noise_estimate.c
@@ -27,8 +27,8 @@
#if CONFIG_AV1_TEMPORAL_DENOISING
// For SVC: only do noise estimation on top spatial layer.
static INLINE int noise_est_svc(const struct AV1_COMP *const cpi) {
- return (!cpi->use_svc ||
- (cpi->use_svc &&
+ return (!cpi->ppi->use_svc ||
+ (cpi->ppi->use_svc &&
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1));
}
#endif
@@ -75,7 +75,7 @@
// Not enabled for low resolutions.
if (cpi->oxcf.pass == 0 && cpi->oxcf.rc_cfg.mode == AOM_CBR &&
cpi->oxcf.q_cfg.aq_mode == CYCLIC_REFRESH_AQ && cpi->oxcf.speed >= 5 &&
- resize_pending == 0 && !cpi->use_svc &&
+ resize_pending == 0 && !cpi->ppi->use_svc &&
cpi->oxcf.tune_cfg.content != AOM_CONTENT_SCREEN &&
cpi->common.width * cpi->common.height >= 640 * 360)
return 1;
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index a9d87d3..296acbf 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -242,7 +242,7 @@
// frame bit allocation.
if (cm->tiles.large_scale) return (LAST_FRAME - LAST_FRAME);
- if (cpi->use_svc) return av1_svc_primary_ref_frame(cpi);
+ if (cpi->ppi->use_svc) return av1_svc_primary_ref_frame(cpi);
// Find the most recent reference frame with the same reference type as the
// current frame
@@ -303,7 +303,7 @@
// Clear down mmx registers
aom_clear_system_state();
- if (cpi->use_svc && cpi->svc.spatial_layer_id > 0) {
+ if (cpi->ppi->use_svc && cpi->svc.spatial_layer_id > 0) {
cpi->framerate = cpi->svc.base_framerate;
av1_rc_update_framerate(cpi, cpi->common.width, cpi->common.height);
return;
@@ -1432,7 +1432,7 @@
cpi->droppable = is_frame_droppable(&cpi->svc, &ext_flags->refresh_frame);
}
- if (cpi->use_svc) av1_save_layer_context(cpi);
+ if (cpi->ppi->use_svc) av1_save_layer_context(cpi);
return AOM_CODEC_OK;
}
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 3d405be..203dd0a 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -562,7 +562,7 @@
cpi->td.counts = &cpi->counts;
// Set init SVC parameters.
- cpi->use_svc = 0;
+ cpi->ppi->use_svc = 0;
cpi->svc.set_ref_frame_config = 0;
cpi->svc.non_reference_frame = 0;
cpi->svc.number_spatial_layers = 1;
@@ -809,10 +809,10 @@
(cm->number_spatial_layers > 1 || cm->number_temporal_layers > 1)
? cm->number_spatial_layers * cm->number_temporal_layers - 1
: 0;
- av1_init_seq_coding_tools(cm->seq_params, cm, oxcf, cpi->use_svc);
+ av1_init_seq_coding_tools(cm->seq_params, cm, oxcf, cpi->ppi->use_svc);
}
- if (cpi->use_svc)
+ if (cpi->ppi->use_svc)
av1_update_layer_context_change_config(cpi, rc_cfg->target_bandwidth);
// restore the value of lag_in_frame for LAP stage.
@@ -2010,7 +2010,7 @@
if (cpi->oxcf.noise_sensitivity > 0 &&
!cpi->denoiser.frame_buffer_initialized) {
if (av1_denoiser_alloc(
- cm, &cpi->svc, &cpi->denoiser, cpi->use_svc,
+ cm, &cpi->svc, &cpi->denoiser, cpi->ppi->use_svc,
cpi->oxcf.noise_sensitivity, cm->width, cm->height,
cm->seq_params->subsampling_x, cm->seq_params->subsampling_y,
cm->seq_params->use_highbitdepth, AOM_BORDER_IN_PIXELS))
@@ -2308,16 +2308,17 @@
int top_index = 0, bottom_index = 0, q = 0;
YV12_BUFFER_CONFIG *unscaled = cpi->unscaled_source;
InterpFilter filter_scaler =
- cpi->use_svc ? svc->downsample_filter_type[svc->spatial_layer_id]
- : EIGHTTAP_SMOOTH;
- int phase_scaler =
- cpi->use_svc ? svc->downsample_filter_phase[svc->spatial_layer_id] : 0;
+ cpi->ppi->use_svc ? svc->downsample_filter_type[svc->spatial_layer_id]
+ : EIGHTTAP_SMOOTH;
+ int phase_scaler = cpi->ppi->use_svc
+ ? svc->downsample_filter_phase[svc->spatial_layer_id]
+ : 0;
set_size_independent_vars(cpi);
av1_setup_frame_size(cpi);
av1_set_size_dependent_vars(cpi, &q, &bottom_index, &top_index);
- if (!cpi->use_svc) {
+ if (!cpi->ppi->use_svc) {
phase_scaler = 8;
// 2:1 scaling.
if ((cm->width << 1) == unscaled->y_crop_width &&
@@ -2366,7 +2367,7 @@
}
#if CONFIG_AV1_TEMPORAL_DENOISING
- if (cpi->oxcf.noise_sensitivity > 0 && cpi->use_svc)
+ if (cpi->oxcf.noise_sensitivity > 0 && cpi->ppi->use_svc)
av1_denoiser_reset_on_first_frame(cpi);
#endif
@@ -2395,7 +2396,7 @@
// (zero_mode is forced), and since the scaled references are only
// use for newmv search, we can avoid scaling here.
if (!frame_is_intra_only(cm) &&
- !(cpi->use_svc && cpi->svc.force_zero_mode_spatial_ref))
+ !(cpi->ppi->use_svc && cpi->svc.force_zero_mode_spatial_ref))
av1_scale_references(cpi, filter_scaler, phase_scaler, 1);
av1_set_quantizer(cm, q_cfg->qm_minlevel, q_cfg->qm_maxlevel, q,
@@ -3599,7 +3600,7 @@
const uint32_t in_bit_depth = cpi->oxcf.input_cfg.input_bit_depth;
const uint32_t bit_depth = cpi->td.mb.e_mbd.bd;
- if (cpi->use_svc &&
+ if (cpi->ppi->use_svc &&
cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1)
return;
@@ -3719,7 +3720,7 @@
aom_bitstream_queue_set_frame_write(cm->current_frame.order_hint * 2 +
cm->show_frame);
#endif
- if (cpi->use_svc && cm->number_spatial_layers > 1) {
+ if (cpi->ppi->use_svc && cm->number_spatial_layers > 1) {
av1_one_pass_cbr_svc_start_layer(cpi);
}
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index a508f1b..c4d67f1 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -2173,6 +2173,11 @@
* frames in the video.
*/
SequenceHeader seq_params;
+
+ /*!
+ * Indicates whether to use SVC.
+ */
+ int use_svc;
} AV1_PRIMARY;
/*!
@@ -2687,10 +2692,6 @@
#endif
/*!
- * Indicates whether to use SVC.
- */
- int use_svc;
- /*!
* Parameters for scalable video coding.
*/
SVC svc;
@@ -3317,8 +3318,9 @@
#if CONFIG_AV1_TEMPORAL_DENOISING
static INLINE int denoise_svc(const struct AV1_COMP *const cpi) {
- return (!cpi->use_svc || (cpi->use_svc && cpi->svc.spatial_layer_id >=
- cpi->svc.first_layer_denoise));
+ return (!cpi->ppi->use_svc ||
+ (cpi->ppi->use_svc &&
+ cpi->svc.spatial_layer_id >= cpi->svc.first_layer_denoise));
}
#endif
diff --git a/av1/encoder/encoder_alloc.h b/av1/encoder/encoder_alloc.h
index 76454ba..6a5e6ab 100644
--- a/av1/encoder/encoder_alloc.h
+++ b/av1/encoder/encoder_alloc.h
@@ -285,7 +285,7 @@
cpi->film_grain_table = NULL;
}
- if (cpi->use_svc) av1_free_svc_cyclic_refresh(cpi);
+ if (cpi->ppi->use_svc) av1_free_svc_cyclic_refresh(cpi);
if (cpi->consec_zero_mv) {
aom_free(cpi->consec_zero_mv);
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index 283a09d..e4ffca2 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -1741,7 +1741,8 @@
const int is_small_sb = (cm->seq_params->sb_size == BLOCK_64X64);
// For SVC the usage of alt_ref is determined by the ref_frame_flags.
- int use_alt_ref_frame = cpi->use_svc || cpi->sf.rt_sf.use_nonrd_altref_frame;
+ int use_alt_ref_frame =
+ cpi->ppi->use_svc || cpi->sf.rt_sf.use_nonrd_altref_frame;
int use_golden_ref_frame = 1;
use_ref_frame[LAST_FRAME] = 1; // we never skip LAST
@@ -1855,8 +1856,8 @@
// Adjust thresholds to make intra mode likely tested if the other
// references (golden, alt) are skipped/not checked. For now always
// adjust for svc mode.
- if (cpi->use_svc || (cpi->sf.rt_sf.use_nonrd_altref_frame == 0 &&
- cpi->sf.rt_sf.nonrd_prune_ref_frame_search > 0)) {
+ if (cpi->ppi->use_svc || (cpi->sf.rt_sf.use_nonrd_altref_frame == 0 &&
+ cpi->sf.rt_sf.nonrd_prune_ref_frame_search > 0)) {
spatial_var_thresh = 150;
motion_thresh = 0;
}
@@ -2187,7 +2188,7 @@
// to source, so use subpel motion vector to compensate. The nonzero motion
// is half pixel shifted to left and top, so (-4, -4). This has more effect
// on higher resolutins, so condition it on that for now.
- if (cpi->use_svc && svc->spatial_layer_id > 0 &&
+ if (cpi->ppi->use_svc && svc->spatial_layer_id > 0 &&
svc->downsample_filter_phase[svc->spatial_layer_id - 1] == 8 &&
cm->width * cm->height > 640 * 480) {
svc_mv_col = -4;
@@ -2268,7 +2269,7 @@
if (!use_ref_frame_mask[ref_frame]) continue;
force_mv_inter_layer = 0;
- if (cpi->use_svc && svc->spatial_layer_id > 0 &&
+ if (cpi->ppi->use_svc && svc->spatial_layer_id > 0 &&
((ref_frame == LAST_FRAME && svc->skip_mvsearch_last) ||
(ref_frame == GOLDEN_FRAME && svc->skip_mvsearch_gf))) {
// Only test mode if NEARESTMV/NEARMV is (svc_mv_col, svc_mv_row),
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index c96db5b..da46762 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -436,8 +436,8 @@
if (!dry_run) {
if (cpi->oxcf.pass == 0 && cpi->svc.temporal_layer_id == 0 &&
cpi->sf.rt_sf.use_temporal_noise_estimate &&
- (!cpi->use_svc ||
- (cpi->use_svc &&
+ (!cpi->ppi->use_svc ||
+ (cpi->ppi->use_svc &&
!cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame &&
cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1)))
update_zeromv_cnt(cpi, mbmi, mi_row, mi_col, bsize);
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c
index 3779fff..720aed4 100644
--- a/av1/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -258,7 +258,8 @@
rc->bits_off_target = AOMMIN(rc->bits_off_target, p_rc->maximum_buffer_size);
rc->buffer_level = rc->bits_off_target;
- if (cpi->use_svc) update_layer_buffer_level(&cpi->svc, encoded_frame_size);
+ if (cpi->ppi->use_svc)
+ update_layer_buffer_level(&cpi->svc, encoded_frame_size);
}
int av1_rc_get_default_min_gf_interval(int width, int height,
@@ -415,7 +416,7 @@
(cm->width != cm->prev_frame->width ||
cm->height != cm->prev_frame->height || change_avg_frame_bandwidth);
// Apply some control/clamp to QP under certain conditions.
- if (cm->current_frame.frame_type != KEY_FRAME && !cpi->use_svc &&
+ if (cm->current_frame.frame_type != KEY_FRAME && !cpi->ppi->use_svc &&
rc->frames_since_key > 1 && !change_target_bits_mb &&
(!cpi->oxcf.rc_cfg.gf_cbr_boost_pct ||
!(refresh_frame_flags->alt_ref_frame ||
@@ -505,7 +506,7 @@
} else {
if ((refresh_frame_flags->alt_ref_frame ||
refresh_frame_flags->golden_frame) &&
- !rc->is_src_frame_alt_ref && !cpi->use_svc &&
+ !rc->is_src_frame_alt_ref && !cpi->ppi->use_svc &&
(cpi->oxcf.rc_cfg.mode != AOM_CBR ||
cpi->oxcf.rc_cfg.gf_cbr_boost_pct > 20))
rcf = rc->rate_correction_factors[GF_ARF_STD];
@@ -550,7 +551,7 @@
} else {
if ((refresh_frame_flags->alt_ref_frame ||
refresh_frame_flags->golden_frame) &&
- !rc->is_src_frame_alt_ref && !cpi->use_svc &&
+ !rc->is_src_frame_alt_ref && !cpi->ppi->use_svc &&
(cpi->oxcf.rc_cfg.mode != AOM_CBR ||
cpi->oxcf.rc_cfg.gf_cbr_boost_pct > 20))
rc->rate_correction_factors[GF_ARF_STD] = factor;
@@ -892,7 +893,7 @@
active_best_quality +=
av1_compute_qdelta(rc, q_val, q_val * q_adj_factor, bit_depth);
}
- } else if (!rc->is_src_frame_alt_ref && !cpi->use_svc &&
+ } else if (!rc->is_src_frame_alt_ref && !cpi->ppi->use_svc &&
cpi->oxcf.rc_cfg.gf_cbr_boost_pct &&
(refresh_frame_flags->golden_frame ||
refresh_frame_flags->alt_ref_frame)) {
@@ -1810,7 +1811,7 @@
rc->avg_frame_qindex[KEY_FRAME] =
ROUND_POWER_OF_TWO(3 * rc->avg_frame_qindex[KEY_FRAME] + qindex, 2);
} else {
- if ((cpi->use_svc && cpi->oxcf.rc_cfg.mode == AOM_CBR) ||
+ if ((cpi->ppi->use_svc && cpi->oxcf.rc_cfg.mode == AOM_CBR) ||
(!rc->is_src_frame_alt_ref &&
!(refresh_frame_flags->golden_frame || is_intrnl_arf ||
refresh_frame_flags->alt_ref_frame))) {
@@ -2133,7 +2134,7 @@
} else {
target = rc->avg_frame_bandwidth;
}
- if (cpi->use_svc) {
+ if (cpi->ppi->use_svc) {
// Note that for layers, avg_frame_bandwidth is the cumulative
// per-frame-bandwidth. For the target size of this frame, use the
// layer average frame size (i.e., non-cumulative per-frame-bw).
@@ -2408,7 +2409,7 @@
cpi->gf_frame_index = 0;
// SVC does not use GF as periodic boost.
// TODO(marpan): Find better way to disable this for SVC.
- if (cpi->use_svc) {
+ if (cpi->ppi->use_svc) {
SVC *const svc = &cpi->svc;
p_rc->baseline_gf_interval = MAX_STATIC_GF_GROUP_LENGTH - 1;
p_rc->gfu_boost = 1;
@@ -2600,13 +2601,13 @@
svc->number_temporal_layers);
// Turn this on to explicitly set the reference structure rather than
// relying on internal/default structure.
- if (cpi->use_svc) {
+ if (cpi->ppi->use_svc) {
av1_update_temporal_layer_framerate(cpi);
av1_restore_layer_context(cpi);
}
// Set frame type.
- if ((!cpi->use_svc && rc->frames_to_key == 0) ||
- (cpi->use_svc && svc->spatial_layer_id == 0 &&
+ if ((!cpi->ppi->use_svc && rc->frames_to_key == 0) ||
+ (cpi->ppi->use_svc && svc->spatial_layer_id == 0 &&
(cpi->oxcf.kf_cfg.key_freq_max == 0 ||
svc->current_superframe % cpi->oxcf.kf_cfg.key_freq_max == 0)) ||
(frame_flags & FRAMEFLAGS_KEY)) {
@@ -2618,7 +2619,7 @@
gf_group->update_type[cpi->gf_frame_index] = KF_UPDATE;
gf_group->frame_type[cpi->gf_frame_index] = KEY_FRAME;
gf_group->refbuf_state[cpi->gf_frame_index] = REFBUF_RESET;
- if (cpi->use_svc) {
+ if (cpi->ppi->use_svc) {
if (cm->current_frame.frame_number > 0)
av1_svc_reset_temporal_layers(cpi, 1);
svc->layer_context[layer].is_key_frame = 1;
@@ -2628,7 +2629,7 @@
gf_group->update_type[cpi->gf_frame_index] = LF_UPDATE;
gf_group->frame_type[cpi->gf_frame_index] = INTER_FRAME;
gf_group->refbuf_state[cpi->gf_frame_index] = REFBUF_UPDATE;
- if (cpi->use_svc) {
+ if (cpi->ppi->use_svc) {
LAYER_CONTEXT *lc = &svc->layer_context[layer];
lc->is_key_frame =
svc->spatial_layer_id == 0
@@ -2637,7 +2638,7 @@
}
}
// Check for scene change, for non-SVC for now.
- if (!cpi->use_svc && cpi->sf.rt_sf.check_scene_detection)
+ if (!cpi->ppi->use_svc && cpi->sf.rt_sf.check_scene_detection)
rc_scene_detection_onepass_rt(cpi);
// Check for dynamic resize, for single spatial layer for now.
// For temporal layers only check on base temporal layer.
@@ -2688,7 +2689,7 @@
// For fixed mode SVC: if KSVC is enabled remove inter layer
// prediction on spatial enhancement layer frames for frames
// whose base is not KEY frame.
- if (cpi->use_svc && !svc->use_flexible_mode && svc->ksvc_fixed_mode &&
+ if (cpi->ppi->use_svc && !svc->use_flexible_mode && svc->ksvc_fixed_mode &&
svc->number_spatial_layers > 1 &&
!svc->layer_context[layer].is_key_frame) {
ExternalFlags *const ext_flags = &cpi->ext_flags;
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 9bdcb0e..cdbca93 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -1146,7 +1146,7 @@
#endif
}
} else {
- if (speed == 8 && !cpi->use_svc) {
+ if (speed == 8 && !cpi->ppi->use_svc) {
sf->rt_sf.short_circuit_low_temp_var = 0;
sf->rt_sf.use_nonrd_altref_frame = 1;
}
@@ -1443,7 +1443,7 @@
// TODO(marpan): Look into why enabling skip_loopfilter_non_reference is
// not bitexact on rtc testset, its very close (< ~0.01 bdrate), but not
// always bitexact.
- if (cpi->use_svc && cpi->svc.non_reference_frame &&
+ if (cpi->ppi->use_svc && cpi->svc.non_reference_frame &&
sf->lpf_sf.cdef_pick_method == CDEF_PICK_FROM_Q &&
sf->lpf_sf.lpf_pick == LPF_PICK_FROM_Q)
sf->rt_sf.skip_loopfilter_non_reference = 1;
diff --git a/av1/encoder/superres_scale.c b/av1/encoder/superres_scale.c
index f0e9e9c..283faab 100644
--- a/av1/encoder/superres_scale.c
+++ b/av1/encoder/superres_scale.c
@@ -346,7 +346,7 @@
size_params_type rsz = { frm_dim_cfg->width, frm_dim_cfg->height,
SCALE_NUMERATOR };
int resize_denom = SCALE_NUMERATOR;
- if (has_no_stats_stage(cpi) && cpi->use_svc &&
+ if (has_no_stats_stage(cpi) && cpi->ppi->use_svc &&
cpi->svc.spatial_layer_id < cpi->svc.number_spatial_layers - 1) {
rsz.resize_width = cpi->common.width;
rsz.resize_height = cpi->common.height;
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c
index bf41fcd..497faef 100644
--- a/av1/encoder/var_based_part.c
+++ b/av1/encoder/var_based_part.c
@@ -808,7 +808,7 @@
// For non-SVC GOLDEN is another temporal reference. Check if it should be
// used as reference for partitioning.
- if (!cpi->use_svc && (cpi->ref_frame_flags & AOM_GOLD_FLAG) &&
+ if (!cpi->ppi->use_svc && (cpi->ref_frame_flags & AOM_GOLD_FLAG) &&
cpi->sf.rt_sf.use_nonrd_pick_mode) {
yv12_g = get_ref_frame_yv12_buf(cm, GOLDEN_FRAME);
if (yv12_g && yv12_g != yv12) {
@@ -894,7 +894,7 @@
int is_key_frame =
(frame_is_intra_only(cm) ||
- (cpi->use_svc &&
+ (cpi->ppi->use_svc &&
cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame));
assert(cm->seq_params->sb_size == BLOCK_64X64 ||
@@ -1052,7 +1052,7 @@
if (!is_key_frame &&
(max_var_32x32[m] - min_var_32x32[m]) > 3 * (thresholds[1] >> 3) &&
max_var_32x32[m] > thresholds[1] >> 1 &&
- (noise_level >= kMedium || cpi->use_svc ||
+ (noise_level >= kMedium || cpi->ppi->use_svc ||
cpi->sf.rt_sf.force_large_partition_blocks ||
!cpi->sf.rt_sf.use_nonrd_pick_mode)) {
force_split[1 + m] = 1;