2 |
#define _DIVX4_H_ |
#define _DIVX4_H_ |
3 |
|
|
4 |
#ifdef __cplusplus |
#ifdef __cplusplus |
5 |
extern "C" { |
extern "C" |
6 |
|
{ |
7 |
#endif |
#endif |
8 |
|
|
9 |
#if ((! defined(ARCH_IS_BIG_ENDIAN)) && (! defined (WIN32)) && (! defined (LINUX)) ) |
#if ((! defined(ARCH_IS_BIG_ENDIAN)) && (! defined (WIN32)) && (! defined (LINUX)) ) |
62 |
void *v; |
void *v; |
63 |
int stride_y; |
int stride_y; |
64 |
int stride_uv; |
int stride_uv; |
65 |
} DEC_PICTURE; |
} |
66 |
|
DEC_PICTURE; |
67 |
|
|
68 |
typedef struct |
typedef struct |
69 |
{ |
{ |
75 |
unsigned long mp4_tables_size; |
unsigned long mp4_tables_size; |
76 |
unsigned long mp4_stream_size; |
unsigned long mp4_stream_size; |
77 |
unsigned long mp4_reference_size; |
unsigned long mp4_reference_size; |
78 |
} DEC_MEM_REQS; |
} |
79 |
|
DEC_MEM_REQS; |
80 |
|
|
81 |
typedef struct |
typedef struct |
82 |
{ |
{ |
88 |
void * mp4_tables; |
void * mp4_tables; |
89 |
void * mp4_stream; |
void * mp4_stream; |
90 |
void * mp4_reference; |
void * mp4_reference; |
91 |
} DEC_BUFFERS; |
} |
92 |
|
DEC_BUFFERS; |
93 |
|
|
94 |
typedef struct |
typedef struct |
95 |
{ |
{ |
98 |
int output_format; |
int output_format; |
99 |
int time_incr; |
int time_incr; |
100 |
DEC_BUFFERS buffers; |
DEC_BUFFERS buffers; |
101 |
} DEC_PARAM; |
} |
102 |
|
DEC_PARAM; |
103 |
|
|
104 |
typedef struct |
typedef struct |
105 |
{ |
{ |
108 |
long length; /* length of bitstream */ |
long length; /* length of bitstream */ |
109 |
int render_flag; |
int render_flag; |
110 |
unsigned int stride; |
unsigned int stride; |
111 |
} DEC_FRAME; |
} |
112 |
|
DEC_FRAME; |
113 |
|
|
114 |
typedef struct |
typedef struct |
115 |
{ |
{ |
116 |
int intra; |
int intra; |
117 |
int *quant_store; |
int *quant_store; |
118 |
int quant_stride; |
int quant_stride; |
119 |
} DEC_FRAME_INFO; |
} |
120 |
|
DEC_FRAME_INFO; |
121 |
|
|
122 |
/* configure postprocessing */ |
/* configure postprocessing */ |
123 |
typedef struct |
typedef struct |
124 |
{ |
{ |
125 |
int postproc_level; /* ranging from 0 to 100 */ |
int postproc_level; /* ranging from 0 to 100 */ |
126 |
} DEC_SET; |
} |
127 |
|
DEC_SET; |
128 |
|
|
129 |
int decore( unsigned long handle, unsigned long dec_opt, void* param1, void* param2); |
int decore(unsigned long handle, |
130 |
|
unsigned long dec_opt, |
131 |
|
void *param1, |
132 |
|
void *param2); |
133 |
|
|
134 |
|
|
135 |
|
|
210 |
|
|
211 |
// the prototype of the encore() - main encode engine entrance |
// the prototype of the encore() - main encode engine entrance |
212 |
int encore(void *handle, // handle - the handle of the calling entity, must be unique |
int encore(void *handle, // handle - the handle of the calling entity, must be unique |
213 |
|
|
214 |
int enc_opt, // enc_opt - the option for encoding, see below |
int enc_opt, // enc_opt - the option for encoding, see below |
215 |
|
|
216 |
void *param1, // param1 - the parameter 1 (its actually meaning depends on enc_opt |
void *param1, // param1 - the parameter 1 (its actually meaning depends on enc_opt |
217 |
|
|
218 |
void *param2); // param2 - the parameter 2 (its actually meaning depends on enc_opt |
void *param2); // param2 - the parameter 2 (its actually meaning depends on enc_opt |
219 |
|
|
220 |
// encore options (the enc_opt parameter of encore()) |
// encore options (the enc_opt parameter of encore()) |