blob: fbb0e40708d1b007f1e121e545aa4c45bf20dec6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-nb,v 1.1 2009/08/26 21:07:32 martin Exp $
# not reported upstream yet
--- media/liboggz/src/liboggz/oggz_byteorder.h.orig 2009-08-26 22:28:18.000000000 +0200
+++ media/liboggz/src/liboggz/oggz_byteorder.h 2009-08-26 22:41:39.000000000 +0200
@@ -123,4 +123,24 @@ int32_be_at (unsigned char *c)
return (c [0] << 24) + (c [1] << 16) + (c [2] << 8) + c [3] ;
}
+static ogg_uint32_t
+_le_32_at (unsigned char *c)
+{
+ return (c [3] << 24) + (c [2] << 16) + (c [1] << 8) + c [0] ;
+}
+
+static uint64_t
+_le_64_at (unsigned char *c)
+{
+ return (uint64_t)((uint64_t)c[7] << 56) + ((uint64_t)c[6] << 48)
+ + ((uint64_t)c[5] << 40) + ((uint64_t)c[4] << 32)
+ + (c [3] << 24) + (c [2] << 16) + (c [1] << 8) + c [0] ;
+}
+
+static ogg_uint16_t
+_be_16_at (unsigned char *c)
+{
+ return (c [0] << 8) + c [1] ;
+}
+
#endif /* __OGGZ_BYTEORDER_H__ */
|