Initialize stats_in pointer for fp contexts
Initialized the stats_in pointer to twopass stats
according to the src_offset for all frame parallel
encode contexts.
Change-Id: Ida6241c1a37a24f020d55f3b66568dbf0e835c45
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index ec956a8..be1858a 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -4217,6 +4217,7 @@
int frames_since_key = first_cpi->rc.frames_since_key;
int frames_to_key = first_cpi->rc.frames_to_key;
int frames_to_fwd_kf = first_cpi->rc.frames_to_fwd_kf;
+ const FIRSTPASS_STATS *stats_in = first_cpi->twopass_frame.stats_in;
#if CONFIG_FRAME_PARALLEL_ENCODE_2
RefFrameMapPair ref_frame_map_pairs[REF_FRAMES];
init_ref_map_pair(first_cpi, ref_frame_map_pairs);
@@ -4254,6 +4255,7 @@
frames_to_key--;
frames_to_fwd_kf--;
}
+ stats_in++;
}
if (gf_group->frame_parallel_level[i] == 2) {
AV1_COMP *cur_cpi = ppi->parallel_cpi[parallel_frame_count];
@@ -4305,6 +4307,7 @@
cur_cpi->refresh_idx_available = false;
}
#endif // CONFIG_FRAME_PARALLEL_ENCODE_2
+ cur_cpi->twopass_frame.stats_in = stats_in;
parallel_frame_count++;
}