Fix weird MSVC compilation error
For some reason, MSVC doesn't appreciate uint8 math with enum constants
This commit is contained in:
parent
6681f2563b
commit
453f32ae0a
1 changed files with 4 additions and 6 deletions
|
@ -866,12 +866,10 @@ static void _scale_cubic(const uint8_t *__restrict p_src, uint8_t *__restrict p_
|
||||||
|
|
||||||
template <int CC, typename T>
|
template <int CC, typename T>
|
||||||
static void _scale_bilinear(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
|
static void _scale_bilinear(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height) {
|
||||||
enum {
|
constexpr uint32_t FRAC_BITS = 8;
|
||||||
FRAC_BITS = 8,
|
constexpr uint32_t FRAC_LEN = (1 << FRAC_BITS);
|
||||||
FRAC_LEN = (1 << FRAC_BITS),
|
constexpr uint32_t FRAC_HALF = (FRAC_LEN >> 1);
|
||||||
FRAC_HALF = (FRAC_LEN >> 1),
|
constexpr uint32_t FRAC_MASK = FRAC_LEN - 1;
|
||||||
FRAC_MASK = FRAC_LEN - 1
|
|
||||||
};
|
|
||||||
|
|
||||||
for (uint32_t i = 0; i < p_dst_height; i++) {
|
for (uint32_t i = 0; i < p_dst_height; i++) {
|
||||||
// Add 0.5 in order to interpolate based on pixel center
|
// Add 0.5 in order to interpolate based on pixel center
|
||||||
|
|
Loading…
Reference in a new issue