godot/thirdparty/libwebp/src/utils/endian_inl_utils.h

// Copyright 2014 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
// -----------------------------------------------------------------------------
//
// Endian related functions.

#ifndef WEBP_UTILS_ENDIAN_INL_UTILS_H_
#define WEBP_UTILS_ENDIAN_INL_UTILS_H_

#ifdef HAVE_CONFIG_H
#include "src/webp/config.h"
#endif

#include "src/dsp/dsp.h"
#include "src/webp/types.h"

#if defined(WORDS_BIGENDIAN)
#define HToLE32
#define HToLE16
#else
#define HToLE32(x)
#define HToLE16(x)
#endif

#if !defined(HAVE_CONFIG_H)
#if LOCAL_GCC_PREREQ(4,8) || __has_builtin(__builtin_bswap16)
#define HAVE_BUILTIN_BSWAP16
#endif
#if LOCAL_GCC_PREREQ(4,3) || __has_builtin(__builtin_bswap32)
#define HAVE_BUILTIN_BSWAP32
#endif
#if LOCAL_GCC_PREREQ(4,3) || __has_builtin(__builtin_bswap64)
#define HAVE_BUILTIN_BSWAP64
#endif
#endif  // !HAVE_CONFIG_H

static WEBP_INLINE uint16_t BSwap16(uint16_t x) {}

static WEBP_INLINE uint32_t BSwap32(uint32_t x) {}

static WEBP_INLINE uint64_t BSwap64(uint64_t x) {}

#endif  // WEBP_UTILS_ENDIAN_INL_UTILS_H_