00001 /* 00002 * This file is part of FFmpeg. 00003 * 00004 * FFmpeg is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * FFmpeg is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with FFmpeg; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 */ 00018 00019 #ifndef AVUTIL_AVR32_BSWAP_H 00020 #define AVUTIL_AVR32_BSWAP_H 00021 00022 #include <stdint.h> 00023 #include "config.h" 00024 #include "libavutil/attributes.h" 00025 00026 #if HAVE_INLINE_ASM 00027 00028 #define av_bswap16 av_bswap16 00029 static av_always_inline av_const uint16_t av_bswap16(uint16_t x) 00030 { 00031 __asm__ ("swap.bh %0" : "+r"(x)); 00032 return x; 00033 } 00034 00035 #define av_bswap32 av_bswap32 00036 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) 00037 { 00038 __asm__ ("swap.b %0" : "+r"(x)); 00039 return x; 00040 } 00041 00042 #endif /* HAVE_INLINE_ASM */ 00043 00044 #endif /* AVUTIL_AVR32_BSWAP_H */