Index: source/libvpx/vp9/encoder/vp9_firstpass.c |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_firstpass.c (revision 191025) |
+++ source/libvpx/vp9/encoder/vp9_firstpass.c (working copy) |
@@ -749,7 +749,8 @@ |
((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 |
@@ -1694,8 +1695,8 @@ |
if ((cpi->twopass.kf_group_bits > 0) && |
(cpi->twopass.kf_group_error_left > 0)) { |
cpi->twopass.gf_group_bits = |
- (int)((double)cpi->twopass.kf_group_bits * |
- (gf_group_err / cpi->twopass.kf_group_error_left)); |
+ (int64_t)(cpi->twopass.kf_group_bits * |
+ (gf_group_err / cpi->twopass.kf_group_error_left)); |
} else |
cpi->twopass.gf_group_bits = 0; |
@@ -1707,8 +1708,9 @@ |
// Clip cpi->twopass.gf_group_bits based on user supplied data rate |
// variability limit (cpi->oxcf.two_pass_vbrmax_section) |
- if (cpi->twopass.gf_group_bits > max_bits * cpi->baseline_gf_interval) |
- cpi->twopass.gf_group_bits = max_bits * cpi->baseline_gf_interval; |
+ if (cpi->twopass.gf_group_bits > |
+ (int64_t)max_bits * cpi->baseline_gf_interval) |
+ cpi->twopass.gf_group_bits = (int64_t)max_bits * cpi->baseline_gf_interval; |
// Reset the file position |
reset_fpf_position(cpi, start_pos); |