summaryrefslogtreecommitdiff
path: root/plugins/gxvideo/swap.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gxvideo/swap.h')
-rw-r--r--plugins/gxvideo/swap.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/plugins/gxvideo/swap.h b/plugins/gxvideo/swap.h
deleted file mode 100644
index 06d23d39..00000000
--- a/plugins/gxvideo/swap.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <stdint.h>
-
-// byteswappings
-
-#define SWAP16(x) ({ uint16_t y=(x); (((y)>>8 & 0xff) | ((y)<<8 & 0xff00)); })
-#define SWAP32(x) ({ uint32_t y=(x); (((y)>>24 & 0xfful) | ((y)>>8 & 0xff00ul) | ((y)<<8 & 0xff0000ul) | ((y)<<24 & 0xff000000ul)); })
-
-// little endian config
-#define HOST2LE32(x) (x)
-#define HOST2BE32(x) SWAP32(x)
-#define LE2HOST32(x) (x)
-#define BE2HOST32(x) SWAP32(x)
-
-#define HOST2LE16(x) (x)
-#define HOST2BE16(x) SWAP16(x)
-#define LE2HOST16(x) (x)
-#define BE2HOST16(x) SWAP16(x)
-
-#define GETLEs16(X) ((int16_t)GETLE16((uint16_t *)X))
-#define GETLEs32(X) ((int16_t)GETLE32((uint16_t *)X))
-
-#define GETLE16(X) LE2HOST16(*(uint16_t *)X)
-#define GETLE32(X) LE2HOST32(*(uint32_t *)X)
-#define GETLE16D(X) ({uint32_t val = GETLE32(X); (val<<16 | val >> 16);})
-#define PUTLE16(X, Y) do{*((uint16_t *)X)=HOST2LE16((uint16_t)Y);}while(0)
-#define PUTLE32(X, Y) do{*((uint32_t *)X)=HOST2LE16((uint32_t)Y);}while(0)