FPMT: Fix cur_disp_index for parallel encode frames
This patch corrects the setting of cur_disp_index in
construct_multi_layer_gf_structure().
Change-Id: I39a8db7383eb9d3da1a85defd4e746609de2485c
diff --git a/av1/encoder/gop_structure.c b/av1/encoder/gop_structure.c
index c9198b4..c80dded 100644
--- a/av1/encoder/gop_structure.c
+++ b/av1/encoder/gop_structure.c
@@ -529,7 +529,9 @@
#if CONFIG_FRAME_PARALLEL_ENCODE
#if CONFIG_FRAME_PARALLEL_ENCODE_2
// Set the display order hint for the first frame in the GF_GROUP.
- int cur_disp_index = cpi->common.current_frame.frame_number;
+ int cur_disp_index = (first_frame_update_type == KF_UPDATE)
+ ? 0
+ : cpi->common.current_frame.frame_number;
#endif // CONFIG_FRAME_PARALLEL_ENCODE_2
#endif // CONFIG_FRAME_PARALLEL_ENCODE