From 3356cbfe0e75ca3aef28a43dce2231f188e500cf Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Fri, 17 Aug 2018 12:55:54 -0700 Subject: [PATCH] Skip frame bit-stream writing for show-existing frame Make the bit-stream writer match the decoder behavior, when the show existing frame feature is used. Change-Id: Ibc8153f8668da0f9a2ed8af3b42dae91a5ac08c7 --- vp9/encoder/vp9_bitstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 9f39c189b..79fc160c1 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -1340,6 +1340,10 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size) { struct vpx_write_bit_buffer saved_wb; write_uncompressed_header(cpi, &wb); + + // Skip the rest coding process if use show existing frame. + if (cpi->common.show_existing_frame) return; + saved_wb = wb; vpx_wb_write_literal(&wb, 0, 16); // don't know in advance first part. size -- 2.40.0