diff --git a/README.chromium b/README.chromium index 23c10d795..090967573 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1708 +Version: 1709 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index fc5654115..82db1d6f4 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1708 +#define LIBYUV_VERSION 1709 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/row_common.cc b/source/row_common.cc index a598ee592..2bbc5adbf 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -2762,6 +2762,13 @@ void ARGBPolynomialRow_C(const uint8_t* src_argb, // simply extract the low bits of the exponent and the high // bits of the mantissa from our float and we're done. +// Work around GCC 7 punning warning -Wstrict-aliasing +#if defined(__GNUC__) +typedef uint32_t __attribute__((__may_alias__)) uint32_alias_t; +#else +typedef uint32_t uint32_alias_t; +#endif + void HalfFloatRow_C(const uint16_t* src, uint16_t* dst, float scale, @@ -2770,7 +2777,7 @@ void HalfFloatRow_C(const uint16_t* src, float mult = 1.9259299444e-34f * scale; for (i = 0; i < width; ++i) { float value = src[i] * mult; - dst[i] = (uint16_t)((*(uint32_t*)&value) >> 13); + dst[i] = (uint16_t)((*(const uint32_alias_t*)&value) >> 13); } }