diff --git a/src/dec/buffer.c b/src/dec/buffer.c index 8f3c6b55..668b4196 100644 --- a/src/dec/buffer.c +++ b/src/dec/buffer.c @@ -74,8 +74,7 @@ static VP8StatusCode AllocateBuffer(WebPDecBuffer* const buffer) { if (!buffer->is_external_memory && buffer->private_memory == NULL) { uint8_t* output; int uv_stride = 0, a_stride = 0; - int uv_size = 0; - uint64_t a_size = 0, total_size; + uint64_t uv_size = 0, a_size = 0, total_size; // We need memory and it hasn't been allocated yet. // => initialize output buffer, now that dimensions are known. const int stride = w * kModeBpp[mode]; @@ -108,10 +107,10 @@ static VP8StatusCode AllocateBuffer(WebPDecBuffer* const buffer) { buf->y_size = (int)size; buf->u = output + size; buf->u_stride = uv_stride; - buf->u_size = uv_size; + buf->u_size = (int)uv_size; buf->v = output + size + uv_size; buf->v_stride = uv_stride; - buf->v_size = uv_size; + buf->v_size = (int)uv_size; if (mode == MODE_YUVA) { buf->a = output + size + 2 * uv_size; } diff --git a/src/dec/io.c b/src/dec/io.c index 18214519..84a0882c 100644 --- a/src/dec/io.c +++ b/src/dec/io.c @@ -282,7 +282,7 @@ static WEBP_INLINE void ImportRow(const uint8_t* const src, const int32_t frac = base * (-accum); wrk->frow[x_out] = (sum + base) * wrk->x_sub - frac; // fresh fractional start for next pixel - sum = MULT(frac, wrk->fx_scale); + sum = (int)MULT(frac, wrk->fx_scale); } } } else { // simple bilinear interpolation @@ -308,7 +308,7 @@ static void ExportRow(WebPRescaler* const wrk) { const int yscale = wrk->fy_scale * (-wrk->y_accum); assert(wrk->y_accum <= 0); for (x_out = 0; x_out < wrk->dst_width; ++x_out) { - const int frac = MULT(wrk->frow[x_out], yscale); + const int frac = (int)MULT(wrk->frow[x_out], yscale); const int v = (int)MULT(wrk->irow[x_out] - frac, wrk->fxy_scale); wrk->dst[x_out] = (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255; wrk->irow[x_out] = frac; // new fractional start diff --git a/src/dec/vp8.c b/src/dec/vp8.c index b37d87d5..bff372db 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -551,6 +551,7 @@ static void ParseResiduals(VP8Decoder* const dec, uint32_t non_zero_dc = 0; int x, y, ch; + nz_dc.i32 = nz_ac.i32 = 0; memset(dst, 0, 384 * sizeof(*dst)); if (!dec->is_i4x4_) { // parse DC int16_t dc[16] = { 0 };