summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2015-02-13 14:53:11 -0800
committerYaowu Xu <yaowu@google.com>2015-02-13 15:45:47 -0800
commit4bc7f4828fc0cb95027ab1fde476b4d05a2b1f80 (patch)
tree4d13bf9b8f31820bcd5ab419e8594e87fcbd0ca0 /vp9
parentfc99636f1bc09603434a16181c2eb9307a844ec6 (diff)
downloadlibvpx-4bc7f4828fc0cb95027ab1fde476b4d05a2b1f80.tar
libvpx-4bc7f4828fc0cb95027ab1fde476b4d05a2b1f80.tar.gz
libvpx-4bc7f4828fc0cb95027ab1fde476b4d05a2b1f80.tar.bz2
libvpx-4bc7f4828fc0cb95027ab1fde476b4d05a2b1f80.zip
Fix an encoder/decode mismatch bug
This commit prevent the encoder to update last_frame_type when a frame is dropped in the encoder. Prior to this fix, if there is a dropped frame immediatedly after a key frame, decoder would have the value of last_frame_type as key frame, different from encoder as the dropped frame in encoder would have updated the value to an inter frame. This leads to different probability update in encoder and decoder, thereby encoder/decoder mismatch. This fixes issue #941 Change-Id: I27115224b138bec43ae3916c016574f5740822b0
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_ratectrl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 8d316d6bc..47cfccb1b 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1320,7 +1320,6 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
void vp9_rc_postencode_update_drop_frame(VP9_COMP *cpi) {
// Update buffer level with zero size, update frame counters, and return.
update_buffer_level(cpi, 0);
- cpi->common.last_frame_type = cpi->common.frame_type;
cpi->rc.frames_since_key++;
cpi->rc.frames_to_key--;
cpi->rc.rc_2_frame = 0;