Codec Engine Application Programming Interface (API)  ce-w08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CERuntime.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013 by Texas Instruments Incorporated.
3  *
4  */
5 
6 /*
7  * Copyright (c) 2013, Texas Instruments Incorporated
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  *
17  * * Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in the
19  * documentation and/or other materials provided with the distribution.
20  *
21  * * Neither the name of Texas Instruments Incorporated nor the names of
22  * its contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  *
37  */
38 /*
39  * ======== ti/sdo/ce/CERuntime.h ========
40  */
41 
52 #ifndef CERuntime_
53 #define CERuntime_
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
61 
62 #include <ti/sdo/ce/Engine.h>
63 
64 
65 /* Define this symbol so alg table for an engine can be NULL */
66 #define CE_NULL_algs NULL
67 
78 /*
79  * ======== CE_DECLARE_TYPE ========
80  */
111 #define CE_DECLARE_TYPE(name, types) \
112  \
113 static String typeTab_##name [] = { \
114  (types), \
115  NULL \
116 }; \
117  \
118 /*
119  * ======== CE_LOCAL_ALG ========
120  */
121 
160 #define CE_LOCAL_ALG(name, algName, ialgFxns, idma3Fxns, iresFxns, groupId, \
161  memType) \
162  \
163  { (algName), /* name */ \
164  {0}, /* uuid */ \
165  (ialgFxns), /* ialgFxns */ \
166  (idma3Fxns), /* idma3Fxns */ \
167  typeTab_##name, /* typeTab */ \
168  TRUE, /* isLocal */ \
169  (groupId), /* groupId */ \
170  0, /* protocol */ \
171  (iresFxns), /* iresFxns */ \
172  NULL, /* stub/skel params */ \
173  (memType), /* cached mem type */ \
174  NULL, /* type - typeTab[0] will be used instead */ \
175  },
176 
177 /*
178  * ======== CE_LOCAL_ALG2 ========
179  */
220 #define CE_LOCAL_ALG2(algName, ialgFxns, idma3Fxns, iresFxns, groupId, \
221  memType, types) \
222  \
223  { (algName), /* name */ \
224  {0}, /* uuid */ \
225  (ialgFxns), /* ialgFxns */ \
226  (idma3Fxns), /* idma3Fxns DEPRECATED */ \
227  NULL, /* typeTab */ \
228  TRUE, /* isLocal */ \
229  (groupId), /* groupId */ \
230  0, /* protocol */ \
231  (iresFxns), /* iresFxns */ \
232  NULL, /* stub/skel params */ \
233  (memType), /* cached mem type */ \
234  (types), /* types */ \
235  },
236 
237 /*
238  * ======== CE_DECLARE_LOCAL_ALG ========
239  */
278 #define CE_DECLARE_LOCAL_ALG(name, algName, ialgFxns, idma3Fxns, iresFxns, \
279  groupId, memType, types) \
280 static Engine_AlgDesc (name) = \
281  \
282  { (algName), /* name */ \
283  {0}, /* uuid */ \
284  (ialgFxns), /* ialgFxns */ \
285  (idma3Fxns), /* idma3Fxns (DEPRECATED) */ \
286  NULL, /* typeTab */ \
287  TRUE, /* isLocal */ \
288  (groupId), /* groupId */ \
289  0, /* protocol */ \
290  (iresFxns), /* iresFxns */ \
291  NULL, /* stub/skel params */ \
292  (memType), /* cached mem type */ \
293  (types), /* types */ \
294  };
295 
296 
297 /*
298  * ======== CE_BEGIN_ALG_TABLE ========
299  */
322 /*
323 #define CE_BEGIN_ALG_TABLE(name) \
324 static Engine_AlgDesc CE_##name##_algs[] = {
325 */
326 
327 #define ALG_TABLE_NAME_LHS(name) CE_##name
328 
329 #define ALG_TABLE_RHS(name) name##_algs[]
330 
331 #define CE_BEGIN_ALG_TABLE(name) \
332 static Engine_AlgDesc ALG_TABLE_RHS(ALG_TABLE_LHS(name))
333 
334 /*
335  * ======== CE_END_ALG_TABLE ========
336  */
357 #define CE_END_ALG_TABLE(name) \
358  {NULL}, \
359 };
360 
361 /*
362  * ======== CE_ENGINE ========
363  */
398 #define CE_ENGINE(algTab, engName, serverName, memMap, useExtLoader, heapId) \
399  { (engName), /* engine name */ \
400  CE_##algTab##_algs, /* alg table */ \
401  (serverName), /* optional server name */ \
402  NULL, /* memMap */ \
403  0, /* useExtLoader */ \
404  0, /* # of algs (filled in at runtime) */ \
405  (heapId) /* heapId */ \
406  },
407 
408 
409 /*
410  * ======== CE_BEGIN_ENGINE_TABLE ========
411  */
430 #define CE_BEGIN_ENGINE_TABLE(name) \
431 static Engine_AlgDesc _localAlgs_000[] = { \
432  {NULL}, \
433 }; \
434  \
435 static Engine_Desc name##_000[] = {
436 
437 /*
438  * ======== CE_END_ENGINE_TABLE ========
439  */
458 #define CE_END_ENGINE_TABLE(name) \
459  {"local", \
460  _localAlgs_000, \
461  NULL, \
462  NULL, \
463  0, \
464  }, \
465  {NULL, NULL, NULL, NULL, 0} \
466 }; \
467  \
468 Engine_Config Engine_config = { \
469  name##_000, \
470  "local" \
471 };
472 
473 /*
474  * ======== CERuntime_exit ========
475  */
484 extern Void CERuntime_exit(Void);
485 
486 
487 /*
488  * ======== CERuntime_init ========
489  */
508 extern Void CERuntime_init(Void);
509 
512 #ifdef __cplusplus
513 }
514 #endif
515 
516 #endif
517 /*
518  * @(#) ti.sdo.ce; 1, 0, 6,3; 6-13-2013 00:10:02; /db/atree/library/trees/ce/ce-w08/src/ xlibrary
519 
520  */
521 
Copyright 2013, Texas Instruments Incorporated