ref: 9581eb6e8a15438a27bba10ba6f8de024296f1f7
parent: c0562d08f669683dc0d04a95e7d916195c39377a
author: James Zern <[email protected]>
date: Fri Jul 12 13:12:46 EDT 2013
use consistent framerate naming s/frame_rate/framerate/g Change-Id: I6fc3e088e419c5f46e3a9390dd8a2cad2677a2fc
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -923,7 +923,7 @@
if (flags & VP8D_DEBUG_TXT_RATE_INFO)
{
char message[512];
- sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate);
+ sprintf(message, "Bitrate: %10.2f framerate: %10.2f ", oci->bitrate, oci->framerate);
vp8_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
}
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -1325,7 +1325,7 @@
return Q;
}
-extern void vp8_new_frame_rate(VP8_COMP *cpi, double framerate);
+extern void vp8_new_framerate(VP8_COMP *cpi, double framerate);
void vp8_init_second_pass(VP8_COMP *cpi)
{
@@ -1349,9 +1349,9 @@
* sum duration is not. Its calculated based on the actual durations of
* all frames from the first pass.
*/
- vp8_new_frame_rate(cpi, 10000000.0 * cpi->twopass.total_stats.count / cpi->twopass.total_stats.duration);
+ vp8_new_framerate(cpi, 10000000.0 * cpi->twopass.total_stats.count / cpi->twopass.total_stats.duration);
- cpi->output_frame_rate = cpi->frame_rate;
+ cpi->output_framerate = cpi->framerate;
cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats.duration * cpi->oxcf.target_bandwidth / 10000000.0) ;
cpi->twopass.bits_left -= (int64_t)(cpi->twopass.total_stats.duration * two_pass_min_rate / 10000000.0);
@@ -2529,7 +2529,7 @@
/* Set nominal per second bandwidth for this frame */
cpi->target_bandwidth = (int)
- (cpi->per_frame_bandwidth * cpi->output_frame_rate);
+ (cpi->per_frame_bandwidth * cpi->output_framerate);
if (cpi->target_bandwidth < 0)
cpi->target_bandwidth = 0;
@@ -3185,7 +3185,7 @@
/* Convert to a per second bitrate */
cpi->target_bandwidth = (int)(cpi->twopass.kf_bits *
- cpi->output_frame_rate);
+ cpi->output_framerate);
}
/* Note the total error score of the kf group minus the key frame itself */
@@ -3224,7 +3224,7 @@
cpi->common.vert_scale = NORMAL;
/* Calculate Average bits per frame. */
- av_bits_per_frame = cpi->oxcf.target_bandwidth / DOUBLE_DIVIDE_CHECK((double)cpi->frame_rate);
+ av_bits_per_frame = cpi->oxcf.target_bandwidth / DOUBLE_DIVIDE_CHECK((double)cpi->framerate);
/* CBR... Use the clip average as the target for deciding resample */
if (cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER)
@@ -3299,7 +3299,7 @@
}
else
{
- int64_t clip_bits = (int64_t)(cpi->twopass.total_stats.count * cpi->oxcf.target_bandwidth / DOUBLE_DIVIDE_CHECK((double)cpi->frame_rate));
+ int64_t clip_bits = (int64_t)(cpi->twopass.total_stats.count * cpi->oxcf.target_bandwidth / DOUBLE_DIVIDE_CHECK((double)cpi->framerate));
int64_t over_spend = cpi->oxcf.starting_buffer_level - cpi->buffer_level;
/* If triggered last time the threshold for triggering again is
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -301,11 +301,11 @@
static void init_temporal_layer_context(VP8_COMP *cpi,
VP8_CONFIG *oxcf,
const int layer,
- double prev_layer_frame_rate)
+ double prev_layer_framerate)
{
LAYER_CONTEXT *lc = &cpi->layer_context[layer];
- lc->frame_rate = cpi->output_frame_rate / cpi->oxcf.rate_decimator[layer];
+ lc->framerate = cpi->output_framerate / cpi->oxcf.rate_decimator[layer];
lc->target_bandwidth = cpi->oxcf.target_bitrate[layer] * 1000;
lc->starting_buffer_level_in_ms = oxcf->starting_buffer_level;
@@ -335,7 +335,7 @@
lc->avg_frame_size_for_layer =
(int)((cpi->oxcf.target_bitrate[layer] -
cpi->oxcf.target_bitrate[layer-1]) * 1000 /
- (lc->frame_rate - prev_layer_frame_rate));
+ (lc->framerate - prev_layer_framerate));
lc->active_worst_quality = cpi->oxcf.worst_allowed_q;
lc->active_best_quality = cpi->oxcf.best_allowed_q;
@@ -363,7 +363,7 @@
const int prev_num_layers)
{
int i;
- double prev_layer_frame_rate = 0;
+ double prev_layer_framerate = 0;
const int curr_num_layers = cpi->oxcf.number_of_layers;
// If the previous state was 1 layer, get current layer context from cpi.
// We need this to set the layer context for the new layers below.
@@ -377,7 +377,7 @@
LAYER_CONTEXT *lc = &cpi->layer_context[i];
if (i >= prev_num_layers)
{
- init_temporal_layer_context(cpi, oxcf, i, prev_layer_frame_rate);
+ init_temporal_layer_context(cpi, oxcf, i, prev_layer_framerate);
}
// The initial buffer levels are set based on their starting levels.
// We could set the buffer levels based on the previous state (normalized
@@ -403,8 +403,8 @@
lc->bits_off_target = lc->buffer_level;
restore_layer_context(cpi, 0);
}
- prev_layer_frame_rate = cpi->output_frame_rate /
- cpi->oxcf.rate_decimator[i];
+ prev_layer_framerate = cpi->output_framerate /
+ cpi->oxcf.rate_decimator[i];
}
}
@@ -1282,21 +1282,21 @@
return 63;
}
-void vp8_new_frame_rate(VP8_COMP *cpi, double framerate)
+void vp8_new_framerate(VP8_COMP *cpi, double framerate)
{
if(framerate < .1)
framerate = 30;
- cpi->frame_rate = framerate;
- cpi->output_frame_rate = framerate;
+ cpi->framerate = framerate;
+ cpi->output_framerate = framerate;
cpi->per_frame_bandwidth = (int)(cpi->oxcf.target_bandwidth /
- cpi->output_frame_rate);
+ cpi->output_framerate);
cpi->av_per_frame_bandwidth = cpi->per_frame_bandwidth;
cpi->min_frame_bandwidth = (int)(cpi->av_per_frame_bandwidth *
cpi->oxcf.two_pass_vbrmin_section / 100);
/* Set Maximum gf/arf interval */
- cpi->max_gf_interval = ((int)(cpi->output_frame_rate / 2.0) + 2);
+ cpi->max_gf_interval = ((int)(cpi->output_framerate / 2.0) + 2);
if(cpi->max_gf_interval < 12)
cpi->max_gf_interval = 12;
@@ -1337,13 +1337,13 @@
* seems like a reasonable framerate, then use that as a guess, otherwise
* use 30.
*/
- cpi->frame_rate = (double)(oxcf->timebase.den) /
- (double)(oxcf->timebase.num);
+ cpi->framerate = (double)(oxcf->timebase.den) /
+ (double)(oxcf->timebase.num);
- if (cpi->frame_rate > 180)
- cpi->frame_rate = 30;
+ if (cpi->framerate > 180)
+ cpi->framerate = 30;
- cpi->ref_frame_rate = cpi->frame_rate;
+ cpi->ref_framerate = cpi->framerate;
/* change includes all joint functionality */
vp8_change_config(cpi, oxcf);
@@ -1369,13 +1369,13 @@
if (cpi->oxcf.number_of_layers > 1)
{
unsigned int i;
- double prev_layer_frame_rate=0;
+ double prev_layer_framerate=0;
for (i=0; i<cpi->oxcf.number_of_layers; i++)
{
- init_temporal_layer_context(cpi, oxcf, i, prev_layer_frame_rate);
- prev_layer_frame_rate = cpi->output_frame_rate /
- cpi->oxcf.rate_decimator[i];
+ init_temporal_layer_context(cpi, oxcf, i, prev_layer_framerate);
+ prev_layer_framerate = cpi->output_framerate /
+ cpi->oxcf.rate_decimator[i];
}
}
@@ -1399,14 +1399,14 @@
if (oxcf->number_of_layers > 1)
{
unsigned int i;
- double prev_layer_frame_rate=0;
+ double prev_layer_framerate=0;
for (i=0; i<oxcf->number_of_layers; i++)
{
LAYER_CONTEXT *lc = &cpi->layer_context[i];
- lc->frame_rate =
- cpi->ref_frame_rate / oxcf->rate_decimator[i];
+ lc->framerate =
+ cpi->ref_framerate / oxcf->rate_decimator[i];
lc->target_bandwidth = oxcf->target_bitrate[i] * 1000;
lc->starting_buffer_level = rescale(
@@ -1432,9 +1432,9 @@
lc->avg_frame_size_for_layer =
(int)((oxcf->target_bitrate[i] -
oxcf->target_bitrate[i-1]) * 1000 /
- (lc->frame_rate - prev_layer_frame_rate));
+ (lc->framerate - prev_layer_framerate));
- prev_layer_frame_rate = lc->frame_rate;
+ prev_layer_framerate = lc->framerate;
}
}
}
@@ -1625,7 +1625,7 @@
cpi->oxcf.target_bandwidth, 1000);
/* Set up frame rate and related parameters rate control values. */
- vp8_new_frame_rate(cpi, cpi->frame_rate);
+ vp8_new_framerate(cpi, cpi->framerate);
/* Set absolute upper and lower quality limits */
cpi->worst_quality = cpi->oxcf.worst_allowed_q;
@@ -1945,7 +1945,7 @@
for (i = 0; i < KEY_FRAME_CONTEXT; i++)
{
- cpi->prior_key_frame_distance[i] = (int)cpi->output_frame_rate;
+ cpi->prior_key_frame_distance[i] = (int)cpi->output_framerate;
}
#ifdef OUTPUT_YUV_SRC
@@ -2273,7 +2273,7 @@
{
extern int count_mb_seg[4];
FILE *f = fopen("modes.stt", "a");
- double dr = (double)cpi->frame_rate * (double)bytes * (double)8 / (double)count / (double)1000 ;
+ double dr = (double)cpi->framerate * (double)bytes * (double)8 / (double)count / (double)1000 ;
fprintf(f, "intra_mode in Intra Frames:\n");
fprintf(f, "Y: %8d, %8d, %8d, %8d, %8d\n", y_modes[0], y_modes[1], y_modes[2], y_modes[3], y_modes[4]);
fprintf(f, "UV:%8d, %8d, %8d, %8d\n", uv_modes[0], uv_modes[1], uv_modes[2], uv_modes[3]);
@@ -3368,12 +3368,12 @@
cpi->per_frame_bandwidth = cpi->twopass.gf_bits;
/* per second target bitrate */
cpi->target_bandwidth = (int)(cpi->twopass.gf_bits *
- cpi->output_frame_rate);
+ cpi->output_framerate);
}
}
else
#endif
- cpi->per_frame_bandwidth = (int)(cpi->target_bandwidth / cpi->output_frame_rate);
+ cpi->per_frame_bandwidth = (int)(cpi->target_bandwidth / cpi->output_framerate);
/* Default turn off buffer to buffer copying */
cm->copy_buffer_to_gf = 0;
@@ -4557,7 +4557,7 @@
{
LAYER_CONTEXT *lc = &cpi->layer_context[i];
int bits_off_for_this_layer =
- (int)(lc->target_bandwidth / lc->frame_rate -
+ (int)(lc->target_bandwidth / lc->framerate -
cpi->projected_frame_size);
lc->bits_off_target += bits_off_for_this_layer;
@@ -4805,7 +4805,7 @@
{
double two_pass_min_rate = (double)(cpi->oxcf.target_bandwidth
*cpi->oxcf.two_pass_vbrmin_section / 100);
- cpi->twopass.bits_left += (int64_t)(two_pass_min_rate / cpi->frame_rate);
+ cpi->twopass.bits_left += (int64_t)(two_pass_min_rate / cpi->framerate);
}
}
#endif
@@ -5039,7 +5039,7 @@
if (this_duration)
{
if (step)
- cpi->ref_frame_rate = 10000000.0 / this_duration;
+ cpi->ref_framerate = 10000000.0 / this_duration;
else
{
double avg_duration, interval;
@@ -5053,11 +5053,11 @@
if(interval > 10000000.0)
interval = 10000000;
- avg_duration = 10000000.0 / cpi->ref_frame_rate;
+ avg_duration = 10000000.0 / cpi->ref_framerate;
avg_duration *= (interval - avg_duration + this_duration);
avg_duration /= interval;
- cpi->ref_frame_rate = 10000000.0 / avg_duration;
+ cpi->ref_framerate = 10000000.0 / avg_duration;
}
if (cpi->oxcf.number_of_layers > 1)
@@ -5068,12 +5068,12 @@
for (i=0; i<cpi->oxcf.number_of_layers; i++)
{
LAYER_CONTEXT *lc = &cpi->layer_context[i];
- lc->frame_rate = cpi->ref_frame_rate /
- cpi->oxcf.rate_decimator[i];
+ lc->framerate = cpi->ref_framerate /
+ cpi->oxcf.rate_decimator[i];
}
}
else
- vp8_new_frame_rate(cpi, cpi->ref_frame_rate);
+ vp8_new_framerate(cpi, cpi->ref_framerate);
}
cpi->last_time_stamp_seen = cpi->source->ts_start;
@@ -5090,7 +5090,7 @@
layer = cpi->oxcf.layer_id[
cpi->temporal_pattern_counter % cpi->oxcf.periodicity];
restore_layer_context (cpi, layer);
- vp8_new_frame_rate (cpi, cpi->layer_context[layer].frame_rate);
+ vp8_new_framerate(cpi, cpi->layer_context[layer].framerate);
}
if (cpi->compressor_speed == 2)
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -232,7 +232,7 @@
typedef struct
{
/* Layer configuration */
- double frame_rate;
+ double framerate;
int target_bandwidth;
/* Layer specific coding parameters */
@@ -401,7 +401,7 @@
/* Minimum allocation that should be used for any frame */
int min_frame_bandwidth;
int inter_frame_target;
- double output_frame_rate;
+ double output_framerate;
int64_t last_time_stamp_seen;
int64_t last_end_time_stamp_seen;
int64_t first_time_stamp_ever;
@@ -415,8 +415,8 @@
int buffered_mode;
- double frame_rate;
- double ref_frame_rate;
+ double framerate;
+ double ref_framerate;
int64_t buffer_level;
int64_t bits_off_target;
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -388,7 +388,7 @@
int initial_boost = 32; /* |3.0 * per_frame_bandwidth| */
/* Boost depends somewhat on frame rate: only used for 1 layer case. */
if (cpi->oxcf.number_of_layers == 1) {
- kf_boost = MAX(initial_boost, (int)(2 * cpi->output_frame_rate - 16));
+ kf_boost = MAX(initial_boost, (int)(2 * cpi->output_framerate - 16));
}
else {
/* Initial factor: set target size to: |3.0 * per_frame_bandwidth|. */
@@ -399,9 +399,9 @@
kf_boost = kf_boost * kf_boost_qadjustment[Q] / 100;
/* frame separation adjustment ( down) */
- if (cpi->frames_since_key < cpi->output_frame_rate / 2)
+ if (cpi->frames_since_key < cpi->output_framerate / 2)
kf_boost = (int)(kf_boost
- * cpi->frames_since_key / (cpi->output_frame_rate / 2));
+ * cpi->frames_since_key / (cpi->output_framerate / 2));
/* Minimal target size is |2* per_frame_bandwidth|. */
if (kf_boost < 16)
@@ -1360,7 +1360,7 @@
* whichever is smaller.
*/
int key_freq = cpi->oxcf.key_freq>0 ? cpi->oxcf.key_freq : 1;
- av_key_frame_frequency = 1 + (int)cpi->output_frame_rate * 2;
+ av_key_frame_frequency = 1 + (int)cpi->output_framerate * 2;
if (cpi->oxcf.auto_key && av_key_frame_frequency > key_freq)
av_key_frame_frequency = key_freq;
--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -341,7 +341,7 @@
void vp8_auto_select_speed(VP8_COMP *cpi)
{
- int milliseconds_for_compress = (int)(1000000 / cpi->frame_rate);
+ int milliseconds_for_compress = (int)(1000000 / cpi->framerate);
milliseconds_for_compress = milliseconds_for_compress * (16 - cpi->oxcf.cpu_used) / 16;
--- a/vp9/common/vp9_onyx.h
+++ b/vp9/common/vp9_onyx.h
@@ -98,7 +98,7 @@
// 3 - lowest quality/fastest decode
int width; // width of data passed to the compressor
int height; // height of data passed to the compressor
- double frame_rate; // set to passed in framerate
+ double framerate; // set to passed in framerate
int64_t target_bandwidth; // bandwidth to be used in kilobits per second
int noise_sensitivity; // parameter used for applying pre processing blur: recommendation 0
--- a/vp9/common/vp9_postproc.c
+++ b/vp9/common/vp9_postproc.c
@@ -758,7 +758,7 @@
if (flags & VP9D_DEBUG_TXT_RATE_INFO) {
char message[512];
snprintf(message, sizeof(message),
- "Bitrate: %10.2f frame_rate: %10.2f ",
+ "Bitrate: %10.2f framerate: %10.2f ",
oci->bitrate, oci->framerate);
vp9_blit_text(message, oci->post_proc_buffer.y_buffer,
oci->post_proc_buffer.y_stride);
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1093,13 +1093,13 @@
}
-extern void vp9_new_frame_rate(VP9_COMP *cpi, double framerate);
+extern void vp9_new_framerate(VP9_COMP *cpi, double framerate);
void vp9_init_second_pass(VP9_COMP *cpi) {
FIRSTPASS_STATS this_frame;
FIRSTPASS_STATS *start_pos;
- double lower_bounds_min_rate = FRAME_OVERHEAD_BITS * cpi->oxcf.frame_rate;
+ double lower_bounds_min_rate = FRAME_OVERHEAD_BITS * cpi->oxcf.framerate;
double two_pass_min_rate = (double)(cpi->oxcf.target_bandwidth
* cpi->oxcf.two_pass_vbrmin_section / 100);
@@ -1120,10 +1120,10 @@
// encoded in the second pass is a guess. However the sum duration is not.
// Its calculated based on the actual durations of all frames from the first
// pass.
- vp9_new_frame_rate(cpi, 10000000.0 * cpi->twopass.total_stats.count /
+ vp9_new_framerate(cpi, 10000000.0 * cpi->twopass.total_stats.count /
cpi->twopass.total_stats.duration);
- cpi->output_frame_rate = cpi->oxcf.frame_rate;
+ cpi->output_framerate = cpi->oxcf.framerate;
cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats.duration *
cpi->oxcf.target_bandwidth / 10000000.0);
cpi->twopass.bits_left -= (int64_t)(cpi->twopass.total_stats.duration *
@@ -2203,7 +2203,7 @@
// Set nominal per second bandwidth for this frame
cpi->target_bandwidth = (int)(cpi->per_frame_bandwidth
- * cpi->output_frame_rate);
+ * cpi->output_framerate);
if (cpi->target_bandwidth < 0)
cpi->target_bandwidth = 0;
@@ -2623,7 +2623,7 @@
cpi->per_frame_bandwidth = cpi->twopass.kf_bits;
// Convert to a per second bitrate
cpi->target_bandwidth = (int)(cpi->twopass.kf_bits *
- cpi->output_frame_rate);
+ cpi->output_framerate);
}
// Note the total error score of the kf group minus the key frame itself
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1026,14 +1026,14 @@
return 63;
};
-void vp9_new_frame_rate(VP9_COMP *cpi, double framerate) {
+void vp9_new_framerate(VP9_COMP *cpi, double framerate) {
if (framerate < 0.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);
- cpi->av_per_frame_bandwidth = (int)(cpi->oxcf.target_bandwidth / cpi->output_frame_rate);
+ cpi->oxcf.framerate = framerate;
+ cpi->output_framerate = cpi->oxcf.framerate;
+ cpi->per_frame_bandwidth = (int)(cpi->oxcf.target_bandwidth / cpi->output_framerate);
+ cpi->av_per_frame_bandwidth = (int)(cpi->oxcf.target_bandwidth / cpi->output_framerate);
cpi->min_frame_bandwidth = (int)(cpi->av_per_frame_bandwidth * cpi->oxcf.two_pass_vbrmin_section / 100);
@@ -1230,7 +1230,7 @@
cpi->oxcf.target_bandwidth, 1000);
// Set up frame rate and related parameters rate control values.
- vp9_new_frame_rate(cpi, cpi->oxcf.frame_rate);
+ vp9_new_framerate(cpi, cpi->oxcf.framerate);
// Set absolute upper and lower quality limits
cpi->worst_quality = cpi->oxcf.worst_allowed_q;
@@ -1522,7 +1522,7 @@
cal_nmvsadcosts_hp(cpi->mb.nmvsadcost_hp);
for (i = 0; i < KEY_FRAME_CONTEXT; i++)
- cpi->prior_key_frame_distance[i] = (int)cpi->output_frame_rate;
+ cpi->prior_key_frame_distance[i] = (int)cpi->output_framerate;
#ifdef OUTPUT_YUV_SRC
yuv_file = fopen("bd.yuv", "ab");
@@ -2530,7 +2530,7 @@
cpi->per_frame_bandwidth = cpi->twopass.gf_bits;
// per second target bitrate
cpi->target_bandwidth = (int)(cpi->twopass.gf_bits *
- cpi->output_frame_rate);
+ cpi->output_framerate);
}
// Clear zbin over-quant value and mode boost values.
@@ -3472,7 +3472,7 @@
#endif
if (!cpi->refresh_alt_ref_frame) {
- double lower_bounds_min_rate = FRAME_OVERHEAD_BITS * cpi->oxcf.frame_rate;
+ double lower_bounds_min_rate = FRAME_OVERHEAD_BITS * cpi->oxcf.framerate;
double two_pass_min_rate = (double)(cpi->oxcf.target_bandwidth
* cpi->oxcf.two_pass_vbrmin_section / 100);
@@ -3479,7 +3479,7 @@
if (two_pass_min_rate < lower_bounds_min_rate)
two_pass_min_rate = lower_bounds_min_rate;
- cpi->twopass.bits_left += (int64_t)(two_pass_min_rate / cpi->oxcf.frame_rate);
+ cpi->twopass.bits_left += (int64_t)(two_pass_min_rate / cpi->oxcf.framerate);
}
}
@@ -3701,7 +3701,7 @@
if (this_duration) {
if (step) {
- vp9_new_frame_rate(cpi, 10000000.0 / this_duration);
+ vp9_new_framerate(cpi, 10000000.0 / this_duration);
} else {
// Average this frame's rate into the last second's average
// frame rate. If we haven't seen 1 second yet, then average
@@ -3708,11 +3708,11 @@
// over the whole interval seen.
const double interval = MIN((double)(cpi->source->ts_end
- cpi->first_time_stamp_ever), 10000000.0);
- double avg_duration = 10000000.0 / cpi->oxcf.frame_rate;
+ double avg_duration = 10000000.0 / cpi->oxcf.framerate;
avg_duration *= (interval - avg_duration + this_duration);
avg_duration /= interval;
- vp9_new_frame_rate(cpi, 10000000.0 / avg_duration);
+ vp9_new_framerate(cpi, 10000000.0 / avg_duration);
}
}
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -412,7 +412,7 @@
int av_per_frame_bandwidth; // Average frame size target for clip
int min_frame_bandwidth; // Minimum allocation that should be used for any frame
int inter_frame_target;
- double output_frame_rate;
+ double output_framerate;
int64_t last_time_stamp_seen;
int64_t last_end_time_stamp_seen;
int64_t first_time_stamp_ever;
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -451,7 +451,7 @@
* whichever is smaller.
*/
int key_freq = cpi->oxcf.key_freq > 0 ? cpi->oxcf.key_freq : 1;
- av_key_frame_frequency = (int)cpi->output_frame_rate * 2;
+ av_key_frame_frequency = (int)cpi->output_framerate * 2;
if (cpi->oxcf.auto_key && av_key_frame_frequency > key_freq)
av_key_frame_frequency = cpi->oxcf.key_freq;
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -233,10 +233,10 @@
oxcf->width = cfg.g_w;
oxcf->height = cfg.g_h;
/* guess a frame rate if out of whack, use 30 */
- oxcf->frame_rate = (double)(cfg.g_timebase.den) / (double)(cfg.g_timebase.num);
+ oxcf->framerate = (double)(cfg.g_timebase.den) / (double)(cfg.g_timebase.num);
- if (oxcf->frame_rate > 180) {
- oxcf->frame_rate = 30;
+ if (oxcf->framerate > 180) {
+ oxcf->framerate = 30;
}
switch (cfg.g_pass) {