#ifndef _DIVX4_H_ #define _DIVX4_H_ #ifdef __cplusplus extern "C" { #endif /********************************************************************************* * Decoder part * *********************************************************************************/ /* decore commands */ #define DEC_OPT_MEMORY_REQS 0 #define DEC_OPT_INIT 1 #define DEC_OPT_RELEASE 2 #define DEC_OPT_SETPP 3 #define DEC_OPT_SETOUT 4 #define DEC_OPT_FRAME 5 #define DEC_OPT_FRAME_311 6 #define DEC_OPT_SETPP2 7 #define DEC_OPT_VERSION 8 /* return values */ #define DEC_OK 0 #define DEC_MEMORY 1 #define DEC_BAD_FORMAT 2 #define DEC_EXIT 3 /* yuv colour formats */ #define DEC_YUY2 1 #define DEC_YUV2 DEC_YUY2 #define DEC_UYVY 2 #define DEC_420 3 #define DEC_YV12 13 /* rgb colour formats */ #define DEC_RGB32 4 #define DEC_RGB24 5 #define DEC_RGB555 6 #define DEC_RGB565 7 #define DEC_RGB32_INV 8 #define DEC_RGB24_INV 9 #define DEC_RGB555_INV 10 #define DEC_RGB565_INV 11 /* return pointers to initial buffers equivalent to XVID_CSP_USER */ #define DEC_USER 12 /* output structure for DEC_USER */ typedef struct { void *y; void *u; void *v; int stride_y; int stride_uv; } DEC_PICTURE; typedef struct { unsigned long mp4_edged_ref_buffers_size; unsigned long mp4_edged_for_buffers_size; unsigned long mp4_edged_back_buffers_size; unsigned long mp4_display_buffers_size; unsigned long mp4_state_size; unsigned long mp4_tables_size; unsigned long mp4_stream_size; unsigned long mp4_reference_size; } DEC_MEM_REQS; typedef struct { void *mp4_edged_ref_buffers; void *mp4_edged_for_buffers; void *mp4_edged_back_buffers; void *mp4_display_buffers; void *mp4_state; void *mp4_tables; void *mp4_stream; void *mp4_reference; } DEC_BUFFERS; typedef struct { int x_dim; /* frame width */ int y_dim; /* frame height */ int output_format; int time_incr; DEC_BUFFERS buffers; } DEC_PARAM; typedef struct { void *bmp; /* pointer to output buffer */ void *bitstream; /* input bit stream */ long length; /* length of bitstream */ int render_flag; unsigned int stride; } DEC_FRAME; typedef struct { int intra; int *quant_store; int quant_stride; } DEC_FRAME_INFO; /* configure postprocessing */ typedef struct { int postproc_level; /* ranging from 0 to 100 */ } DEC_SET; int decore(unsigned long handle, unsigned long dec_opt, void *param1, void *param2); /********************************************************************************* * Encoder part * *********************************************************************************/ /** Structure passed as an argument when creating encoder. You have to initialize at least x_dim and y_dim ( valid range: 0