From f5122d9a79fb8e53d606480a05689f4055ea6791 Mon Sep 17 00:00:00 2001 From: Jamaika1 Date: Sun, 1 Dec 2024 11:42:53 +0100 Subject: [PATCH] Added define C++20 I use C++17. VVENC and X265 aren't optimized for C++20. --- libheif/codecs/uncompressed/decoder_abstract.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libheif/codecs/uncompressed/decoder_abstract.cc b/libheif/codecs/uncompressed/decoder_abstract.cc index 206a5aa714..0857b47655 100644 --- a/libheif/codecs/uncompressed/decoder_abstract.cc +++ b/libheif/codecs/uncompressed/decoder_abstract.cc @@ -70,11 +70,13 @@ void AbstractDecoder::memcpy_to_native_endian(uint8_t* dst, uint32_t value, uint *dst = static_cast(value); return; } +#if (__cplusplus > 201907L) else if (std::endian::native == std::endian::big) { for (uint32_t i = 0; i < bytes_per_sample; i++) { dst[bytes_per_sample - 1 - i] = static_cast((value >> (i * 8)) & 0xFF); } } +#endif else { for (uint32_t i = 0; i < bytes_per_sample; i++) { dst[i] = static_cast((value >> (i * 8)) & 0xFF);