summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp8/decoder/decodframe.c2
-rw-r--r--vp9/common/vp9_convolve.c8
-rw-r--r--vp9/encoder/vp9_encodeframe.c6
-rw-r--r--vp9/encoder/vp9_rdopt.c16
-rw-r--r--vp9/vp9_cx_iface.c3
5 files changed, 18 insertions, 17 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 51eeb02bf..0050c11c1 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -1026,7 +1026,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
const unsigned char *clear = data;
if (pbi->decrypt_cb)
{
- int n = data_end - data;
+ int n = (int)(data_end - data);
if (n > 10) n = 10;
pbi->decrypt_cb(pbi->decrypt_state, data, clear_buffer, n);
clear = clear_buffer;
diff --git a/vp9/common/vp9_convolve.c b/vp9/common/vp9_convolve.c
index 94231a174..abedf6b27 100644
--- a/vp9/common/vp9_convolve.c
+++ b/vp9/common/vp9_convolve.c
@@ -35,7 +35,7 @@ static void convolve_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
for (y = 0; y < h; ++y) {
/* Initial phase offset */
- int x_q4 = (filter_x0 - filter_x_base) / taps;
+ int x_q4 = (int)(filter_x0 - filter_x_base) / taps;
for (x = 0; x < w; ++x) {
/* Per-pixel src offset */
@@ -76,7 +76,7 @@ static void convolve_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride,
for (y = 0; y < h; ++y) {
/* Initial phase offset */
- int x_q4 = (filter_x0 - filter_x_base) / taps;
+ int x_q4 = (int)(filter_x0 - filter_x_base) / taps;
for (x = 0; x < w; ++x) {
/* Per-pixel src offset */
@@ -118,7 +118,7 @@ static void convolve_vert_c(const uint8_t *src, ptrdiff_t src_stride,
for (x = 0; x < w; ++x) {
/* Initial phase offset */
- int y_q4 = (filter_y0 - filter_y_base) / taps;
+ int y_q4 = (int)(filter_y0 - filter_y_base) / taps;
for (y = 0; y < h; ++y) {
/* Per-pixel src offset */
@@ -160,7 +160,7 @@ static void convolve_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride,
for (x = 0; x < w; ++x) {
/* Initial phase offset */
- int y_q4 = (filter_y0 - filter_y_base) / taps;
+ int y_q4 = (int)(filter_y0 - filter_y_base) / taps;
for (y = 0; y < h; ++y) {
/* Per-pixel src offset */
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 44ab02d2e..3b92a3905 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -936,7 +936,7 @@ static void copy_partitioning(VP9_COMP *cpi, MODE_INFO **mi_8x8,
for (block_col = 0; block_col < 8; ++block_col) {
MODE_INFO * prev_mi = prev_mi_8x8[block_row * mis + block_col];
BLOCK_SIZE sb_type = prev_mi ? prev_mi->mbmi.sb_type : 0;
- int offset;
+ ptrdiff_t offset;
if (prev_mi) {
offset = prev_mi - cm->prev_mi;
@@ -1044,9 +1044,9 @@ static void fill_variance(var *v, int64_t s2, int64_t s, int c) {
v->sum_error = s;
v->count = c;
if (c > 0)
- v->variance = 256
+ v->variance = (int)(256
* (v->sum_square_error - v->sum_error * v->sum_error / v->count)
- / v->count;
+ / v->count);
else
v->variance = 0;
}
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 44d9194b1..30137948e 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -369,8 +369,8 @@ static void model_rd_from_var_lapndz(int var, int n, int qstep,
double s2 = (double) var / n;
double x = qstep / sqrt(s2);
model_rd_norm(x, &R, &D);
- *rate = ((n << 8) * R + 0.5);
- *dist = (var * D + 0.5);
+ *rate = (int)((n << 8) * R + 0.5);
+ *dist = (int)(var * D + 0.5);
}
vp9_clear_system_state();
}
@@ -397,7 +397,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
pd->dequant[1] >> 3, &rate, &dist);
rate_sum += rate;
- dist_sum += dist;
+ dist_sum += (int)dist;
}
*out_rate_sum = rate_sum;
@@ -868,8 +868,8 @@ static void choose_txfm_size_from_modelrd(VP9_COMP *cpi, MACROBLOCK *x,
}
}
for (n = TX_4X4; n <= max_txfm_size; n++) {
- rd[n][0] = (scale_rd[n] * rd[n][0]);
- rd[n][1] = (scale_rd[n] * rd[n][1]);
+ rd[n][0] = (int64_t)(scale_rd[n] * rd[n][0]);
+ rd[n][1] = (int64_t)(scale_rd[n] * rd[n][1]);
}
if (max_txfm_size == TX_32X32 &&
@@ -2906,7 +2906,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
unsigned int thresh_ac;
// The encode_breakout input
unsigned int encode_breakout = x->encode_breakout << 4;
- int max_thresh = 36000;
+ unsigned int max_thresh = 36000;
// Use extreme low threshold for static frames to limit skipping.
if (cpi->enable_encode_breakout == 2)
@@ -3253,7 +3253,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
assert(!"Invalid Reference frame");
}
}
- if (cpi->mode_skip_mask & (1 << mode_index))
+ if (cpi->mode_skip_mask & ((int64_t)1 << mode_index))
continue;
}
@@ -3450,7 +3450,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
// Disable intra modes other than DC_PRED for blocks with low variance
// Threshold for intra skipping based on source variance
// TODO(debargha): Specialize the threshold for super block sizes
- static const int skip_intra_var_thresh[BLOCK_SIZES] = {
+ static const unsigned int skip_intra_var_thresh[BLOCK_SIZES] = {
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
};
if ((cpi->sf.mode_search_skip_flags & FLAG_SKIP_INTRA_LOWVAR) &&
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 48866d22e..28d8f3637 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -589,7 +589,8 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx,
static int write_superframe_index(vpx_codec_alg_priv_t *ctx) {
uint8_t marker = 0xc0;
- int mag, mask, index_sz;
+ unsigned int mask;
+ int mag, index_sz;
assert(ctx->pending_frame_count);
assert(ctx->pending_frame_count <= 8);