diff options
author | agrange <agrange@google.com> | 2010-06-18 15:18:09 +0100 |
---|---|---|
committer | agrange <agrange@google.com> | 2010-06-21 15:20:52 +0100 |
commit | d4b99b8e3ae2fe0a92b66cc610e55a64bfc3c9a4 (patch) | |
tree | 473e9122f2dadc5384085d98ad38072a145d4950 /vp8/encoder | |
parent | 9f814634545d18dbb0114804e525809f382dcba0 (diff) | |
download | libvpx-d4b99b8e3ae2fe0a92b66cc610e55a64bfc3c9a4.tar libvpx-d4b99b8e3ae2fe0a92b66cc610e55a64bfc3c9a4.tar.gz libvpx-d4b99b8e3ae2fe0a92b66cc610e55a64bfc3c9a4.tar.bz2 libvpx-d4b99b8e3ae2fe0a92b66cc610e55a64bfc3c9a4.zip |
Moved DOUBLE_DIVIDE_CHECK to denominator (was on numerator)
The DOUBLE_DIVIDE_CHECK macro prevents from divide by 0,
so must be on the denominator to work as intended.
Change-Id: Ie109242d52dbb9a2c4bc1e11890fa51b5f87ffc7
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/firstpass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c index 7625c9c49..74feca314 100644 --- a/vp8/encoder/firstpass.c +++ b/vp8/encoder/firstpass.c @@ -217,7 +217,7 @@ int frame_max_bits(VP8_COMP *cpi) // If we are running below the optimal level then we need to gradually tighten up on max_bits. if (cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) { - double buffer_fullness_ratio = (double)DOUBLE_DIVIDE_CHECK(cpi->buffer_level) / (double)cpi->oxcf.optimal_buffer_level; + double buffer_fullness_ratio = (double)cpi->buffer_level / DOUBLE_DIVIDE_CHECK((double)cpi->oxcf.optimal_buffer_level); // For CBR base this on the target average bits per frame plus the maximum sedction rate passed in by the user max_bits = (int)(cpi->av_per_frame_bandwidth * ((double)cpi->oxcf.two_pass_vbrmax_section / 100.0)); |