ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mpeg_encode/src/mtypes.h
Revision: 22
Committed: Mon Jul 7 22:16:37 2008 UTC (11 years ago) by wdelano
File size: 3448 byte(s)
Log Message:
initial checkin of mpeg_encode source
Line File contents
1 /*===========================================================================*
2 * mtypes.h *
3 * *
4 * MPEG data types *
5 * *
6 *===========================================================================*/
7
8 /*
9 * Copyright (c) 1995 The Regents of the University of California.
10 * All rights reserved.
11 *
12 * Permission to use, copy, modify, and distribute this software and its
13 * documentation for any purpose, without fee, and without written agreement is
14 * hereby granted, provided that the above copyright notice and the following
15 * two paragraphs appear in all copies of this software.
16 *
17 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
18 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
19 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
20 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
25 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
26 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
27 */
28
29 /*
30 * $Header: /u/smoot/md/mpeg_encode/headers/RCS/mtypes.h,v 1.12 1995/04/14 23:12:11 smoot Exp $
31 * $Log: mtypes.h,v $
32 * Revision 1.12 1995/04/14 23:12:11 smoot
33 * added ChromBlock for future color MV searches
34 *
35 * Revision 1.11 1995/01/19 23:55:05 eyhung
36 * Changed copyrights
37 *
38 * Revision 1.10 1994/11/14 22:48:57 smoot
39 * added defines for Specifics operation
40 *
41 * Revision 1.9 1994/11/12 02:12:52 keving
42 * nothing
43 *
44 * Revision 1.8 1993/07/22 22:24:23 keving
45 * nothing
46 *
47 * Revision 1.7 1993/07/09 00:17:23 keving
48 * nothing
49 *
50 * Revision 1.6 1993/06/03 21:08:53 keving
51 * nothing
52 *
53 * Revision 1.5 1993/02/17 23:18:20 dwallach
54 * checkin prior to keving's joining the project
55 *
56 * Revision 1.4 1993/01/18 10:20:02 dwallach
57 * *** empty log message ***
58 *
59 * Revision 1.3 1993/01/18 10:17:29 dwallach
60 * RCS headers installed, code indented uniformly
61 *
62 * Revision 1.3 1993/01/18 10:17:29 dwallach
63 * RCS headers installed, code indented uniformly
64 *
65 */
66
67
68 #ifndef MTYPES_INCLUDED
69 #define MTYPES_INCLUDED
70
71
72 /*==============*
73 * HEADER FILES *
74 *==============*/
75
76 #include "general.h"
77 #include "dct.h"
78
79
80 /*===========*
81 * CONSTANTS *
82 *===========*/
83
84 #define TYPE_BOGUS 0 /* for the header of the circular list */
85 #define TYPE_VIRGIN 1
86
87 #define STATUS_EMPTY 0
88 #define STATUS_LOADED 1
89 #define STATUS_WRITTEN 2
90
91
92 /*==================*
93 * TYPE DEFINITIONS *
94 *==================*/
95
96 /*
97 * your basic Block type
98 */
99 typedef int16 Block[DCTSIZE][DCTSIZE];
100 typedef int16 FlatBlock[DCTSIZE_SQ];
101 typedef int32 LumBlock[2*DCTSIZE][2*DCTSIZE];
102 typedef int32 ChromBlock[DCTSIZE][DCTSIZE];
103
104 /*========*
105 * MACROS *
106 *========*/
107
108 #ifdef ABS
109 #undef ABS
110 #endif
111
112 #define ABS(x) (((x)<0)?-(x):(x))
113
114 #ifdef HEINOUS_DEBUG_MODE
115 #define DBG_PRINT(x) {printf x; fflush(stdout);}
116 #else
117 #define DBG_PRINT(x)
118 #endif
119
120 #define ERRCHK(bool, str) {if(!(bool)) {perror(str); exit(1);}}
121
122 /* For Specifics */
123 typedef struct detalmv_def {
124 int typ,fx,fy,bx,by;
125 } BlockMV;
126 #define TYP_SKIP 0
127 #define TYP_FORW 1
128 #define TYP_BACK 2
129 #define TYP_BOTH 3
130
131
132 #endif /* MTYPES_INCLUDED */