/*1* This file is part of FFmpeg.2*3* FFmpeg is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* FFmpeg is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with FFmpeg; if not, write to the Free Software15* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16*/1718#ifndef AVUTIL_AARCH64_BSWAP_H19#define AVUTIL_AARCH64_BSWAP_H2021#include <stdint.h>22#include "config.h"23#include "libavutil/attributes.h"2425#if HAVE_INLINE_ASM2627#define av_bswap16 av_bswap1628static av_always_inline av_const unsigned av_bswap16(unsigned x)29{30__asm__("rev16 %w0, %w0" : "+r"(x));31return x;32}3334#define av_bswap32 av_bswap3235static av_always_inline av_const uint32_t av_bswap32(uint32_t x)36{37__asm__("rev %w0, %w0" : "+r"(x));38return x;39}4041#define av_bswap64 av_bswap6442static av_always_inline av_const uint64_t av_bswap64(uint64_t x)43{44__asm__("rev %0, %0" : "+r"(x));45return x;46}4748#endif /* HAVE_INLINE_ASM */49#endif /* AVUTIL_AARCH64_BSWAP_H */505152