Commit 24e2b4c0 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Merge branch 'master' into nextgenv2

parents d7c8bc77 f7009507
......@@ -843,7 +843,8 @@ static int choose_partitioning(VP9_COMP *cpi,
force_split[split_index] = 1;
force_split[i + 1] = 1;
force_split[0] = 1;
} else if (vt.split[i].split[j].part_variances.none.variance >
} else if (cpi->oxcf.speed < 8 &&
vt.split[i].split[j].part_variances.none.variance >
thresholds[1] &&
!cyclic_refresh_segment_id_boosted(segment_id)) {
// We have some nominal amount of 16x16 variance (based on average),
......@@ -2422,8 +2423,15 @@ static void rd_pick_partition(VP9_COMP *cpi, ThreadData *td,
if (cpi->sf.use_square_partition_only &&
bsize > cpi->sf.use_square_only_threshold) {
if (cpi->use_svc) {
if (!vp9_active_h_edge(cpi, mi_row, mi_step) || x->e_mbd.lossless)
partition_horz_allowed &= force_horz_split;
if (!vp9_active_v_edge(cpi, mi_row, mi_step) || x->e_mbd.lossless)
partition_vert_allowed &= force_vert_split;
} else {
partition_horz_allowed &= force_horz_split;
partition_vert_allowed &= force_vert_split;
}
}
save_context(x, mi_row, mi_col, a, l, sa, sl, bsize);
......
......@@ -3682,12 +3682,16 @@ YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
cm->mi_rows * MI_SIZE != unscaled->y_height) {
#if CONFIG_VP9_HIGHBITDEPTH
if (use_normative_scaler)
if (use_normative_scaler &&
unscaled->y_width <= (scaled->y_width << 1) &&
unscaled->y_height <= (scaled->y_height << 1))
scale_and_extend_frame(unscaled, scaled, (int)cm->bit_depth);
else
scale_and_extend_frame_nonnormative(unscaled, scaled, (int)cm->bit_depth);
#else
if (use_normative_scaler)
if (use_normative_scaler &&
unscaled->y_width <= (scaled->y_width << 1) &&
unscaled->y_height <= (scaled->y_height << 1))
scale_and_extend_frame(unscaled, scaled);
else
scale_and_extend_frame_nonnormative(unscaled, scaled);
......
......@@ -279,7 +279,7 @@ void vp9_restore_layer_context(VP9_COMP *const cpi) {
// Reset the frames_since_key and frames_to_key counters to their values
// before the layer restore. Keep these defined for the stream (not layer).
if (cpi->svc.number_temporal_layers > 1 ||
cpi->svc.number_spatial_layers > 1) {
(cpi->svc.number_spatial_layers > 1 && !is_two_pass_svc(cpi))) {
cpi->rc.frames_since_key = old_frame_since_key;
cpi->rc.frames_to_key = old_frame_to_key;
}
......
......@@ -423,13 +423,15 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
svc_ctx->temporal_layers = 2;
}
for (sl = 0; sl < VPX_SS_MAX_LAYERS; ++sl) {
si->svc_params.scaling_factor_num[sl] = DEFAULT_SCALE_FACTORS_NUM[sl];
si->svc_params.scaling_factor_den[sl] = DEFAULT_SCALE_FACTORS_DEN[sl];
}
for (tl = 0; tl < svc_ctx->temporal_layers; ++tl) {
for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) {
i = sl * svc_ctx->temporal_layers + tl;
si->svc_params.max_quantizers[i] = MAX_QUANTIZER;
si->svc_params.min_quantizers[i] = 0;
si->svc_params.scaling_factor_num[sl] = DEFAULT_SCALE_FACTORS_NUM[sl];
si->svc_params.scaling_factor_den[sl] = DEFAULT_SCALE_FACTORS_DEN[sl];
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment