Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00024 #ifndef AVUTIL_SH4_BSWAP_H
00025 #define AVUTIL_SH4_BSWAP_H
00026
00027 #include <stdint.h>
00028 #include "config.h"
00029 #include "libavutil/attributes.h"
00030
00031 #define bswap_16 bswap_16
00032 static av_always_inline av_const uint16_t bswap_16(uint16_t x)
00033 {
00034 __asm__("swap.b %0,%0" : "+r"(x));
00035 return x;
00036 }
00037
00038 #define bswap_32 bswap_32
00039 static av_always_inline av_const uint32_t bswap_32(uint32_t x)
00040 {
00041 __asm__("swap.b %0,%0\n"
00042 "swap.w %0,%0\n"
00043 "swap.b %0,%0\n"
00044 : "+r"(x));
00045 return x;
00046 }
00047
00048 #endif