Commit 3626d992 authored by David Barker's avatar David Barker Committed by Debargha Mukherjee

[NORMATIVE] Fix av1_set_frame_refs()

Fix an issue where, if we ran out of "useful" forward references
and went into the fallback path (selecting the earliest reference
slot available), we would sometimes overwrite valid references
with the (less useful) fallback choice.


Change-Id: Ic2fccaebf0c4fb0db68c28f16eb353c6d3bd18cf
parent cab937de
......@@ -1788,6 +1788,7 @@ void av1_set_frame_refs(AV1_COMMON *const cm, int lst_map_idx,
// Assign all the remaining frame(s), if any, to the earliest reference frame.
for (; ref_idx < (INTER_REFS_PER_FRAME - 2); ref_idx++) {
const MV_REFERENCE_FRAME ref_frame = ref_frame_list[ref_idx];
if (ref_flag_list[ref_frame - LAST_FRAME] == 1) continue;
set_ref_frame_info(cm, ref_frame - LAST_FRAME,
ref_flag_list[ref_frame - LAST_FRAME] = 1;
Markdown is supported
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