summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c2
-rw-r--r--vp9/encoder/vp9_pickmode.c2
-rw-r--r--vp9/encoder/vp9_ratectrl.c8
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c44
-rw-r--r--vp9/encoder/vp9_svc_layercontext.h6
5 files changed, 31 insertions, 31 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index cfc087637..cfa832207 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1318,7 +1318,7 @@ static int choose_partitioning(VP9_COMP *cpi, const TileInfo *const tile,
assert(yv12 != NULL);
if (!(is_one_pass_cbr_svc(cpi) && cpi->svc.spatial_layer_id) ||
- cpi->svc.use_longterm_ref_current_layer) {
+ cpi->svc.use_gf_temporal_ref_current_layer) {
// For now, GOLDEN will not be used for non-zero spatial layers, since
// it may not be a temporal reference.
yv12_g = get_ref_frame_buffer(cpi, GOLDEN_FRAME);
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 66810ae97..f97d18333 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1540,7 +1540,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
thresh_svc_skip_golden = 1000;
if (!cpi->use_svc ||
- (svc->use_longterm_ref_current_layer &&
+ (svc->use_gf_temporal_ref_current_layer &&
!svc->layer_context[svc->temporal_layer_id].is_key_frame))
gf_is_longterm_ref = 1;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index e3d1b3713..4b30ca7a8 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1599,7 +1599,7 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
// If second (long term) temporal reference is used for SVC,
// update the golden frame counter, only for base temporal layer.
- if (cpi->use_svc && cpi->svc.use_longterm_ref_current_layer &&
+ if (cpi->use_svc && cpi->svc.use_gf_temporal_ref_current_layer &&
cpi->svc.temporal_layer_id == 0) {
if (cpi->refresh_golden_frame)
rc->frames_since_golden = 0;
@@ -1875,7 +1875,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
// If long term termporal feature is enabled, set the period of the update.
// The update/refresh of this reference frame is always on base temporal
// layer frame.
- if (svc->use_longterm_ref_current_layer && svc->temporal_layer_id == 0) {
+ if (svc->use_gf_temporal_ref_current_layer && svc->temporal_layer_id == 0) {
if (svc->layer_context[svc->temporal_layer_id].is_key_frame) {
// On key frame we update the buffer index used for long term reference.
// Use the alt_ref since it is not used or updated on key frames.
@@ -1883,7 +1883,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
cpi->ext_refresh_alt_ref_frame = 1;
if (svc->number_spatial_layers == 3) index = svc->spatial_layer_id - 1;
assert(index >= 0);
- cpi->alt_fb_idx = svc->buffer_longterm_ref[index].idx;
+ cpi->alt_fb_idx = svc->buffer_gf_temporal_ref[index].idx;
} else if (rc->frames_till_gf_update_due == 0) {
// Set perdiod of next update. Make it a multiple of 10, as the cyclic
// refresh is typically ~10%, and we'd like the update to happen after
@@ -1895,7 +1895,7 @@ void vp9_rc_get_svc_params(VP9_COMP *cpi) {
cpi->ext_refresh_golden_frame = 1;
rc->gfu_boost = DEFAULT_GF_BOOST;
}
- } else if (!svc->use_longterm_ref) {
+ } else if (!svc->use_gf_temporal_ref) {
rc->frames_till_gf_update_due = INT_MAX;
rc->baseline_gf_interval = INT_MAX;
}
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index c606125b2..ed65463c2 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -33,8 +33,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
svc->force_zero_mode_spatial_ref = 0;
svc->use_base_mv = 0;
svc->use_partition_reuse = 0;
- svc->use_longterm_ref = 1;
- svc->use_longterm_ref_current_layer = 0;
+ svc->use_gf_temporal_ref = 1;
+ svc->use_gf_temporal_ref_current_layer = 0;
svc->scaled_temp_is_alloc = 0;
svc->scaled_one_half = 0;
svc->current_superframe = 0;
@@ -62,10 +62,10 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
}
svc->max_consec_drop = INT_MAX;
- svc->buffer_longterm_ref[1].idx = 7;
- svc->buffer_longterm_ref[0].idx = 6;
- svc->buffer_longterm_ref[1].is_used = 0;
- svc->buffer_longterm_ref[0].is_used = 0;
+ svc->buffer_gf_temporal_ref[1].idx = 7;
+ svc->buffer_gf_temporal_ref[0].idx = 6;
+ svc->buffer_gf_temporal_ref[1].is_used = 0;
+ svc->buffer_gf_temporal_ref[0].is_used = 0;
if (cpi->oxcf.error_resilient_mode == 0 && cpi->oxcf.pass == 2) {
if (vpx_realloc_frame_buffer(&cpi->svc.empty_frame.img, SMALL_FRAME_WIDTH,
@@ -716,40 +716,40 @@ int vp9_one_pass_cbr_svc_start_layer(VP9_COMP *const cpi) {
}
}
- if (cpi->lst_fb_idx == svc->buffer_longterm_ref[0].idx ||
- cpi->gld_fb_idx == svc->buffer_longterm_ref[0].idx ||
- cpi->alt_fb_idx == svc->buffer_longterm_ref[0].idx)
- svc->buffer_longterm_ref[0].is_used = 1;
- if (cpi->lst_fb_idx == svc->buffer_longterm_ref[1].idx ||
- cpi->gld_fb_idx == svc->buffer_longterm_ref[1].idx ||
- cpi->alt_fb_idx == svc->buffer_longterm_ref[1].idx)
- svc->buffer_longterm_ref[1].is_used = 1;
+ if (cpi->lst_fb_idx == svc->buffer_gf_temporal_ref[0].idx ||
+ cpi->gld_fb_idx == svc->buffer_gf_temporal_ref[0].idx ||
+ cpi->alt_fb_idx == svc->buffer_gf_temporal_ref[0].idx)
+ svc->buffer_gf_temporal_ref[0].is_used = 1;
+ if (cpi->lst_fb_idx == svc->buffer_gf_temporal_ref[1].idx ||
+ cpi->gld_fb_idx == svc->buffer_gf_temporal_ref[1].idx ||
+ cpi->alt_fb_idx == svc->buffer_gf_temporal_ref[1].idx)
+ svc->buffer_gf_temporal_ref[1].is_used = 1;
// For the fixed (non-flexible/bypass) SVC mode:
// If long term temporal reference is enabled at the sequence level
- // (use_longterm_ref == 1), and inter_layer is disabled (on inter-frames),
+ // (use_gf_temporal_ref == 1), and inter_layer is disabled (on inter-frames),
// we can use golden as a second temporal reference
// (since the spatial/inter-layer reference is disabled).
- // We check that the fb_idx for this reference (buffer_longterm_ref.idx) is
+ // We check that the fb_idx for this reference (buffer_gf_temporal_ref.idx) is
// unused (slot 7 and 6 should be available for 3-3 layer system).
// For now usage of this second temporal reference will only be used for
// highest and next to highest spatial layer (i.e., top and middle layer for
// 3 spatial layers).
- svc->use_longterm_ref_current_layer = 0;
- if (svc->use_longterm_ref && !svc->buffer_longterm_ref[0].is_used &&
- !svc->buffer_longterm_ref[1].is_used &&
+ svc->use_gf_temporal_ref_current_layer = 0;
+ if (svc->use_gf_temporal_ref && !svc->buffer_gf_temporal_ref[0].is_used &&
+ !svc->buffer_gf_temporal_ref[1].is_used &&
svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS &&
svc->disable_inter_layer_pred != INTER_LAYER_PRED_ON &&
svc->number_spatial_layers <= 3 && svc->number_temporal_layers <= 3 &&
svc->spatial_layer_id >= svc->number_spatial_layers - 2) {
// Enable the second (long-term) temporal reference at the frame-level.
- svc->use_longterm_ref_current_layer = 1;
+ svc->use_gf_temporal_ref_current_layer = 1;
// Only used for prediction for on non-key superframes.
if (!svc->layer_context[svc->temporal_layer_id].is_key_frame) {
// Use golden for this reference which will be used for prediction.
int index = svc->spatial_layer_id;
if (svc->number_spatial_layers == 3) index = svc->spatial_layer_id - 1;
- cpi->gld_fb_idx = svc->buffer_longterm_ref[index].idx;
+ cpi->gld_fb_idx = svc->buffer_gf_temporal_ref[index].idx;
// Enable prediction off LAST (last reference) and golden (which will
// generally be further behind/long-term reference).
cpi->ref_frame_flags = VP9_LAST_FLAG | VP9_GOLD_FLAG;
@@ -1032,7 +1032,7 @@ void vp9_svc_assert_constraints_pattern(VP9_COMP *const cpi) {
svc->temporal_layer_id);
}
}
- } else if (svc->use_longterm_ref_current_layer &&
+ } else if (svc->use_gf_temporal_ref_current_layer &&
!svc->layer_context[svc->temporal_layer_id].is_key_frame) {
// If the usage of golden as second long term reference is enabled for this
// layer, then temporal_layer_id of that reference must be base temporal
diff --git a/vp9/encoder/vp9_svc_layercontext.h b/vp9/encoder/vp9_svc_layercontext.h
index b7a4e2769..6cebb6af3 100644
--- a/vp9/encoder/vp9_svc_layercontext.h
+++ b/vp9/encoder/vp9_svc_layercontext.h
@@ -103,11 +103,11 @@ typedef struct SVC {
int alt_fb_idx[VPX_MAX_LAYERS];
int force_zero_mode_spatial_ref;
// Sequence level flag to enable second (long term) temporal reference.
- int use_longterm_ref;
+ int use_gf_temporal_ref;
// Frame level flag to enable second (long term) temporal reference.
- int use_longterm_ref_current_layer;
+ int use_gf_temporal_ref_current_layer;
// Allow second reference for at most 2 top highest resolution layers.
- BUFFER_LONGTERM_REF buffer_longterm_ref[2];
+ BUFFER_LONGTERM_REF buffer_gf_temporal_ref[2];
int current_superframe;
int non_reference_frame;
int use_base_mv;