]> granicus.if.org Git - libvpx/commitdiff
Fix an encoder/decode mismatch bug
authorYaowu Xu <yaowu@google.com>
Fri, 13 Feb 2015 22:53:11 +0000 (14:53 -0800)
committerYaowu Xu <yaowu@google.com>
Fri, 13 Feb 2015 23:45:47 +0000 (15:45 -0800)
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

vp9/encoder/vp9_ratectrl.c

index 8d316d6bc0c27376b0499c6eaec9d823f24bfb30..47cfccb1bd4ba86696217f93eb47834f376e415e 100644 (file)
@@ -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;