diff options
-rw-r--r-- | vp9/encoder/vp9_encoder.c | 4 | ||||
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index a3972853d..a91c72a57 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -3914,16 +3914,16 @@ static void encode_with_recode_loop(VP9_COMP *cpi, size_t *size, if (two_pass_first_group_inter(cpi)) { cpi->twopass.active_worst_quality = VPXMIN(q + qrange_adj, cpi->oxcf.worst_allowed_q); - } + } else if (!frame_is_kf_gf_arf(cpi)) { #else if (!frame_is_kf_gf_arf(cpi)) { +#endif // Have we been forced to adapt Q outside the expected range by an extreme // rate miss. If so adjust the active maxQ for the subsequent frames. if (q > cpi->twopass.active_worst_quality) { cpi->twopass.active_worst_quality = q; } } -#endif if (enable_acl) { // Skip recoding, if model diff is below threshold diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index a970f6d97..3fcb30566 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2126,7 +2126,7 @@ static int calculate_boost_bits(int frame_count, int boost, int allocation_chunks; // return 0 for invalid inputs (could arise e.g. through rounding errors) - if (!boost || (total_group_bits <= 0) || (frame_count <= 0)) return 0; + if (!boost || (total_group_bits <= 0) || (frame_count < 0)) return 0; allocation_chunks = (frame_count * 100) + boost; |