diff options
author | qinxialei <xialeiqin@gmail.com> | 2021-04-22 11:20:18 +0800 |
---|---|---|
committer | qinxialei <xialeiqin@gmail.com> | 2021-04-22 11:20:18 +0800 |
commit | 81ce37eb93e8ce442ecb1855a4e7166628128ac7 (patch) | |
tree | 2af6329f74f88ce090d08c61db5fb4bed8656584 /src/utils/common.h | |
parent | 4dab0c756a3cdd65b43470a4cca835422b32ca6e (diff) | |
parent | 2381d803c76105f44717d75f089ec37f51e5cfe4 (diff) | |
download | libgav1-81ce37eb93e8ce442ecb1855a4e7166628128ac7.tar.gz libgav1-81ce37eb93e8ce442ecb1855a4e7166628128ac7.tar.bz2 libgav1-81ce37eb93e8ce442ecb1855a4e7166628128ac7.zip |
Update upstream source from tag 'upstream/0.16.3'
Update to upstream version '0.16.3'
with Debian dir a433e04a69210eb8fcdd6089240e161eb33f0590
Diffstat (limited to 'src/utils/common.h')
-rw-r--r-- | src/utils/common.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/common.h b/src/utils/common.h index ae43c2b..2e599f0 100644 --- a/src/utils/common.h +++ b/src/utils/common.h @@ -30,7 +30,6 @@ #include <cassert> #include <cstddef> #include <cstdint> -#include <cstdlib> #include <cstring> #include <type_traits> @@ -131,7 +130,7 @@ inline int CountLeadingZeros(uint64_t n) { #if defined(HAVE_BITSCANREVERSE64) const unsigned char bit_set = _BitScanReverse64(&first_set_bit, static_cast<unsigned __int64>(n)); -#else // !defined(HAVE_BITSCANREVERSE64) +#else // !defined(HAVE_BITSCANREVERSE64) const auto n_hi = static_cast<unsigned long>(n >> 32); // NOLINT(runtime/int) if (n_hi != 0) { const unsigned char bit_set = _BitScanReverse(&first_set_bit, n_hi); @@ -376,7 +375,7 @@ constexpr bool IsDirectionalMode(PredictionMode mode) { // behavior and result apply to other CPUs' SIMD instructions. inline int GetRelativeDistance(const unsigned int a, const unsigned int b, const unsigned int order_hint_shift_bits) { - const int diff = a - b; + const int diff = static_cast<int>(a) - static_cast<int>(b); assert(order_hint_shift_bits <= 31); if (order_hint_shift_bits == 0) { assert(a == 0); |