diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c index 68095ca68..ba5dd06e4 100644 --- a/vp8/encoder/firstpass.c +++ b/vp8/encoder/firstpass.c @@ -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); } diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index db981754e..ed944a7c8 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -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