1 /* libasf - An Advanced Systems Format media file parser
2 * Copyright (C) 2006-2010 Juho Vähä-Herttua
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 # define INLINE __inline__
28 static INLINE
uint16_t
29 GetWLE(const void *pointer
)
31 const uint8_t *data
= pointer
;
32 return ((uint16_t)data
[1] << 8) |
36 static INLINE
uint32_t
37 GetDWLE(const void *pointer
)
39 const uint8_t *data
= pointer
;
40 return ((uint32_t)data
[3] << 24) |
41 ((uint32_t)data
[2] << 16) |
42 ((uint32_t)data
[1] << 8) |
46 static INLINE
uint64_t
47 GetQWLE(const void *pointer
)
49 const uint8_t *data
= pointer
;
50 return ((uint64_t)data
[7] << 56) |
51 ((uint64_t)data
[6] << 48) |
52 ((uint64_t)data
[5] << 40) |
53 ((uint64_t)data
[4] << 32) |
54 ((uint64_t)data
[3] << 24) |
55 ((uint64_t)data
[2] << 16) |
56 ((uint64_t)data
[1] << 8) |