From 21694259e06e496b6dffd94b20bcddde65338a2a Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Fri, 17 Aug 2018 11:27:37 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_bitstream.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 0c6681c2b..9f39c189b 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1192,7 +1192,13 @@ static void write_uncompressed_header(VP9_COMP *cpi, 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); -- 2.40.0