-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMPEG.H
More file actions
108 lines (91 loc) · 2.73 KB
/
Copy pathMPEG.H
File metadata and controls
108 lines (91 loc) · 2.73 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/* ----------------------------- MNI Header -----------------------------------
@NAME : mpeg.h
@INPUT :
@OUTPUT :
@RETURNS :
@DESCRIPTION: Types and function prototypes needed for applications to
use the Berkely MPEG decoding engine via the MNI front
end.
@METHOD :
@GLOBALS : Types defined:
ImageDesc - structure giving height, width, etc.
DitherEnum - the different dither types supported by
the decoding engine
@CALLS :
@CREATED : Greg Ward, 94/6/16.
@MODIFIED : Greg Ward, 94/9/12 (based on John Cristy's fixes): made
more amenable to use with other libraries that also
happen to define TRUE, FALSE, [Bb]oolean, and added
PROTO macro
---------------------------------------------------------------------------- */
#ifndef __MPEG_H
#define __MPEG_H
/* An attempt at a portable and integrable boolean type... */
#if (!defined(TRUE) || !defined(FALSE))
# define TRUE 1
# define FALSE 0
#endif
typedef unsigned int Boolean;
typedef struct
{
short red, green, blue;
} ColormapEntry;
typedef struct
{
int Height; /* in pixels */
int Width;
int Depth; /* image depth (bits) */
int PixelSize; /* bits actually stored per pixel */
int Size; /* bytes for whole image */
int BitmapPad; /* "quantum" of a scanline -- each scanline */
/* starts on an even interval of this */
/* many bits */
int PictureRate; /* required number of frames/sec [?] */
int BitRate; /* ??? */
int ColormapSize;
ColormapEntry *Colormap; /* an array of ColormapSize entries */
} ImageDesc;
typedef enum
{
HYBRID_DITHER,
HYBRID2_DITHER,
FS4_DITHER,
FS2_DITHER,
FS2FAST_DITHER,
Twox2_DITHER,
GRAY_DITHER,
FULL_COLOR_DITHER,
NO_DITHER,
ORDERED_DITHER,
MONO_DITHER,
MONO_THRESHOLD,
ORDERED2_DITHER,
MBORDERED_DITHER
} DitherEnum;
typedef enum
{
MPEG_DITHER,
MPEG_QUIET,
MPEG_LUM_RANGE,
MPEG_CR_RANGE,
MPEG_CB_RANGE,
MPEG_CMAP_INDEX
} MPEGOptionEnum;
#ifdef __cplusplus
extern "C" {
#endif
/*
* Kludge so we can compile under ANSI or K&R. (This only means
* that programs that *use* mpeg_lib can be compiled with K&R;
* the library itself must be compiled with an ANSI compiler.
* Mixing and matching compilers, BTW, is not a good idea...)
*/
/* Function prototypes (all are defined in wrapper.c) */
Boolean _System OpenMPEG (int MPEGfile, ImageDesc *ImgInfo);
void _System CloseMPEG (void);
Boolean _System RewindMPEG (int MPEGfile, ImageDesc *Image);
Boolean _System GetMPEGFrame (char *Frame, int Pitch);
#ifdef __cplusplus
}
#endif
#endif /* __MPEG_H */