ref: 21694259e06e496b6dffd94b20bcddde65338a2a
parent: eb327e418ed05d4e6df23701c514607a940a9ca0
author: Jingning Han <jingning@google.com>
date: Fri Aug 17 07:27:37 EDT 2018
Support code show_existing_frame in bit-stream header Allow the bit-stream writer to support potential use of show_existing_frame. At this point, cm->show_existing_frame is always 0. Change-Id: I64fed1d72db6d4902d56774854ce24fb7a082e0c
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1192,7 +1192,13 @@
write_profile(cm->profile, wb);
- vpx_wb_write_bit(wb, 0); // show_existing_frame
+ // If to use show existing frame.
+ vpx_wb_write_bit(wb, cm->show_existing_frame);
+ if (cm->show_existing_frame) {
+ vpx_wb_write_literal(wb, cpi->alt_fb_idx, 3);
+ return;
+ }
+
vpx_wb_write_bit(wb, cm->frame_type);
vpx_wb_write_bit(wb, cm->show_frame);
vpx_wb_write_bit(wb, cm->error_resilient_mode);