]> granicus.if.org Git - libvpx/commitdiff
Minor fix on an assert
authorDeb Mukherjee <debargha@google.com>
Tue, 14 Jan 2014 20:44:10 +0000 (12:44 -0800)
committerDeb Mukherjee <debargha@google.com>
Tue, 14 Jan 2014 20:51:13 +0000 (12:51 -0800)
Fixes assert that fails occasionally on small values of
max-key frame intervals. Also, adds a small change on
updating frames_to_key for frame drops.

Change-Id: Icc2b33b25e3e4ced7e49f8db73e0a887ef9c99e0

vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_ratectrl.c

index 8e60bc96d2c1ed76461110ae61092e8e4b9c13a7..669fe0a976cee04226de80da0e1a56df26f1ed46 100644 (file)
@@ -3420,7 +3420,7 @@ int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
 #endif
       frames_to_arf = cpi->rc.frames_till_gf_update_due;
 
-    assert(frames_to_arf < cpi->rc.frames_to_key);
+    assert(frames_to_arf <= cpi->rc.frames_to_key);
 
     if ((cpi->source = vp9_lookahead_peek(cpi->lookahead, frames_to_arf))) {
 #if CONFIG_MULTIPLE_ARF
index 939a7f9983e3864deaa5020ee36958626ea3d0dc..aefef5319829b2e4985a48bc6b459985111a8ac8 100644 (file)
@@ -965,5 +965,5 @@ void vp9_rc_postencode_update(VP9_COMP *cpi, uint64_t bytes_used) {
 
 void vp9_rc_postencode_update_drop_frame(VP9_COMP *cpi) {
   cpi->rc.frames_since_key++;
-  // cpi->rc.frames_to_key--;
+  cpi->rc.frames_to_key--;
 }