Revision 849f1035 libavutil/bswap.h

View differences:

libavutil/bswap.h
37 37
#endif
38 38

  
39 39
#if defined(ARCH_X86)
40
static always_inline uint16_t bswap_16(uint16_t x)
40
static av_always_inline uint16_t bswap_16(uint16_t x)
41 41
{
42 42
  __asm("rorw $8, %0"   :
43 43
        LEGACY_REGS (x) :
......
45 45
    return x;
46 46
}
47 47

  
48
static always_inline uint32_t bswap_32(uint32_t x)
48
static av_always_inline uint32_t bswap_32(uint32_t x)
49 49
{
50 50
#if __CPU__ != 386
51 51
 __asm("bswap   %0":
......
82 82

  
83 83
#elif defined(ARCH_SH4)
84 84

  
85
static always_inline uint16_t bswap_16(uint16_t x) {
85
static av_always_inline uint16_t bswap_16(uint16_t x) {
86 86
        __asm__("swap.b %0,%0":"=r"(x):"0"(x));
87 87
        return x;
88 88
}
89 89

  
90
static always_inline uint32_t bswap_32(uint32_t x) {
90
static av_always_inline uint32_t bswap_32(uint32_t x) {
91 91
        __asm__(
92 92
        "swap.b %0,%0\n"
93 93
        "swap.w %0,%0\n"
......
110 110
}
111 111
#else
112 112

  
113
static always_inline uint16_t bswap_16(uint16_t x){
113
static av_always_inline uint16_t bswap_16(uint16_t x){
114 114
    return (x>>8) | (x<<8);
115 115
}
116 116

  
117 117
#ifdef ARCH_ARM
118
static always_inline uint32_t bswap_32(uint32_t x){
118
static av_always_inline uint32_t bswap_32(uint32_t x){
119 119
    uint32_t t;
120 120
    __asm__ (
121 121
      "eor %1, %0, %0, ror #16 \n\t"
......
126 126
    return x;
127 127
}
128 128
#else
129
static always_inline uint32_t bswap_32(uint32_t x){
129
static av_always_inline uint32_t bswap_32(uint32_t x){
130 130
    x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
131 131
    return (x>>16) | (x<<16);
132 132
}

Also available in: Unified diff