Commit 7cc78c06 authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review
Browse files

Merge "Adding vp9_inc_frame_in_layer() function."

parents 6e943cab 51b3035f
...@@ -2756,15 +2756,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, ...@@ -2756,15 +2756,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
// Don't increment frame counters if this was an altref buffer // Don't increment frame counters if this was an altref buffer
// update not a real frame // update not a real frame
++cm->current_video_frame; ++cm->current_video_frame;
if (cpi->use_svc) { if (cpi->use_svc)
LAYER_CONTEXT *lc; vp9_inc_frame_in_layer(&cpi->svc);
if (cpi->svc.number_temporal_layers > 1) {
lc = &cpi->svc.layer_context[cpi->svc.temporal_layer_id];
} else {
lc = &cpi->svc.layer_context[cpi->svc.spatial_layer_id];
}
++lc->current_video_frame_in_layer;
}
} }
// restore prev_mi // restore prev_mi
......
...@@ -215,3 +215,10 @@ void vp9_init_second_pass_spatial_svc(VP9_COMP *cpi) { ...@@ -215,3 +215,10 @@ void vp9_init_second_pass_spatial_svc(VP9_COMP *cpi) {
} }
svc->spatial_layer_id = 0; svc->spatial_layer_id = 0;
} }
void vp9_inc_frame_in_layer(SVC *svc) {
LAYER_CONTEXT *const lc = (svc->number_temporal_layers > 1)
? &svc->layer_context[svc->temporal_layer_id]
: &svc->layer_context[svc->spatial_layer_id];
++lc->current_video_frame_in_layer;
}
...@@ -70,6 +70,9 @@ void vp9_save_layer_context(struct VP9_COMP *const cpi); ...@@ -70,6 +70,9 @@ void vp9_save_layer_context(struct VP9_COMP *const cpi);
// Initialize second pass rc for spatial svc. // Initialize second pass rc for spatial svc.
void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi); void vp9_init_second_pass_spatial_svc(struct VP9_COMP *cpi);
// Increment number of video frames in layer
void vp9_inc_frame_in_layer(SVC *svc);
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
#endif #endif
......
Supports Markdown
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