Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-02-07 15:44:24 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2019-02-13 01:46:50 +0300
commit35b1cde28a153b54e3534b8bae75319197dca2f2 (patch)
tree045cfbdc753e1fc8344ad83be3d438a3febad401 /src/mc_tmpl.c
parent4c21c9312d31300401554404b188478f8f25f404 (diff)
Add casts to silence warnings about intended type conversions/shortenings
Diffstat (limited to 'src/mc_tmpl.c')
-rw-r--r--src/mc_tmpl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mc_tmpl.c b/src/mc_tmpl.c
index 77f24dd..2057db8 100644
--- a/src/mc_tmpl.c
+++ b/src/mc_tmpl.c
@@ -829,20 +829,21 @@ static void emu_edge_c(const intptr_t bw, const intptr_t bh,
const pixel *ref, const ptrdiff_t ref_stride)
{
// find offset in reference of visible block to copy
- ref += iclip(y, 0, ih - 1) * PXSTRIDE(ref_stride) + iclip(x, 0, iw - 1);
+ ref += iclip((int) y, 0, (int) ih - 1) * PXSTRIDE(ref_stride) +
+ iclip((int) x, 0, (int) iw - 1);
// number of pixels to extend (left, right, top, bottom)
- const int left_ext = iclip(-x, 0, bw - 1);
- const int right_ext = iclip(x + bw - iw, 0, bw - 1);
+ const int left_ext = iclip((int) -x, 0, (int) bw - 1);
+ const int right_ext = iclip((int) (x + bw - iw), 0, (int) bw - 1);
assert(left_ext + right_ext < bw);
- const int top_ext = iclip(-y, 0, bh - 1);
- const int bottom_ext = iclip(y + bh - ih, 0, bh - 1);
+ const int top_ext = iclip((int) -y, 0, (int) bh - 1);
+ const int bottom_ext = iclip((int) (y + bh - ih), 0, (int) bh - 1);
assert(top_ext + bottom_ext < bh);
// copy visible portion first
pixel *blk = dst + top_ext * PXSTRIDE(dst_stride);
- const int center_w = bw - left_ext - right_ext;
- const int center_h = bh - top_ext - bottom_ext;
+ const int center_w = (int) (bw - left_ext - right_ext);
+ const int center_h = (int) (bh - top_ext - bottom_ext);
for (int y = 0; y < center_h; y++) {
pixel_copy(blk + left_ext, ref, center_w);
// extend left edge for this line