blob: b286a081465e6f17b47ef0719ab417a4381ee2b4
1 | /*******************************************************************************# |
2 | # guvcview http://guvcview.sourceforge.net # |
3 | # # |
4 | # Paulo Assis <pj.assis@gmail.com> # |
5 | # # |
6 | # This program is free software; you can redistribute it and/or modify # |
7 | # it under the terms of the GNU General Public License as published by # |
8 | # the Free Software Foundation; either version 2 of the License, or # |
9 | # (at your option) any later version. # |
10 | # # |
11 | # This program is distributed in the hope that it will be useful, # |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
14 | # GNU General Public License for more details. # |
15 | # # |
16 | # You should have received a copy of the GNU General Public License # |
17 | # along with this program; if not, write to the Free Software # |
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # |
19 | # # |
20 | ********************************************************************************/ |
21 | |
22 | #ifndef DEFS_H |
23 | #define DEFS_H |
24 | #include <inttypes.h> |
25 | #include <sys/types.h> |
26 | |
27 | typedef uint64_t QWORD; |
28 | typedef uint32_t DWORD; |
29 | typedef uint16_t WORD; |
30 | typedef uint8_t BYTE; |
31 | typedef unsigned int LONG; |
32 | typedef unsigned int UINT; |
33 | |
34 | typedef unsigned long long ULLONG; |
35 | typedef unsigned long ULONG; |
36 | |
37 | typedef char* pchar; |
38 | |
39 | typedef int8_t INT8; |
40 | typedef uint8_t UINT8; |
41 | typedef int16_t INT16; |
42 | typedef uint16_t UINT16; |
43 | typedef int32_t INT32; |
44 | typedef uint32_t UINT32; |
45 | typedef int64_t INT64; |
46 | typedef uint64_t UINT64; |
47 | |
48 | /*clip value between 0 and 255*/ |
49 | #define CLIP(value) (BYTE)(((value)>0xFF)?0xff:(((value)<0)?0:(value))) |
50 | |
51 | /*MAX macro - gets the bigger value*/ |
52 | #ifndef MAX |
53 | #define MAX(a,b) (((a) < (b)) ? (b) : (a)) |
54 | #endif |
55 | |
56 | #endif |
57 | |
58 |