Skip to content

Commit

Permalink
Added define C++20
Browse files Browse the repository at this point in the history
I use C++17.  VVENC and X265 aren't optimized for C++20.
  • Loading branch information
Jamaika1 authored Dec 1, 2024
1 parent 5385aa7 commit f5122d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libheif/codecs/uncompressed/decoder_abstract.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ void AbstractDecoder::memcpy_to_native_endian(uint8_t* dst, uint32_t value, uint
*dst = static_cast<uint8_t>(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<uint8_t>((value >> (i * 8)) & 0xFF);
}
}
#endif
else {
for (uint32_t i = 0; i < bytes_per_sample; i++) {
dst[i] = static_cast<uint8_t>((value >> (i * 8)) & 0xFF);
Expand Down

0 comments on commit f5122d9

Please sign in to comment.