2 |
#define _DIVX4_H_ |
#define _DIVX4_H_ |
3 |
|
|
4 |
#ifdef __cplusplus |
#ifdef __cplusplus |
5 |
extern "C" { |
extern "C" |
6 |
#endif |
{ |
|
|
|
|
#if ((! defined(ARCH_IS_BIG_ENDIAN)) && (! defined (WIN32)) && (! defined (LINUX)) ) |
|
|
#define ARCH_IS_BIG_ENDIAN |
|
7 |
#endif |
#endif |
8 |
|
|
|
|
|
9 |
/********************************************************************************* |
/********************************************************************************* |
10 |
* Decoder part * |
* Decoder part * |
11 |
*********************************************************************************/ |
*********************************************************************************/ |
57 |
void *v; |
void *v; |
58 |
int stride_y; |
int stride_y; |
59 |
int stride_uv; |
int stride_uv; |
60 |
} DEC_PICTURE; |
} |
61 |
|
DEC_PICTURE; |
62 |
|
|
63 |
typedef struct |
typedef struct |
64 |
{ |
{ |
70 |
unsigned long mp4_tables_size; |
unsigned long mp4_tables_size; |
71 |
unsigned long mp4_stream_size; |
unsigned long mp4_stream_size; |
72 |
unsigned long mp4_reference_size; |
unsigned long mp4_reference_size; |
73 |
} DEC_MEM_REQS; |
} |
74 |
|
DEC_MEM_REQS; |
75 |
|
|
76 |
typedef struct |
typedef struct |
77 |
{ |
{ |
83 |
void * mp4_tables; |
void * mp4_tables; |
84 |
void * mp4_stream; |
void * mp4_stream; |
85 |
void * mp4_reference; |
void * mp4_reference; |
86 |
} DEC_BUFFERS; |
} |
87 |
|
DEC_BUFFERS; |
88 |
|
|
89 |
typedef struct |
typedef struct |
90 |
{ |
{ |
93 |
int output_format; |
int output_format; |
94 |
int time_incr; |
int time_incr; |
95 |
DEC_BUFFERS buffers; |
DEC_BUFFERS buffers; |
96 |
} DEC_PARAM; |
} |
97 |
|
DEC_PARAM; |
98 |
|
|
99 |
typedef struct |
typedef struct |
100 |
{ |
{ |
103 |
long length; /* length of bitstream */ |
long length; /* length of bitstream */ |
104 |
int render_flag; |
int render_flag; |
105 |
unsigned int stride; |
unsigned int stride; |
106 |
} DEC_FRAME; |
} |
107 |
|
DEC_FRAME; |
108 |
|
|
109 |
typedef struct |
typedef struct |
110 |
{ |
{ |
111 |
int intra; |
int intra; |
112 |
int *quant_store; |
int *quant_store; |
113 |
int quant_stride; |
int quant_stride; |
114 |
} DEC_FRAME_INFO; |
} |
115 |
|
DEC_FRAME_INFO; |
116 |
|
|
117 |
/* configure postprocessing */ |
/* configure postprocessing */ |
118 |
typedef struct |
typedef struct |
119 |
{ |
{ |
120 |
int postproc_level; /* ranging from 0 to 100 */ |
int postproc_level; /* ranging from 0 to 100 */ |
121 |
} DEC_SET; |
} |
122 |
|
DEC_SET; |
123 |
|
|
124 |
int decore( unsigned long handle, unsigned long dec_opt, void* param1, void* param2); |
int decore(unsigned long handle, |
125 |
|
unsigned long dec_opt, |
126 |
|
void *param1, |
127 |
|
void *param2); |
128 |
|
|
129 |
|
|
130 |
|
|
205 |
|
|
206 |
// the prototype of the encore() - main encode engine entrance |
// the prototype of the encore() - main encode engine entrance |
207 |
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 |
208 |
|
|
209 |
int enc_opt, // enc_opt - the option for encoding, see below |
int enc_opt, // enc_opt - the option for encoding, see below |
210 |
|
|
211 |
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 |
212 |
|
|
213 |
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 |
214 |
|
|
215 |
// encore options (the enc_opt parameter of encore()) |
// encore options (the enc_opt parameter of encore()) |