Merge "Fix key frames for one pass."

This commit is contained in:
Alex Converse
2014-01-17 10:22:59 -08:00
committed by Gerrit Code Review
2 changed files with 7 additions and 1 deletions

View File

@@ -1965,7 +1965,10 @@ void vp9_get_one_pass_params(VP9_COMP *cpi) {
cpi->rc.frames_to_key == 0 || cpi->rc.frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME; cm->frame_type = KEY_FRAME;
cpi->rc.this_key_frame_forced = cm->current_video_frame != 0 &&
cpi->rc.frames_to_key == 0;
cpi->rc.frames_to_key = cpi->key_frame_frequency; cpi->rc.frames_to_key = cpi->key_frame_frequency;
cpi->rc.kf_boost = 300;
} else { } else {
cm->frame_type = INTER_FRAME; cm->frame_type = INTER_FRAME;
} }
@@ -1982,7 +1985,10 @@ void vp9_get_one_pass_cbr_params(VP9_COMP *cpi) {
cpi->rc.frames_to_key == 0 || cpi->rc.frames_to_key == 0 ||
(cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) { (cpi->oxcf.auto_key && test_for_kf_one_pass(cpi)))) {
cm->frame_type = KEY_FRAME; cm->frame_type = KEY_FRAME;
cpi->rc.this_key_frame_forced = cm->current_video_frame != 0 &&
cpi->rc.frames_to_key == 0;
cpi->rc.frames_to_key = cpi->key_frame_frequency; cpi->rc.frames_to_key = cpi->key_frame_frequency;
cpi->rc.kf_boost = 300;
} else { } else {
cm->frame_type = INTER_FRAME; cm->frame_type = INTER_FRAME;
} }

View File

@@ -602,7 +602,7 @@ int vp9_rc_pick_q_and_adjust_q_bounds(const VP9_COMP *cpi,
(last_boosted_q * 0.75)); (last_boosted_q * 0.75));
active_best_quality = MAX(qindex + delta_qindex, rc->best_quality); active_best_quality = MAX(qindex + delta_qindex, rc->best_quality);
} else if (!(cpi->pass == 0 && cm->current_video_frame == 0)) { } else if (!(cpi->pass == 0 && cm->current_video_frame == 0)) {
// not first frame of one pass // not first frame of one pass and kf_boost is set
double q_adj_factor = 1.0; double q_adj_factor = 1.0;
double q_val; double q_val;