~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavutil/x86/bswap.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "config.h"
29
29
#include "libavutil/attributes.h"
30
30
 
 
31
#if !AV_GCC_VERSION_AT_LEAST(4,1)
31
32
#define av_bswap16 av_bswap16
32
33
static av_always_inline av_const unsigned av_bswap16(unsigned x)
33
34
{
34
35
    __asm__("rorw $8, %w0" : "+r"(x));
35
36
    return x;
36
37
}
 
38
#endif /* !AV_GCC_VERSION_AT_LEAST(4,1) */
37
39
 
 
40
#if !AV_GCC_VERSION_AT_LEAST(4,5)
38
41
#define av_bswap32 av_bswap32
39
42
static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
40
43
{
41
 
#if HAVE_BSWAP
42
44
    __asm__("bswap   %0" : "+r" (x));
43
 
#else
44
 
    __asm__("rorw    $8,  %w0 \n\t"
45
 
            "rorl    $16, %0  \n\t"
46
 
            "rorw    $8,  %w0"
47
 
            : "+r"(x));
48
 
#endif
49
45
    return x;
50
46
}
51
47
 
57
53
    return x;
58
54
}
59
55
#endif
 
56
#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */
60
57
 
61
58
#endif /* AVUTIL_X86_BSWAP_H */