ref: fdc549994a5f6eb3ba24fd18d3b1712199ee4755
parent: 71e88f903d04693b18bf0eff3917544525452649
author: Johann <[email protected]>
date: Mon Jun 1 06:53:46 EDT 2015
Cast variance reference output The larger internal variables are required for the intermediates but RoundHighBitDepth brings them down to uint32_t/unsigned int. Fixes type warnings in visual studio. Change-Id: I48d35284d6cbde330ccdc1f46b6215a645d5eb00
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -96,8 +96,8 @@
}
}
RoundHighBitDepth(bit_depth, &se, &sse);
- *sse_ptr = sse;
- return sse - (((int64_t) se * se) >> (l2w + l2h));
+ *sse_ptr = (uint32_t) sse;
+ return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h)));
}
static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
@@ -142,8 +142,8 @@
}
}
RoundHighBitDepth(bit_depth, &se, &sse);
- *sse_ptr = sse;
- return sse - (((int64_t) se * se) >> (l2w + l2h));
+ *sse_ptr = (unsigned int) sse;
+ return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h)));
}
typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);
@@ -510,8 +510,8 @@
}
}
RoundHighBitDepth(bit_depth, &se, &sse);
- *sse_ptr = sse;
- return sse - (((int64_t) se * se) >> (l2w + l2h));
+ *sse_ptr = (unsigned int) sse;
+ return (unsigned int) (sse - (((int64_t) se * se) >> (l2w + l2h)));
}
template<typename SubpelVarianceFunctionType>