ref: b628161cbce7d06b71582ea12bf31f7f11a51121
parent: 7a50129f65fb824448efb4b2c4302e1fc189b961
parent: c1b6e220e3fa04a2819a6728c1d716651d64d6b5
author: Jingning Han <jingning@google.com>
date: Fri Sep 28 13:18:54 EDT 2018
Merge "Add MID_OVERLAY_UPDATE frame type"
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -3058,6 +3058,12 @@
cpi->interp_filter_selected[0],
sizeof(cpi->interp_filter_selected[0]));
}
+
+ if (gf_group->update_type[gf_group->index] == MID_OVERLAY_UPDATE) {
+ cpi->alt_fb_idx =
+ stack_pop(gf_group->arf_index_stack, gf_group->stack_size);
+ --gf_group->stack_size;
+ }
}
void vp9_update_reference_frames(VP9_COMP *cpi) {
--- a/vp9/encoder/vp9_firstpass.h
+++ b/vp9/encoder/vp9_firstpass.h
@@ -117,8 +117,9 @@
GF_UPDATE = 2,
ARF_UPDATE = 3,
OVERLAY_UPDATE = 4,
- USE_BUF_FRAME = 5, // Use show existing frame, no ref buffer update
- FRAME_UPDATE_TYPES = 6
+ MID_OVERLAY_UPDATE = 5,
+ USE_BUF_FRAME = 6, // Use show existing frame, no ref buffer update
+ FRAME_UPDATE_TYPES = 7
} FRAME_UPDATE_TYPE;
#define FC_ANIMATION_THRESH 0.15
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1451,6 +1451,12 @@
cpi->refresh_alt_ref_frame = 0;
cpi->rc.is_src_frame_alt_ref = 1;
break;
+ case MID_OVERLAY_UPDATE:
+ cpi->refresh_last_frame = 1;
+ cpi->refresh_golden_frame = 0;
+ cpi->refresh_alt_ref_frame = 0;
+ cpi->rc.is_src_frame_alt_ref = 1;
+ break;
case USE_BUF_FRAME:
cpi->refresh_last_frame = 0;
cpi->refresh_golden_frame = 0;