Commit a967ebb7 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Fix msvc compiler warnings

Change-Id: I7ce37b2e43b4607c77515d802a6ad330047fc4c2
parent de750837
......@@ -154,22 +154,18 @@ void av1_alloc_restoration_buffers(AV1_COMMON *cm) {
for (int p = 0; p < MAX_MB_PLANE; ++p) {
const int is_uv = p > 0;
const int ss_x = is_uv && cm->subsampling_x;
const int plane_w = ((frame_w + ss_x) >> ss_x) + 2 * RESTORATION_EXTRA_HORZ;
const int align_bits = 5; // align for efficiency
const int stride = ALIGN_POWER_OF_TWO(plane_w, align_bits);
const int stride = ALIGN_POWER_OF_TWO(plane_w, 5);
const int buf_size = num_stripes * stride * RESTORATION_CTX_VERT
<< use_highbd;
RestorationStripeBoundaries *boundaries = &cm->rst_info[p].boundaries;
aom_free(boundaries->stripe_boundary_above);
aom_free(boundaries->stripe_boundary_below);
CHECK_MEM_ERROR(cm, boundaries->stripe_boundary_above,
(uint8_t *)aom_memalign(1 << align_bits, buf_size));
(uint8_t *)aom_memalign(32, buf_size));
CHECK_MEM_ERROR(cm, boundaries->stripe_boundary_below,
(uint8_t *)aom_memalign(1 << align_bits, buf_size));
(uint8_t *)aom_memalign(32, buf_size));
boundaries->stripe_boundary_stride = stride;
}
......
......@@ -278,7 +278,7 @@ static void restore_boundary_column(uint8_t *dst8, int dst_stride,
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst8);
for (int i = 0; i < h; i++) dst16[i * dst_stride] = buf[i];
} else {
for (int i = 0; i < h; i++) dst8[i * dst_stride] = buf[i];
for (int i = 0; i < h; i++) dst8[i * dst_stride] = (uint8_t)(buf[i]);
}
}
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
......@@ -1134,7 +1134,7 @@ void apply_selfguided_restoration_c(const uint8_t *dat8, int width, int height,
if (highbd)
*CONVERT_TO_SHORTPTR(dst8ij) = out;
else
*dst8ij = out;
*dst8ij = (uint8_t)out;
}
}
}
......
......@@ -3004,7 +3004,7 @@ static int rd_pick_palette_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
// TODO(huisu@google.com): Try to avoid duplicate computation in cases
// where the dominant colors and the k-means results are similar.
for (n = AOMMIN(colors, PALETTE_MAX_SIZE); n >= 2; --n) {
for (i = 0; i < n; ++i) centroids[i] = top_colors[i];
for (i = 0; i < n; ++i) centroids[i] = (float)(top_colors[i]);
palette_rd_y(cpi, x, mbmi, bsize, palette_ctx, dc_mode_cost, data,
centroids, n,
#if CONFIG_PALETTE_DELTA_ENCODING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment