blob: ee03ac1b01f82cd475a22d0ba1eac29d3b11e580 (
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
32
33
34
35
|
$NetBSD: patch-nb,v 1.3 2009/09/01 02:57:26 dsainty Exp $
# reported upstream as:
# https://bugzilla.mozilla.org/show_bug.cgi?id=512792
--- 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,27 @@ 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] ;
+}
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+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__ */
|