Commit 929001bf authored by Minghai Shang's avatar Minghai Shang

[spatial svc]Fix reference issues

1. Remove last reference flag for first frame upper layers in one pass mode.
2. Disable refresh golden frame flag for key frames.

Change-Id: I44ac1bd2c795169e4fbfdd078ea79a1d33a204d6
parent 5dcb2e32
......@@ -131,7 +131,8 @@ static void setup_frame(VP9_COMP *cpi) {
}
if (cm->frame_type == KEY_FRAME) {
cpi->refresh_golden_frame = 1;
if (!(cpi->use_svc && cpi->svc.number_temporal_layers == 1))
cpi->refresh_golden_frame = 1;
cpi->refresh_alt_ref_frame = 1;
} else {
cm->fc = cm->frame_contexts[cm->frame_context_idx];
......@@ -2001,7 +2002,8 @@ static void get_ref_frame_flags(VP9_COMP *cpi) {
if (cpi->gold_is_last)
cpi->ref_frame_flags &= ~VP9_GOLD_FLAG;
if (cpi->rc.frames_till_gf_update_due == INT_MAX)
if (cpi->rc.frames_till_gf_update_due == INT_MAX &&
!(cpi->use_svc && cpi->svc.number_temporal_layers == 1))
cpi->ref_frame_flags &= ~VP9_GOLD_FLAG;
if (cpi->alt_is_last)
......
......@@ -1238,6 +1238,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
if (cpi->use_svc && cpi->svc.number_temporal_layers == 1) {
cpi->svc.layer_context[cpi->svc.spatial_layer_id].is_key_frame = 1;
cpi->ref_frame_flags &= (~VP9_ALT_FLAG);
}
if (cpi->pass == 0 && cpi->oxcf.rc_mode == VPX_CBR) {
......@@ -1252,7 +1253,10 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
lc->is_key_frame = 0;
} else {
lc->is_key_frame = cpi->svc.layer_context[0].is_key_frame;
if (lc->is_key_frame)
cpi->ref_frame_flags &= (~VP9_LAST_FLAG);
}
cpi->ref_frame_flags &= (~VP9_ALT_FLAG);
}
if (cpi->pass == 0 && cpi->oxcf.rc_mode == VPX_CBR) {
......
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