Commit 2089f26b authored by Jim Bankoski's avatar Jim Bankoski Committed by Gerrit Code Review
Browse files

Merge "Remove the frame rate factor for key frame size."

Showing with 10 additions and 3 deletions
...@@ -392,10 +392,16 @@ static void calc_iframe_target_size(VP8_COMP *cpi) ...@@ -392,10 +392,16 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
int Q = (cpi->common.frame_flags & FRAMEFLAGS_KEY) int Q = (cpi->common.frame_flags & FRAMEFLAGS_KEY)
? cpi->avg_frame_qindex : cpi->ni_av_qi; ? cpi->avg_frame_qindex : cpi->ni_av_qi;
// Boost depends somewhat on frame rate // Boost depends somewhat on frame rate: only used for 1 layer case.
kf_boost = (int)(2 * cpi->output_frame_rate - 16); if (cpi->oxcf.number_of_layers == 1) {
kf_boost = (int)(2 * cpi->output_frame_rate - 16);
}
else {
// Initial factor: set target size to: |2.5 * per_frame_bandwidth|.
kf_boost = 24;
}
// adjustment up based on q // adjustment up based on q: this factor ranges from ~1.2 to 2.2.
kf_boost = kf_boost * kf_boost_qadjustment[Q] / 100; kf_boost = kf_boost * kf_boost_qadjustment[Q] / 100;
// frame separation adjustment ( down) // frame separation adjustment ( down)
...@@ -403,6 +409,7 @@ static void calc_iframe_target_size(VP8_COMP *cpi) ...@@ -403,6 +409,7 @@ static void calc_iframe_target_size(VP8_COMP *cpi)
kf_boost = (int)(kf_boost kf_boost = (int)(kf_boost
* cpi->frames_since_key / (cpi->output_frame_rate / 2)); * cpi->frames_since_key / (cpi->output_frame_rate / 2));
// Minimal target size is |2* per_frame_bandwidth|.
if (kf_boost < 16) if (kf_boost < 16)
kf_boost = 16; kf_boost = 16;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment