From: Deb Mukherjee Date: Tue, 14 Jan 2014 20:44:10 +0000 (-0800) Subject: Minor fix on an assert X-Git-Tag: v1.4.0~2684^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1699d6bd53a81d8844d297f98ec752ff8551ffff;p=libvpx Minor fix on an assert 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 --- diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 8e60bc96d..669fe0a97 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -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 diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 939a7f998..aefef5319 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -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--; }