r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / quicktime / decore50 / decore.h
blobb52bce0b6808f632eb150d13e7ce0fe70e750691
1 /**************************************************************************
2 * *
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. *
10 * *
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. *
15 * *
16 * The complete Open DivX license can be found at *
17 * http://www.projectmayo.com/opendivx/license.php *
18 * *
19 **************************************************************************/
20 /**
21 * Copyright (C) 2001 - Project Mayo
23 * Adam Li
24 * Andrea Graziani
25 * Jonathan White
27 * DivX Advanced Research Center <darc@projectmayo.com>
29 **/
30 // decore.h //
32 // This is the header file describing
33 // the entrance function of the encoder core
34 // or the encore ...
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 #ifndef _DECORE_H_
41 #define _DECORE_H_
43 #ifdef WIN32
44 #define STDCALL _stdcall
45 #else
46 #define STDCALL
47 #endif
49 #if ( (! defined (WIN32)) && (! defined (LINUX)) )
50 #define BIG_ENDIAN
51 #endif
53 /**
55 **/
57 // decore options
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
65 #define DEC_OK 0
66 #define DEC_MEMORY 1
67 #define DEC_BAD_FORMAT 2
68 #define DEC_EXIT 3
70 // decore YUV color format
71 #define DEC_YUV2 1
72 #define DEC_UYVY 2
73 #define DEC_420 3
75 // decore RGB color format
76 #define DEC_RGB32 4
77 #define DEC_RGB24 5
78 #define DEC_RGB555 6
79 #define DEC_RGB565 7
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) */
87 #define DEC_MBC 128
88 #define DEC_MBR 128
90 /**
92 **/
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;
102 } DEC_MEM_REQS;
104 typedef struct _DEC_BUFFERS_
106 void * mp4_edged_ref_buffers;
107 void * mp4_edged_for_buffers;
108 void * mp4_display_buffers;
109 void * mp4_state;
110 void * mp4_tables;
111 void * mp4_stream;
114 // Global variables
115 unsigned char *edged_ref[3],
116 *edged_for[3],
117 *frame_ref[3],
118 *frame_for[3],
119 *display_frame[3];
120 } DEC_BUFFERS;
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
127 int time_incr;
128 DEC_BUFFERS buffers;
130 } DEC_PARAM;
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
139 } DEC_FRAME;
141 typedef struct _DEC_SET_
143 int postproc_level; // valid interval are [0..100]
144 } DEC_SET;
150 // the prototype of the decore() - main decore engine entrance
152 int STDCALL decore(
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);
164 #endif // _DECORE_H_
165 #ifdef __cplusplus
167 #endif