From: Jingning Han Date: Fri, 17 Aug 2018 18:27:37 +0000 (-0700) Subject: Support code show_existing_frame in bit-stream header X-Git-Tag: v1.8.0~410^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21694259e06e496b6dffd94b20bcddde65338a2a;p=libvpx 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 --- 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);