1 /**************************************************************************
3 * This code has been developed by Andrea Graziani. Those intending to *
4 * use this software module in hardware or software products are advised *
5 * that its use may infringe existing patents or copyrights, and any such *
6 * use would be at such party's own risk. The original developer of this *
7 * software module and his/her company, and subsequent editors and their *
8 * companies (including Project Mayo), will have no liability for use of *
9 * this software or modifications or derivatives thereof. *
11 * Project Mayo gives users of the Codec and Filter a license to this *
12 * software module or modifications thereof for use in hardware or *
13 * software products claiming conformance to the MPEG-4 Video Standard *
14 * as described in the Open DivX license. *
16 * The complete Open DivX license can be found at *
17 * http://www.projectmayo.com/opendivx/license.php *
19 **************************************************************************/
21 * Copyright (C) 2001 - Project Mayo
27 * DivX Advanced Research Center <darc@projectmayo.com>
32 // This is the header file describing
33 // the entrance function of the encoder core
44 #define STDCALL _stdcall
49 #if ( (! defined (WIN32)) && (! defined (LINUX)) )
58 #define DEC_OPT_MEMORY_REQS 0x00004000
59 #define DEC_OPT_INIT 0x00008000
60 #define DEC_OPT_RELEASE 0x00010000
61 #define DEC_OPT_SETPP 0x00020000 // set postprocessing mode
62 #define DEC_OPT_SETOUT 0x00040000 // set output mode
64 // decore return values
67 #define DEC_BAD_FORMAT 2
70 // decore YUV color format
75 // decore RGB color format
81 #define DEC_RGB32_INV 8
82 #define DEC_RGB24_INV 9
83 #define DEC_RGB555_INV 10
84 #define DEC_RGB565_INV 11
86 /* this is necessary for the max resolution (juice resolution) */
94 typedef struct _DEC_MEM_REQS_
96 unsigned long mp4_edged_ref_buffers_size
;
97 unsigned long mp4_edged_for_buffers_size
;
98 unsigned long mp4_display_buffers_size
;
99 unsigned long mp4_state_size
;
100 unsigned long mp4_tables_size
;
101 unsigned long mp4_stream_size
;
104 typedef struct _DEC_BUFFERS_
106 void * mp4_edged_ref_buffers
;
107 void * mp4_edged_for_buffers
;
108 void * mp4_display_buffers
;
115 unsigned char *edged_ref
[3],
122 typedef struct _DEC_PARAM_
124 int x_dim
; // x dimension of the frames to be decoded
125 int y_dim
; // y dimension of the frames to be decoded
126 int output_format
; // output color format
132 typedef struct _DEC_FRAME_
134 void *bmp
[3]; // the decoded bitmap
135 void *bitstream
; // the decoder buffer
136 long length
; // the lenght of the decoder stream
137 int render_flag
; // 1: the frame is going to be rendered
138 unsigned int stride
; // decoded bitmap stride
141 typedef struct _DEC_SET_
143 int postproc_level
; // valid interval are [0..100]
150 // the prototype of the decore() - main decore engine entrance
153 unsigned long handle
, // handle - the handle of the calling entity, must be unique
154 unsigned long dec_opt
, // dec_opt - the option for docoding, see below
155 void *param1
, // param1 - the parameter 1 (it's actually meaning depends on dec_opt
156 void *param2
); // param2 - the parameter 2 (it's actually meaning depends on dec_opt
158 // Set global variables for a decoding session
159 void decore_set_global(DEC_PARAM
*param
);
160 // Save global variables after a decoding session
161 void decore_save_global(DEC_PARAM
*param
);