Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: source/libvpx/vp9/encoder/vp9_firstpass.c

Issue 13042014: Description: (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/common/x86/vp9_subpixel_8t_ssse3.asm ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « source/libvpx/vp9/common/x86/vp9_subpixel_8t_ssse3.asm ('k') | source/libvpx/vp9/encoder/vp9_onyx_if.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698