Corerctly sets frame type in the 2 pass case
This patch sets frame types correctly in the new vp9_get_second_pass_params() function called prior to encode_frame_to_data_rate() function, so that the latter function can just work with what is passed to it. This will allow multiple vp9_get_second_pass_params() to be created for various encode strategies without messing with the core encode function. There is no difference in derf and yt. stdhd/hd are pending. Change-Id: I70dfb97e9f497e9cee04052e0e8e0c2892eab0c3
This commit is contained in:
@@ -750,7 +750,6 @@ int vp9_rc_pick_q_and_adjust_q_bounds(const VP9_COMP *cpi,
|
||||
// Limit Q range for the adaptive loop.
|
||||
if (cm->frame_type == KEY_FRAME && !cpi->rc.this_key_frame_forced) {
|
||||
if (!(cpi->pass == 0 && cpi->common.current_video_frame == 0)) {
|
||||
*top_index = active_worst_quality;
|
||||
*top_index =
|
||||
(active_worst_quality + active_best_quality * 3) / 4;
|
||||
}
|
||||
@@ -790,6 +789,12 @@ int vp9_rc_pick_q_and_adjust_q_bounds(const VP9_COMP *cpi,
|
||||
printf("frame:%d q:%d\n", cm->current_video_frame, q);
|
||||
}
|
||||
#endif
|
||||
assert(*top_index <= cpi->rc.worst_quality &&
|
||||
*top_index >= cpi->rc.best_quality);
|
||||
assert(*bottom_index <= cpi->rc.worst_quality &&
|
||||
*bottom_index >= cpi->rc.best_quality);
|
||||
assert(q <= cpi->rc.worst_quality &&
|
||||
q >= cpi->rc.best_quality);
|
||||
return q;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user