1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
#ifndef _VAL_API_PUBLIC_H_
#define _VAL_API_PUBLIC_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "val_types_public.h"
/**
* @par Function
* eVideoInitMVA
* @par Description
* Alloc the handle for MVA usage
* @param
* a_pvHandle [IN] The handle for MVA usage
* @par Returns
* VAL_UINT32_T [OUT] Non-Used
*/
VAL_UINT32_T eVideoInitMVA(VAL_VOID_T **a_pvHandle);
/**
* @par Function
* eVideoAllocMVA
* @par Description
* Use the given va and size, to get the MVA
* @param
* a_pvHandle [IN] The handle for MVA usage
* @param
* a_u4Va [IN] The given va used to get MVA
* @param
* ap_u4Pa [OUT] The MVA
* @param
* a_u4Size [IN] The given size used to get MVA
* @param
* a_pvM4uConfig [IN] The MVA config info
* @par Returns
* VAL_UINT32_T [OUT] Non-Used
*/
VAL_UINT32_T eVideoAllocMVA(
VAL_VOID_T *a_pvHandle,
VAL_UINT32_T a_u4Va,
VAL_UINT32_T *ap_u4Pa,
VAL_UINT32_T a_u4Size,
VAL_VCODEC_M4U_BUFFER_CONFIG_T * a_pvM4uConfig
);
/**
* @par Function
* eVideoFreeMVA
* @par Description
* Use the given va, MVA and size, to free the MVA
* @param
* a_pvHandle [IN] The handle for MVA usage
* @param
* a_u4Va [IN] The given va used to free MVA
* @param
* a_u4Pa [IN] The given MVA used to free MVA
* @param
* a_u4Size [IN] The given size used to get MVA
* @param
* a_pvM4uConfig [IN] The MVA config info
* @par Returns
* VAL_UINT32_T [OUT] Non-Used
*/
VAL_UINT32_T eVideoFreeMVA(
VAL_VOID_T *a_pvHandle,
VAL_UINT32_T a_u4Va,
VAL_UINT32_T a_u4Pa,
VAL_UINT32_T a_u4Size,
VAL_VCODEC_M4U_BUFFER_CONFIG_T * a_pvM4uConfig
);
/**
* @par Function
* eVideoDeInitMVA
* @par Description
* Free the handle for MVA usage
* @param
* a_pvHandle [IN] The handle for MVA usage
* @par Returns
* VAL_UINT32_T [OUT] Non-Used
*/
VAL_UINT32_T eVideoDeInitMVA(VAL_VOID_T *a_pvHandle);
/**
* @par Function
* eVideoGetM4UModuleID
* @par Description
* Get the M4U module port ID
* @param
* u4MemType [IN] The memory usage for VENC or VDEC
* @par Returns
* VAL_UINT32_T [OUT] The M4U module port ID for VENC or VDEC
*/
VAL_INT32_T eVideoGetM4UModuleID(VAL_UINT32_T u4MemType);
/**
* @par Function
* eVideoAtoi
* @par Description
* The abstraction layer for atoi() function
* @param
* a_prParam [IN] The structure contains used info for atoi()
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoAtoi(VAL_ATOI_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoStrStr
* @par Description
* The abstraction layer for strstr() function
* @param
* a_prParam [IN] The structure contains used info for strstr()
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoStrStr(VAL_STRSTR_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoFlushCache
* @par Description
* The flush cache usage function
* @param
* a_prParam [IN] The structure contains used info for flush cache
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @param
* optype [IN] 0 for flush all, 1 for flush by page
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_MEMORY for fail
*/
VAL_RESULT_T eVideoFlushCache(VAL_MEMORY_T *a_prParam, VAL_UINT32_T a_u4ParamSize, VAL_UINT32_T optype);
/**
* @par Function
* eVideoInvalidateCache
* @par Description
* The invalidate cache usage function
* @param
* a_prParam [IN] The structure contains used info for invalidate cache
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @param
* optype [IN] 0 for flush all, 1 for invalidate by page
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_MEMORY for fail
*/
VAL_RESULT_T eVideoInvalidateCache(VAL_MEMORY_T *a_prParam, VAL_UINT32_T a_u4ParamSize, VAL_UINT32_T optype);
/**
* @par Function
* eVideoMemAlloc
* @par Description
* The memory allocate usage function
* @param
* a_prParam [IN] The structure contains used info for allocate memory
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT]
* VAL_RESULT_NO_ERROR for success,
* VAL_RESULT_INVALID_MEMORY or VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoMemAlloc(VAL_MEMORY_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoMemFree
* @par Description
* The memory free usage function
* @param
* a_prParam [IN] The structure contains used info for free memory
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoMemFree(VAL_MEMORY_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoMemSet
* @par Description
* The memory set usage function
* @param
* a_prParam [IN] The structure contains used info for set memory
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @param
* a_u4Value [IN] The value for set to memory
* @param
* a_u4Size [IN] The size of "memory" want to be set
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoMemSet(
VAL_MEMORY_T *a_prParam,
VAL_UINT32_T a_u4ParamSize,
VAL_INT32_T a_u4Value,
VAL_UINT32_T a_u4Size
);
/**
* @par Function
* eVideoMemCpy
* @par Description
* The memory copy usage function
* @param
* a_prParamDst [IN] The structure contains destination memory info for copy memory
* @param
* a_u4ParamDstSize [IN] The size of a_prParamDst structure
* @param
* a_prParamSrc [IN] The structure contains source memory info for copy memory
* @param
* a_u4ParamSrcSize [IN] The size of a_prParamSrc structure
* @param
* a_u4Size [IN] The size of "source memory" and "destination memory" want to be copied
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoMemCpy(
VAL_MEMORY_T *a_prParamDst,
VAL_UINT32_T a_u4ParamDstSize,
VAL_MEMORY_T *a_prParamSrc,
VAL_UINT32_T a_u4ParamSrcSize,
VAL_UINT32_T a_u4Size
);
/**
* @par Function
* eVideoMemCmp
* @par Description
* The memory compare usage function
* @param
* a_prParamSrc1 [IN] The structure contains memory 1 info for compare memory
* @param
* a_u4ParamSrc1Size [IN] The size of a_prParamSrc1 structure
* @param
* a_prParamSrc2 [IN] The structure contains memory 2 info for compare memory
* @param
* a_u4ParamSrc2Size [IN] The size of a_prParamSrc2 structure
* @param
* a_u4Size [IN] The size of "memory 1" and "memory 2" want to be compared
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_INVALID_PARAMETER for fail
*/
VAL_RESULT_T eVideoMemCmp(
VAL_MEMORY_T *a_prParamSrc1,
VAL_UINT32_T a_u4ParamSrc1Size,
VAL_MEMORY_T *a_prParamSrc2,
VAL_UINT32_T a_u4ParamSrc2Size,
VAL_UINT32_T a_u4Size
);
/**
* @par Function
* WaitISR
* @par Description
* The ISR usage related function, whene trigger HW, we will use to wait HW complete
* @param
* a_prParam [IN] The structure contains used info for ISR usage
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_ISR_TIMEOUT for fail
*/
VAL_RESULT_T WaitISR(VAL_ISR_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoLockHW
* @par Description
* The single/multiple instance usage function, to allow using HW
* @param
* a_prParam [IN] The structure contains used info for Lock HW
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_UNKNOWN_ERROR for fail
*/
VAL_RESULT_T eVideoLockHW(VAL_HW_LOCK_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoLockHW
* @par Description
* The single/multiple instance usage function, to release HW for another instance
* @param
* a_prParam [IN] The structure contains used info for unLock HW
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success, VAL_RESULT_UNKNOWN_ERROR for fail
*/
VAL_RESULT_T eVideoUnLockHW(VAL_HW_LOCK_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eVideoGetTimeOfDay
* @par Description
* The timing usage function, used to performance profiling
* @param
* a_prParam [IN] The structure contains used info for timing usage
* @param
* a_u4ParamSize [IN] The size of a_prParam structure
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success
*/
VAL_RESULT_T eVideoGetTimeOfDay(VAL_TIME_T *a_prParam, VAL_UINT32_T a_u4ParamSize);
/**
* @par Function
* eHalEMICtrlForRecordSize
* @par Description
* The recording info function, to get the record size for setting to EMI controller
* @param
* a_prDrvRecordSize [IN] The structure contains used info for recording size
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success
*/
VAL_RESULT_T eHalEMICtrlForRecordSize(VAL_RECORD_SIZE_T *a_prDrvRecordSize);
/**
* @par Function
* eVideoVcodecSetThreadID
* @par Description
* The thread info function, to set thread ID for used to lock/unlock HW and priority adjustment
* @param
* a_prThreadID [IN] The structure contains used info for thread info
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success
*/
VAL_RESULT_T eVideoVcodecSetThreadID(VAL_VCODEC_THREAD_ID_T *a_prThreadID);
/**
* @par Function
* eVideoGetParam
* @par Description
* The parameter info function, to get val parameter
* @param
* a_eType [IN] The VAL_GET_TYPE_T enum
* @param
* a_pvInParam [IN] The input parameter
* @param
* a_pvOutParam [OUT] The output parameter
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success
*/
VAL_RESULT_T eVideoGetParam(VAL_GET_TYPE_T a_eType, VAL_VOID_T *a_pvInParam, VAL_VOID_T *a_pvOutParam);
/**
* @par Function
* eVideoSetParam
* @par Description
* The parameter info function, to set val parameter
* @param
* a_eType [IN] The VAL_SET_TYPE_T enum
* @param
* a_pvInParam [IN] The input parameter
* @param
* a_pvOutParam [OUT] The output parameter
* @par Returns
* VAL_RESULT_T [OUT] VAL_RESULT_NO_ERROR for success
*/
VAL_RESULT_T eVideoSetParam(VAL_SET_TYPE_T a_eType, VAL_VOID_T *a_pvInParam, VAL_VOID_T *a_pvOutParam);
VAL_RESULT_T eVideoE3TCMPowerON(VAL_UINT32_T a_u4E3TCMClk);
VAL_RESULT_T eVideoE3TCMPowerOFF(VAL_UINT32_T a_u4E3TCMClk);
#ifdef __cplusplus
}
#endif
#endif /* #ifndef _VAL_API_PUBLIC_H_ */
|