ref: 9718a01e42e3e7232c6fe8dd1068052a7e7f5f2b
parent: 47b6d3c41827f40a5f726c97ce5bc103f5ad0ed9
author: Jingning Han <[email protected]>
date: Mon Nov 5 11:21:49 EST 2018
Track maximum layer depth in a GOP Track the effective maximum layer depth in a given group of pictures. Keep it in the GF_GROUP data structure. Change-Id: If777c4e0f4a871c7226a91e3871f445e92f18b24
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2127,6 +2127,7 @@
gf_group->gfu_boost[*index_counter] = NORMAL_BOOST;
++(*index_counter);
}
+ gf_group->max_layer_depth = VPXMAX(gf_group->max_layer_depth, depth);
return;
}
@@ -2189,6 +2190,7 @@
gf_group->frame_start = cpi->common.current_video_frame;
gf_group->frame_end = gf_group->frame_start + rc->baseline_gf_interval;
+ gf_group->max_layer_depth = 0;
// For key frames the frame target rate is already set and it
// is also the golden frame.
@@ -2206,6 +2208,7 @@
gf_group->arf_src_offset[frame_index] =
(unsigned char)(rc->baseline_gf_interval - 1);
gf_group->frame_gop_index[frame_index] = rc->baseline_gf_interval;
+ gf_group->max_layer_depth = 1;
++frame_index;
}