]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/x86/bswap.h
vdpau: deprecate old codec-specific pixel formats
[ffmpeg] / libavutil / x86 / bswap.h
index 6840b632cbd4d9da8f7e6fd8b6f6960d506166dd..c73be9af81efaaaea8bd75997ec610d4cbdcc945 100644 (file)
@@ -28,6 +28,8 @@
 #include "config.h"
 #include "libavutil/attributes.h"
 
+#if HAVE_INLINE_ASM
+
 #if !AV_GCC_VERSION_AT_LEAST(4,1)
 #define av_bswap16 av_bswap16
 static av_always_inline av_const unsigned av_bswap16(unsigned x)
@@ -41,14 +43,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x)
 #define av_bswap32 av_bswap32
 static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
 {
-#if HAVE_BSWAP
     __asm__("bswap   %0" : "+r" (x));
-#else
-    __asm__("rorw    $8,  %w0 \n\t"
-            "rorl    $16, %0  \n\t"
-            "rorw    $8,  %w0"
-            : "+r"(x));
-#endif
     return x;
 }
 
@@ -62,4 +57,5 @@ static inline uint64_t av_const av_bswap64(uint64_t x)
 #endif
 #endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */
 
+#endif /* HAVE_INLINE_ASM */
 #endif /* AVUTIL_X86_BSWAP_H */