rtc: Force update of last on gf_update for nonrd
For fast nonrd_pickmode: golden is treated
as secondary reference (with early exits), so
on a GF_UPDATE frame its better to update both
LAST and GOLDEN.
This affects the default/internal behavior of
the reference frames; it does not effect the case
where user supplies the frame flags
(i.e., ext_refresh_frame_flags_pending = 1).
~1.5% average gain in bdrate on rtc set, a few clips
up by 3%.
Change-Id: I48c2523c9b77b40399e841939fc658276986cad6
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index cbbdb60..699cf38 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -813,6 +813,10 @@
update_arf_stack(ref_map_index, ref_buffer_stack);
stack_push(ref_buffer_stack->gld_stack, &ref_buffer_stack->gld_stack_size,
ref_map_index);
+ // For fast nonrd_mode: update LAST as well on GF_UPDATE frame.
+ if (cpi->sf.use_fast_nonrd_pick_mode)
+ stack_push(ref_buffer_stack->lst_stack,
+ &ref_buffer_stack->lst_stack_size, ref_map_index);
break;
case LF_UPDATE:
update_arf_stack(ref_map_index, ref_buffer_stack);