shithub: libvpx

Download patch

ref: ff944467758a44a908248bde5034da0deab96326
parent: 9d578ad63d967f8ca0815818781bb3640db3a9d7
parent: 21694259e06e496b6dffd94b20bcddde65338a2a
author: Jingning Han <jingning@google.com>
date: Mon Aug 20 11:59:27 EDT 2018

Merge "Support code show_existing_frame in bit-stream header"

--- 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);