Commit 95233f9e authored by Martin Storsjö's avatar Martin Storsjö

Avoid warnings about variables being truncated by changing the type of variables

parent 61a03c29
......@@ -58,7 +58,7 @@ static void backup2x8(pixel dst[3][8][2],
const ptrdiff_t src_stride[2], int x_off,
const enum Dav1dPixelLayout layout)
{
for (int y = 0, y_off = 0; y < 8; y++, y_off += PXSTRIDE(src_stride[0]))
for (ptrdiff_t y = 0, y_off = 0; y < 8; y++, y_off += PXSTRIDE(src_stride[0]))
pixel_copy(dst[0][y], &src[0][y_off + x_off - 2], 2);
if (layout == DAV1D_PIXEL_LAYOUT_I400) return;
......@@ -66,7 +66,7 @@ static void backup2x8(pixel dst[3][8][2],
const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
x_off >>= ss_hor;
for (int y = 0, y_off = 0; y < (8 >> ss_ver); y++, y_off += PXSTRIDE(src_stride[1])) {
for (ptrdiff_t y = 0, y_off = 0; y < (8 >> ss_ver); y++, y_off += PXSTRIDE(src_stride[1])) {
pixel_copy(dst[1][y], &src[1][y_off + x_off - 2], 2);
pixel_copy(dst[2][y], &src[2][y_off + x_off - 2], 2);
}
......
......@@ -107,7 +107,7 @@ static void backup_lpf(const Dav1dFrameContext *const f,
void bytefn(dav1d_lr_copy_lpf)(Dav1dFrameContext *const f,
/*const*/ pixel *const src[3], const int sby)
{
const ptrdiff_t offset = 8 * !!sby;
const int offset = 8 * !!sby;
const ptrdiff_t *const src_stride = f->cur.stride;
const ptrdiff_t lr_stride = ((f->sr_cur.p.p.w + 31) & ~31) * sizeof(pixel);
......@@ -132,7 +132,7 @@ void bytefn(dav1d_lr_copy_lpf)(Dav1dFrameContext *const f,
const int h = (f->cur.p.h + ss_ver) >> ss_ver;
const int w = f->bw << (2 - ss_hor);
const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h - 1);
const ptrdiff_t offset_uv = offset >> ss_ver;
const int offset_uv = offset >> ss_ver;
const int y_stripe =
(sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
......@@ -277,7 +277,7 @@ static void lr_sbrow(const Dav1dFrameContext *const f, pixel *p, const int y,
void bytefn(dav1d_lr_sbrow)(Dav1dFrameContext *const f, pixel *const dst[3],
const int sby)
{
const ptrdiff_t offset_y = 8 * !!sby;
const int offset_y = 8 * !!sby;
const ptrdiff_t *const dst_stride = f->sr_cur.p.stride;
const int restore_planes =
......@@ -299,7 +299,7 @@ void bytefn(dav1d_lr_sbrow)(Dav1dFrameContext *const f, pixel *const dst[3],
const int h = (f->sr_cur.p.p.h + ss_ver) >> ss_ver;
const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h);
const ptrdiff_t offset_uv = offset_y >> ss_ver;
const int offset_uv = offset_y >> ss_ver;
const int y_stripe =
(sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
if (restore_planes & LR_RESTORE_U)
......
......@@ -1247,7 +1247,7 @@ int bytefn(dav1d_recon_b_inter)(Dav1dTileContext *const t, const enum BlockSize
// chroma prediction
if (is_sub8x8) {
assert(ss_hor == 1);
int h_off = 0, v_off = 0;
ptrdiff_t h_off = 0, v_off = 0;
if (bw4 == 1 && bh4 == ss_ver) {
for (int pl = 0; pl < 2; pl++) {
res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
......
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