shithub: libvpx

Download patch

ref: 0a5a638c6014b233e0d8887b9f554c81212ca9c8
parent: bdc9262a6d16e222c1a25735b84b4c79920ac4bb
parent: 39f41a4f36fae46168312f08f144b5cc22b0c69a
author: Jim Bankoski <jimbankoski@google.com>
date: Tue Oct 26 03:34:57 EDT 2010

Merge commit 'refs/changes/09/809/1' of https://review.webmproject.org/p/libvpx

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1429,6 +1429,9 @@
 };
 void vp8_new_frame_rate(VP8_COMP *cpi, double framerate)
 {
+    if(framerate < .1)
+        framerate = 30;
+
     cpi->oxcf.frame_rate             = framerate;
     cpi->output_frame_rate            = cpi->oxcf.frame_rate;
     cpi->per_frame_bandwidth          = (int)(cpi->oxcf.target_bandwidth / cpi->output_frame_rate);
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -1481,6 +1481,8 @@
         // allocated than those following other gfs.
         cpi->kf_overspend_bits += (cpi->projected_frame_size - cpi->per_frame_bandwidth) * 7 / 8;
         cpi->gf_overspend_bits += (cpi->projected_frame_size - cpi->per_frame_bandwidth) * 1 / 8;
+        if(!av_key_frame_frequency)
+            av_key_frame_frequency = 60;
 
         // Work out how much to try and recover per frame.
         // For one pass we estimate the number of frames to spread it over based upon past history.