Merge "Fix some interger overflow errors"
diff --git a/vp10/decoder/decodemv.c b/vp10/decoder/decodemv.c
index a28ae55..01b796c 100644
--- a/vp10/decoder/decodemv.c
+++ b/vp10/decoder/decodemv.c
@@ -24,19 +24,6 @@
#include "vpx_dsp/vpx_dsp_common.h"
-static INLINE int read_uniform(vpx_reader *r, int n) {
- int l = get_unsigned_bits(n);
- int m = (1 << l) - n;
- int v = vpx_read_literal(r, l-1);
-
- assert(l != 0);
-
- if (v < m)
- return v;
- else
- return (v << 1) - m + vpx_read_literal(r, 1);
-}
-
static PREDICTION_MODE read_intra_mode(vpx_reader *r, const vpx_prob *p) {
return (PREDICTION_MODE)vpx_read_tree(r, vp10_intra_mode_tree, p);
}
diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c
index ede8bb3..04ce61d 100644
--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -45,19 +45,6 @@
static const struct vp10_token inter_mode_encodings[INTER_MODES] =
{{2, 2}, {6, 3}, {0, 1}, {7, 3}};
-static INLINE void write_uniform(vpx_writer *w, int n, int v) {
- int l = get_unsigned_bits(n);
- int m = (1 << l) - n;
- if (l == 0)
- return;
- if (v < m) {
- vpx_write_literal(w, v, l - 1);
- } else {
- vpx_write_literal(w, m + ((v - m) >> 1), l - 1);
- vpx_write_literal(w, (v - m) & 1, 1);
- }
-}
-
static struct vp10_token ext_tx_encodings[TX_TYPES];
void vp10_encode_token_init() {
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c
index 90a716d..b1077cb 100644
--- a/vp10/encoder/rdopt.c
+++ b/vp10/encoder/rdopt.c
@@ -132,16 +132,6 @@
{{INTRA_FRAME, NONE}},
};
-static INLINE int write_uniform_cost(int n, int v) {
- int l = get_unsigned_bits(n), m = (1 << l) - n;
- if (l == 0)
- return 0;
- if (v < m)
- return (l - 1) * vp10_cost_bit(128, 0);
- else
- return l * vp10_cost_bit(128, 0);
-}
-
static void swap_block_ptr(MACROBLOCK *x, PICK_MODE_CONTEXT *ctx,
int m, int n, int min_plane, int max_plane) {
int i;
diff --git a/vp9/encoder/vp9_denoiser.h b/vp9/encoder/vp9_denoiser.h
index 12dd5b5..9f13bd5 100644
--- a/vp9/encoder/vp9_denoiser.h
+++ b/vp9/encoder/vp9_denoiser.h
@@ -75,7 +75,8 @@
// This function is used by both c and sse2 denoiser implementations.
// Define it as a static function within the scope where vp9_denoiser.h
// is referenced.
-static int total_adj_strong_thresh(BLOCK_SIZE bs, int increase_denoising) {
+static INLINE int total_adj_strong_thresh(BLOCK_SIZE bs,
+ int increase_denoising) {
return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 3 : 2);
}
#endif
diff --git a/vpxenc.c b/vpxenc.c
index 8798e69..c61d060 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -454,6 +454,9 @@
&frame_parallel_decoding, &aq_mode, &frame_periodic_boost,
&noise_sens, &tune_content, &input_color_space,
&min_gf_interval, &max_gf_interval,
+#if CONFIG_VP9_HIGHBITDEPTH
+ &bitdeptharg, &inbitdeptharg,
+#endif // CONFIG_VP9_HIGHBITDEPTH
NULL
};
static const int vp9_arg_ctrl_map[] = {
@@ -480,6 +483,9 @@
&frame_parallel_decoding, &aq_mode, &frame_periodic_boost,
&noise_sens, &tune_content, &input_color_space,
&min_gf_interval, &max_gf_interval,
+#if CONFIG_VP9_HIGHBITDEPTH
+ &bitdeptharg, &inbitdeptharg,
+#endif // CONFIG_VP9_HIGHBITDEPTH
NULL
};
static const int vp10_arg_ctrl_map[] = {