diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-05-13 02:00:20 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-05-13 02:00:20 +0000 |
commit | c9aea04508f441009e73ec86e7c9501726945f14 (patch) | |
tree | 32ca7aac4dfb4079fddae7eecfa79488cd41ee2b /libvpx | |
parent | 784fe0273e57249724af0da18184f62414c8528a (diff) | |
parent | ddd29329e48d433b2d91d418c54922984dce5da5 (diff) | |
download | libvpx-c9aea04508f441009e73ec86e7c9501726945f14.tar.gz |
Merge changes I8f7d9d08,If7ebbda3 am: ddd29329e4
Change-Id: I87cee9e5679ce45501ed3a2911e834d112ebf45b
Diffstat (limited to 'libvpx')
-rw-r--r-- | libvpx/vp8/encoder/onyx_if.c | 2 | ||||
-rw-r--r-- | libvpx/vp8/encoder/treewriter.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libvpx/vp8/encoder/onyx_if.c b/libvpx/vp8/encoder/onyx_if.c index adc25024c..4dd289cfb 100644 --- a/libvpx/vp8/encoder/onyx_if.c +++ b/libvpx/vp8/encoder/onyx_if.c @@ -4524,9 +4524,11 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size, /* Actual bits spent */ cpi->total_actual_bits += cpi->projected_frame_size; +#if 0 && CONFIG_INTERNAL_STATS /* Debug stats */ cpi->total_target_vs_actual += (cpi->this_frame_target - cpi->projected_frame_size); +#endif cpi->buffer_level = cpi->bits_off_target; diff --git a/libvpx/vp8/encoder/treewriter.h b/libvpx/vp8/encoder/treewriter.h index c02683a58..4e9ed6af1 100644 --- a/libvpx/vp8/encoder/treewriter.h +++ b/libvpx/vp8/encoder/treewriter.h @@ -14,6 +14,8 @@ /* Trees map alphabets into huffman-like codes suitable for an arithmetic bit coder. Timothy S Murphy 11 October 2004 */ +#include <stdint.h> + #include "./vpx_config.h" #include "vp8/common/treecoder.h" @@ -48,7 +50,9 @@ static INLINE unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob p) { /* Imitate existing calculation */ - return ((ct[0] * vp8_cost_zero(p)) + (ct[1] * vp8_cost_one(p))) >> 8; + return (unsigned int)(((((uint64_t)ct[0]) * vp8_cost_zero(p)) + + (((uint64_t)ct[1]) * vp8_cost_one(p))) >> + 8); } /* Small functions to write explicit values and tokens, as well as |