Commit 5e0724ab authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "vp8_first_pass(): avoid floating point div by 0"

parents 6639b257 fba9772d
......@@ -858,7 +858,9 @@ skip_motion_search:
*/
if ((cm->current_video_frame > 0) &&
(cpi->twopass.this_frame_stats.pcnt_inter > 0.20) &&
((cpi->twopass.this_frame_stats.intra_error / cpi->twopass.this_frame_stats.coded_error) > 2.0))
((cpi->twopass.this_frame_stats.intra_error /
DOUBLE_DIVIDE_CHECK(cpi->twopass.this_frame_stats.coded_error)) >
2.0))
{
vp8_yv12_copy_frame(lst_yv12, gld_yv12);
}
......
......@@ -749,7 +749,8 @@ void vp9_first_pass(VP9_COMP *cpi) {
((cm->current_video_frame > 0) &&
(cpi->twopass.this_frame_stats->pcnt_inter > 0.20) &&
((cpi->twopass.this_frame_stats->intra_error /
cpi->twopass.this_frame_stats->coded_error) > 2.0))) {
DOUBLE_DIVIDE_CHECK(cpi->twopass.this_frame_stats->coded_error)) >
2.0))) {
vp8_yv12_copy_frame(lst_yv12, gld_yv12);
cpi->twopass.sr_update_lag = 1;
} else
......
Markdown is supported
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