Revision 1e65f62e libavutil/arm/bswap.h

View differences:

libavutil/arm/bswap.h
23 23
#include "config.h"
24 24
#include "libavutil/common.h"
25 25

  
26
#ifdef __ARMCC_VERSION
27

  
28
#if HAVE_ARMV6
29
#define bswap_16 bswap_16
30
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
31
{
32
    __asm { rev16 x, x }
33
    return x;
34
}
35

  
36
#define bswap_32 bswap_32
37
static av_always_inline av_const uint32_t bswap_32(uint32_t x)
38
{
39
    return __rev(x);
40
}
41
#endif /* HAVE_ARMV6 */
42

  
43
#else /* __ARMCC_VERSION */
44

  
26 45
#if HAVE_ARMV6
27 46
#define bswap_16 bswap_16
28 47
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
......
48 67
    return x;
49 68
}
50 69

  
70
#endif /* __ARMCC_VERSION */
71

  
51 72
#endif /* AVUTIL_ARM_BSWAP_H */

Also available in: Unified diff