~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavutil/arm/bswap.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#ifdef __ARMCC_VERSION
27
27
 
28
28
#if HAVE_ARMV6
29
 
#define av_bswap16 av_bswap16
30
 
static av_always_inline av_const unsigned av_bswap16(unsigned x)
31
 
{
32
 
    __asm { rev16 x, x }
33
 
    return x;
34
 
}
35
 
 
36
29
#define av_bswap32 av_bswap32
37
30
static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
38
31
{
42
35
 
43
36
#elif HAVE_INLINE_ASM
44
37
 
45
 
#if HAVE_ARMV6
 
38
#if HAVE_ARMV6_INLINE
46
39
#define av_bswap16 av_bswap16
47
40
static av_always_inline av_const unsigned av_bswap16(unsigned x)
48
41
{
55
48
#define av_bswap32 av_bswap32
56
49
static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
57
50
{
58
 
#if HAVE_ARMV6
 
51
#if HAVE_ARMV6_INLINE
59
52
    __asm__("rev %0, %0" : "+r"(x));
60
53
#else
61
54
    uint32_t t;
64
57
             "mov %0, %0, ror #8      \n\t"
65
58
             "eor %0, %0, %1, lsr #8  \n\t"
66
59
             : "+r"(x), "=&r"(t));
67
 
#endif /* HAVE_ARMV6 */
 
60
#endif /* HAVE_ARMV6_INLINE */
68
61
    return x;
69
62
}
70
63
#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */