1
2
3
4
5
6
7 #ifndef DELTA_MJPEG_FW_H
8 #define DELTA_MJPEG_FW_H
9
10
11
12
13
14
15
16
17
18
19 struct jpeg_decoded_buffer_address_t {
20 u32 luma_p;
21 u32 chroma_p;
22 };
23
24
25
26
27
28
29
30
31
32
33
34
35
36 struct jpeg_display_buffer_address_t {
37 u32 struct_size;
38 u32 display_luma_p;
39 u32 display_chroma_p;
40 u32 display_decimated_luma_p;
41 u32 display_decimated_chroma_p;
42 };
43
44
45
46
47
48 enum jpeg_rcn_ref_disp_enable_t {
49
50 JPEG_DISP_AUX_EN = 0x00000010,
51
52 JPEG_DISP_MAIN_EN = 0x00000020,
53
54 JPEG_DISP_AUX_MAIN_EN = 0x00000030,
55
56 JPEG_REF_MAIN_EN = 0x00000100,
57
58
59
60
61 JPEG_REF_MAIN_DISP_AUX_EN = 0x00000110,
62
63
64
65
66 JPEG_REF_MAIN_DISP_MAIN_EN = 0x00000120,
67
68
69
70
71 JPEG_REF_MAIN_DISP_MAIN_AUX_EN = 0x00000130
72 };
73
74
75 enum jpeg_horizontal_deci_factor_t {
76
77 JPEG_HDEC_1 = 0x00000000,
78
79 JPEG_HDEC_ADVANCED_2 = 0x00000101,
80
81 JPEG_HDEC_ADVANCED_4 = 0x00000102
82 };
83
84
85 enum jpeg_vertical_deci_factor_t {
86
87 JPEG_VDEC_1 = 0x00000000,
88
89 JPEG_VDEC_ADVANCED_2_PROG = 0x00000204,
90
91 JPEG_VDEC_ADVANCED_2_INT = 0x000000208
92 };
93
94
95 enum jpeg_decoding_error_t {
96 JPEG_DECODER_NO_ERROR = 0,
97 JPEG_DECODER_UNDEFINED_HUFF_TABLE = 1,
98 JPEG_DECODER_UNSUPPORTED_MARKER = 2,
99 JPEG_DECODER_UNABLE_ALLOCATE_MEMORY = 3,
100 JPEG_DECODER_NON_SUPPORTED_SAMP_FACTORS = 4,
101 JPEG_DECODER_BAD_PARAMETER = 5,
102 JPEG_DECODER_DECODE_ERROR = 6,
103 JPEG_DECODER_BAD_RESTART_MARKER = 7,
104 JPEG_DECODER_UNSUPPORTED_COLORSPACE = 8,
105 JPEG_DECODER_BAD_SOS_SPECTRAL = 9,
106 JPEG_DECODER_BAD_SOS_SUCCESSIVE = 10,
107 JPEG_DECODER_BAD_HEADER_LENGTH = 11,
108 JPEG_DECODER_BAD_COUNT_VALUE = 12,
109 JPEG_DECODER_BAD_DHT_MARKER = 13,
110 JPEG_DECODER_BAD_INDEX_VALUE = 14,
111 JPEG_DECODER_BAD_NUMBER_HUFFMAN_TABLES = 15,
112 JPEG_DECODER_BAD_QUANT_TABLE_LENGTH = 16,
113 JPEG_DECODER_BAD_NUMBER_QUANT_TABLES = 17,
114 JPEG_DECODER_BAD_COMPONENT_COUNT = 18,
115 JPEG_DECODER_DIVIDE_BY_ZERO_ERROR = 19,
116 JPEG_DECODER_NOT_JPG_IMAGE = 20,
117 JPEG_DECODER_UNSUPPORTED_ROTATION_ANGLE = 21,
118 JPEG_DECODER_UNSUPPORTED_SCALING = 22,
119 JPEG_DECODER_INSUFFICIENT_OUTPUTBUFFER_SIZE = 23,
120 JPEG_DECODER_BAD_HWCFG_GP_VERSION_VALUE = 24,
121 JPEG_DECODER_BAD_VALUE_FROM_RED = 25,
122 JPEG_DECODER_BAD_SUBREGION_PARAMETERS = 26,
123 JPEG_DECODER_PROGRESSIVE_DECODE_NOT_SUPPORTED = 27,
124 JPEG_DECODER_ERROR_TASK_TIMEOUT = 28,
125 JPEG_DECODER_ERROR_FEATURE_NOT_SUPPORTED = 29
126 };
127
128
129 enum jpeg_decoding_mode_t {
130 JPEG_NORMAL_DECODE = 0,
131 };
132
133 enum jpeg_additional_flags_t {
134 JPEG_ADDITIONAL_FLAG_NONE = 0,
135
136 JPEG_ADDITIONAL_FLAG_CEH = 1,
137
138 JPEG_ADDITIONAL_FLAG_RASTER = 64,
139
140 JPEG_ADDITIONAL_FLAG_420MB = 128
141 };
142
143
144
145
146
147
148
149 struct jpeg_video_decode_init_params_t {
150 u32 circular_buffer_begin_addr_p;
151 u32 circular_buffer_end_addr_p;
152 u32 reserved;
153 };
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174 struct jpeg_decode_params_t {
175 u32 picture_start_addr_p;
176 u32 picture_end_addr_p;
177 struct jpeg_decoded_buffer_address_t decoded_buffer_addr;
178 struct jpeg_display_buffer_address_t display_buffer_addr;
179 enum jpeg_rcn_ref_disp_enable_t main_aux_enable;
180 enum jpeg_horizontal_deci_factor_t horizontal_decimation_factor;
181 enum jpeg_vertical_deci_factor_t vertical_decimation_factor;
182 u32 xvalue0;
183 u32 xvalue1;
184 u32 yvalue0;
185 u32 yvalue1;
186 enum jpeg_decoding_mode_t decoding_mode;
187 u32 additional_flags;
188 u32 field_flag;
189 u32 reserved;
190 u32 is_jpeg_image;
191 };
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213 struct jpeg_decode_return_params_t {
214
215 u32 decode_time_in_us;
216 u32 pm_cycles;
217 u32 pm_dmiss;
218 u32 pm_imiss;
219 u32 pm_bundles;
220 u32 pm_pft;
221 enum jpeg_decoding_error_t error_code;
222 u32 ceh_registers[32];
223 };
224
225 #endif