aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbuddy.liong2013-12-03 18:56:08 -0600
committerbuddy.liong2013-12-03 19:03:35 -0600
commitcb7080738ebb729184aa8afcd31c2f54d940f6b2 (patch)
tree50bf61086f4606d965451dda7933f3001f63a397 /libdce.c
parent9208d0f18664575c0a50420435c19c85ff9740dd (diff)
downloadrepo-libdce-cb7080738ebb729184aa8afcd31c2f54d940f6b2.tar.gz
repo-libdce-cb7080738ebb729184aa8afcd31c2f54d940f6b2.tar.xz
repo-libdce-cb7080738ebb729184aa8afcd31c2f54d940f6b2.zip
[LIBDCE] Spacing and alignment clean up
Clean the spacing and alignment of tab to 4 spaces. Change-Id: I62d75f0aef1a06858868458eedaf017f90f04ec4 Signed-off-by: buddy.liong <buddy.budiono@ti.com>
Diffstat (limited to 'libdce.c')
-rw-r--r--libdce.c418
1 files changed, 208 insertions, 210 deletions
diff --git a/libdce.c b/libdce.c
index cdb11bd..1f2746a 100644
--- a/libdce.c
+++ b/libdce.c
@@ -39,23 +39,23 @@
39/* IPC Headers */ 39/* IPC Headers */
40#include <MmRpc.h> 40#include <MmRpc.h>
41 41
42/*DCE Headers */ 42/* DCE Headers */
43#include "libdce.h" 43#include "libdce.h"
44#include "dce_rpc.h" 44#include "dce_rpc.h"
45#include "dce_priv.h" 45#include "dce_priv.h"
46#include "memplugin.h" 46#include "memplugin.h"
47 47
48 48
49/********************* GLOBALS ***********************/ 49/***************** GLOBALS ***************************/
50/* Hande used for Remote Communication */ 50/* Handle used for Remote Communication */
51MmRpc_Handle MmRpcHandle[MAX_REMOTEDEVICES] = { NULL}; 51MmRpc_Handle MmRpcHandle[MAX_REMOTEDEVICES] = { NULL};
52Engine_Handle gEngineHandle[MAX_INSTANCES][MAX_REMOTEDEVICES] = { NULL}; 52Engine_Handle gEngineHandle[MAX_INSTANCES][MAX_REMOTEDEVICES] = { {NULL, NULL}};
53static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; 53static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
54static int __ClientCount[MAX_REMOTEDEVICES] = {0}; 54static int __ClientCount[MAX_REMOTEDEVICES] = {0};
55int dce_debug = DCE_DEBUG_LEVEL; 55int dce_debug = DCE_DEBUG_LEVEL;
56const String DCE_DEVICE_NAME[MAX_REMOTEDEVICES]= {"rpmsg-dce","rpmsg-dce-dsp"}; 56const String DCE_DEVICE_NAME[MAX_REMOTEDEVICES]= {"rpmsg-dce","rpmsg-dce-dsp"};
57/****************** INLINE FUNCTIONS ********************/
58 57
58/***************** INLINE FUNCTIONS ******************/
59static inline void Fill_MmRpc_fxnCtx(MmRpc_FxnCtx *fxnCtx, int fxn_id, int num_params, int num_xlts, MmRpc_Xlt *xltAry) 59static inline void Fill_MmRpc_fxnCtx(MmRpc_FxnCtx *fxnCtx, int fxn_id, int num_params, int num_xlts, MmRpc_Xlt *xltAry)
60{ 60{
61 fxnCtx->fxn_id = fxn_id; 61 fxnCtx->fxn_id = fxn_id;
@@ -90,66 +90,68 @@ static inline void Fill_MmRpc_fxnCtx_Scalar_Params(MmRpc_Param *mmrpc_params, in
90 90
91static inline void Fill_MmRpc_fxnCtx_Xlt_Array(MmRpc_Xlt *mmrpc_xlt, int index, int32_t offset, size_t base, size_t handle) 91static inline void Fill_MmRpc_fxnCtx_Xlt_Array(MmRpc_Xlt *mmrpc_xlt, int index, int32_t offset, size_t base, size_t handle)
92{ 92{
93 /* index : index of params filled in FxnCtx */ 93 /* index : index of params filled in FxnCtx */
94 /* offset : calculated from address of index */ 94 /* offset : calculated from address of index */
95 mmrpc_xlt->index = index; 95 mmrpc_xlt->index = index;
96 mmrpc_xlt->offset = offset; 96 mmrpc_xlt->offset = offset;
97 mmrpc_xlt->base = base; 97 mmrpc_xlt->base = base;
98 mmrpc_xlt->handle = handle; 98 mmrpc_xlt->handle = handle;
99} 99}
100 100
101/************************ FUNCTIONS **************************/
102/* Interface for QNX for parameter buffer allocation */
103/* These interfaces are implemented to maintain Backward Compatability */
104void *dce_alloc(int sz)
105{
106 return (memplugin_alloc(sz, 1, MEM_TILER_1D, 0, 0));
107}
108
109void dce_free(void *ptr)
110{
111 memplugin_free(ptr);
112}
113
114static int __inline getCoreIndexFromName(String name) 101static int __inline getCoreIndexFromName(String name)
115{ 102{
116 if(name == NULL) 103 if(name == NULL)
117 return INVALID_CORE; 104 return INVALID_CORE;
118 105
119 if(!strcmp(name,"ivahd_vidsvr")) 106 if(!strcmp(name,"ivahd_vidsvr"))
120 return IPU; 107 return IPU;
121 else if(!strcmp(name, "dsp_vidsvr")) 108 else if(!strcmp(name, "dsp_vidsvr"))
122 return DSP; 109 return DSP;
123 else 110 else
124 return INVALID_CORE; 111 return INVALID_CORE;
125} 112}
126 113
127static int __inline getCoreIndexFromCodec(int codec_id) 114static int __inline getCoreIndexFromCodec(int codec_id)
128{ 115{
129 if(codec_id == OMAP_DCE_VIDENC2 || codec_id == OMAP_DCE_VIDDEC3) 116 if(codec_id == OMAP_DCE_VIDENC2 || codec_id == OMAP_DCE_VIDDEC3)
130 return IPU; 117 return IPU;
131 else if(codec_id == OMAP_DCE_VIDDEC2) 118 else if(codec_id == OMAP_DCE_VIDDEC2)
132 return DSP; 119 return DSP;
133 else 120 else
134 return INVALID_CORE; 121 return INVALID_CORE;
135} 122}
123
136static int __inline getCoreIndexFromEngine(Engine_Handle engine) 124static int __inline getCoreIndexFromEngine(Engine_Handle engine)
137{ 125{
138 int i; 126 int i;
139 int core = INVALID_CORE; 127 int core = INVALID_CORE;
140 128
141 for(i = 0; i < MAX_INSTANCES ; i++){ 129 for(i = 0; i < MAX_INSTANCES ; i++) {
142 if(engine == gEngineHandle[i][IPU]){ 130 if(engine == gEngineHandle[i][IPU]) {
143 core = IPU; 131 core = IPU;
144 break; 132 break;
145 } 133 }
146 else if(engine == gEngineHandle[i][DSP]){ 134 else if(engine == gEngineHandle[i][DSP]) {
147 core = DSP; 135 core = DSP;
148 break; 136 break;
149 } 137 }
150 } 138 }
151 return core; 139 return core;
152} 140}
141
142/***************** FUNCTIONS ********************************************/
143/* Interface for QNX for parameter buffer allocation */
144/* These interfaces are implemented to maintain Backward Compatability */
145void *dce_alloc(int sz)
146{
147 return (memplugin_alloc(sz, 1, MEM_TILER_1D, 0, 0));
148}
149
150void dce_free(void *ptr)
151{
152 memplugin_free(ptr);
153}
154
153/*=====================================================================================*/ 155/*=====================================================================================*/
154/** dce_ipc_init : Initialize MmRpc. This function is called within Engine_open(). 156/** dce_ipc_init : Initialize MmRpc. This function is called within Engine_open().
155 * 157 *
@@ -163,21 +165,21 @@ static int dce_ipc_init(int core)
163 DEBUG(" >> dce_ipc_init\n"); 165 DEBUG(" >> dce_ipc_init\n");
164 166
165 /* Create remote server insance */ 167 /* Create remote server insance */
166 __ClientCount[core]++; 168 __ClientCount[core]++;
167 169
168 if(__ClientCount[core] > MAX_INSTANCES){ 170 if(__ClientCount[core] > MAX_INSTANCES) {
169 eError = DCE_EXDM_UNSUPPORTED; 171 eError = DCE_EXDM_UNSUPPORTED;
170 return eError; 172 return (eError);
171 } 173 }
172 if(__ClientCount[core] > 1){ 174 if(__ClientCount[core] > 1) {
173 goto EXIT; 175 goto EXIT;
174 } 176 }
175 177
176 MmRpc_Params_init(&args); 178 MmRpc_Params_init(&args);
177 179
178 eError = MmRpc_create(DCE_DEVICE_NAME[core], &args, &MmRpcHandle[core]); 180 eError = MmRpc_create(DCE_DEVICE_NAME[core], &args, &MmRpcHandle[core]);
179 _ASSERT_AND_EXECUTE(eError == DCE_EOK, DCE_EIPC_CREATE_FAIL, __ClientCount[core]--); 181 _ASSERT_AND_EXECUTE(eError == DCE_EOK, DCE_EIPC_CREATE_FAIL, __ClientCount[core]--);
180 DEBUG("open(/dev/%s]) -> 0x%x\n",DCE_DEVICE_NAME[core], (int)MmRpcHandle[core]); 182 DEBUG("open(/dev/%s]) -> 0x%x\n", DCE_DEVICE_NAME[core], (int)MmRpcHandle[core]);
181 183
182EXIT: 184EXIT:
183 return (eError); 185 return (eError);
@@ -191,13 +193,14 @@ static void dce_ipc_deinit(int core)
191{ 193{
192 __ClientCount[core]--; 194 __ClientCount[core]--;
193 if( __ClientCount[core] > 0 ) { 195 if( __ClientCount[core] > 0 ) {
194 goto EXIT; 196 goto EXIT;
195 } 197 }
196 198
197 if( MmRpcHandle[core] != NULL ) { 199 if( MmRpcHandle[core] != NULL ) {
198 MmRpc_delete(&MmRpcHandle[core]); 200 MmRpc_delete(&MmRpcHandle[core]);
199 MmRpcHandle[core] = NULL; 201 MmRpcHandle[core] = NULL;
200 } 202 }
203
201EXIT: 204EXIT:
202 return; 205 return;
203} 206}
@@ -205,8 +208,8 @@ EXIT:
205/*===============================================================*/ 208/*===============================================================*/
206/** Engine_open : Open Codec Engine. 209/** Engine_open : Open Codec Engine.
207 * 210 *
208 * @ param attrs [in] : Engine Attributes. This param is not passed to Remote core. 211 * @ param attrs [in] : Engine Attributes. This param is not passed to Remote core.
209 * @ param name [in] : Name of Encoder or Decoder codec. 212 * @ param name [in] : Name of Encoder or Decoder codec.
210 * @ param ec [out] : Error returned by Codec Engine. 213 * @ param ec [out] : Error returned by Codec Engine.
211 * @ return : Codec Engine Handle is returned to be used to create codec. 214 * @ return : Codec Engine Handle is returned to be used to create codec.
212 * In case of error, NULL is returned as Engine Handle. 215 * In case of error, NULL is returned as Engine Handle.
@@ -215,8 +218,8 @@ Engine_Handle Engine_open(String name, Engine_Attrs *attrs, Engine_Error *ec)
215{ 218{
216 MmRpc_FxnCtx fxnCtx; 219 MmRpc_FxnCtx fxnCtx;
217 dce_error_status eError = DCE_EOK; 220 dce_error_status eError = DCE_EOK;
218 dce_engine_open *engine_open_msg = NULL; 221 dce_engine_open *engine_open_msg = NULL;
219 Engine_Attrs *engine_attrs = NULL; 222 Engine_Attrs *engine_attrs = NULL;
220 Engine_Handle engine_handle = NULL; 223 Engine_Handle engine_handle = NULL;
221 int coreIdx = INVALID_CORE; 224 int coreIdx = INVALID_CORE;
222 225
@@ -235,9 +238,9 @@ Engine_Handle Engine_open(String name, Engine_Attrs *attrs, Engine_Error *ec)
235 _ASSERT_AND_EXECUTE(engine_open_msg != NULL, DCE_EOUT_OF_MEMORY, engine_handle = NULL); 238 _ASSERT_AND_EXECUTE(engine_open_msg != NULL, DCE_EOUT_OF_MEMORY, engine_handle = NULL);
236 239
237 if( attrs ) { 240 if( attrs ) {
238 engine_attrs = memplugin_alloc(sizeof(Engine_Attrs), 1, DEFAULT_REGION, 0, 0); 241 engine_attrs = memplugin_alloc(sizeof(Engine_Attrs), 1, DEFAULT_REGION, 0, 0);
239 _ASSERT_AND_EXECUTE(engine_attrs != NULL, DCE_EOUT_OF_MEMORY, engine_handle = NULL); 242 _ASSERT_AND_EXECUTE(engine_attrs != NULL, DCE_EOUT_OF_MEMORY, engine_handle = NULL);
240 *engine_attrs = *attrs; 243 *engine_attrs = *attrs;
241 } 244 }
242 /* Populating the msg structure with all the params */ 245 /* Populating the msg structure with all the params */
243 /* Populating all params into a struct avoid individual address translations of name, ec */ 246 /* Populating all params into a struct avoid individual address translations of name, ec */
@@ -253,18 +256,18 @@ Engine_Handle Engine_open(String name, Engine_Attrs *attrs, Engine_Error *ec)
253 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, (int32_t *)(&engine_handle)); 256 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, (int32_t *)(&engine_handle));
254 gEngineHandle[__ClientCount[coreIdx] - 1][coreIdx] = engine_handle; 257 gEngineHandle[__ClientCount[coreIdx] - 1][coreIdx] = engine_handle;
255 258
256 /* In case of Error, the Application will get a NULL Engine Handle */ 259 /* In case of Error, the Application will get a NULL Engine Handle */
257 _ASSERT_AND_EXECUTE(eError == DCE_EOK, DCE_EIPC_CALL_FAIL, engine_handle = NULL); 260 _ASSERT_AND_EXECUTE(eError == DCE_EOK, DCE_EIPC_CALL_FAIL, engine_handle = NULL);
258 261
259 if( ec ) { 262 if( ec ) {
260 *ec = engine_open_msg->error_code; 263 *ec = engine_open_msg->error_code;
261 } 264 }
262EXIT:
263 265
266EXIT:
264 memplugin_free(engine_open_msg); 267 memplugin_free(engine_open_msg);
265 268
266 if( engine_attrs ) { 269 if( engine_attrs ) {
267 memplugin_free(engine_attrs); 270 memplugin_free(engine_attrs);
268 } 271 }
269 pthread_mutex_unlock(&mutex); 272 pthread_mutex_unlock(&mutex);
270 273
@@ -283,7 +286,7 @@ Void Engine_close(Engine_Handle engine)
283 dce_error_status eError = DCE_EOK; 286 dce_error_status eError = DCE_EOK;
284 int32_t coreIdx = INVALID_CORE; 287 int32_t coreIdx = INVALID_CORE;
285 288
286 pthread_mutex_lock(&mutex); 289 pthread_mutex_lock(&mutex);
287 290
288 _ASSERT(engine != NULL, DCE_EINVALID_INPUT); 291 _ASSERT(engine != NULL, DCE_EINVALID_INPUT);
289 292
@@ -295,7 +298,7 @@ Void Engine_close(Engine_Handle engine)
295 _ASSERT(coreIdx != INVALID_CORE,DCE_EINVALID_INPUT); 298 _ASSERT(coreIdx != INVALID_CORE,DCE_EINVALID_INPUT);
296 299
297 /* Invoke the Remote function through MmRpc */ 300 /* Invoke the Remote function through MmRpc */
298 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet); 301 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet);
299 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL); 302 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL);
300 303
301EXIT: 304EXIT:
@@ -316,7 +319,7 @@ EXIT:
316 * @ param engine [in] : Engine Handle obtained in Engine_open() call. 319 * @ param engine [in] : Engine Handle obtained in Engine_open() call.
317 * @ param name [in] : Name of Encoder or Decoder codec. 320 * @ param name [in] : Name of Encoder or Decoder codec.
318 * @ param params [in] : Static parameters of codec. 321 * @ param params [in] : Static parameters of codec.
319 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs. 322 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs.
320 * @ return : Codec Handle is returned to be used for control, process, delete calls. 323 * @ return : Codec Handle is returned to be used for control, process, delete calls.
321 * In case of error, NULL is returned. 324 * In case of error, NULL is returned.
322 */ 325 */
@@ -324,9 +327,9 @@ static void *create(Engine_Handle engine, String name, void *params, dce_codec_t
324{ 327{
325 MmRpc_FxnCtx fxnCtx; 328 MmRpc_FxnCtx fxnCtx;
326 dce_error_status eError = DCE_EOK; 329 dce_error_status eError = DCE_EOK;
327 void *codec_handle = NULL; 330 void *codec_handle = NULL;
328 char *codec_name = NULL; 331 char *codec_name = NULL;
329 int coreIdx = INVALID_CORE; 332 int coreIdx = INVALID_CORE;
330 333
331 _ASSERT(name != '\0', DCE_EINVALID_INPUT); 334 _ASSERT(name != '\0', DCE_EINVALID_INPUT);
332 _ASSERT(engine != NULL, DCE_EINVALID_INPUT); 335 _ASSERT(engine != NULL, DCE_EINVALID_INPUT);
@@ -359,13 +362,13 @@ EXIT:
359} 362}
360 363
361/*===============================================================*/ 364/*===============================================================*/
362/** control : Codec control call. 365/** control : Codec control call.
363 * 366 *
364 * @ param codec [in] : Codec Handle obtained in create() call. 367 * @ param codec [in] : Codec Handle obtained in create() call.
365 * @ param id [in] : Command id for XDM control operation. 368 * @ param id [in] : Command id for XDM control operation.
366 * @ param dynParams [in] : Dynamic input parameters to Codec. 369 * @ param dynParams [in] : Dynamic input parameters to Codec.
367 * @ param status [out] : Codec returned status parameters. 370 * @ param status [out] : Codec returned status parameters.
368 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs. 371 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs.
369 * @ return : Status of control() call is returned. 372 * @ return : Status of control() call is returned.
370 * #XDM_EOK [0] : Success. 373 * #XDM_EOK [0] : Success.
371 * #XDM_EFAIL [-1] : Failure. 374 * #XDM_EFAIL [-1] : Failure.
@@ -437,11 +440,11 @@ static XDAS_Int32 get_version(void *codec, void *dynParams, void *status, dce_co
437 _ASSERT(status != NULL, DCE_EINVALID_INPUT); 440 _ASSERT(status != NULL, DCE_EINVALID_INPUT);
438 441
439 if( codec_id == OMAP_DCE_VIDDEC3 ) { 442 if( codec_id == OMAP_DCE_VIDDEC3 ) {
440 version_buf = (void * *)(&(((IVIDDEC3_Status *)status)->data.buf)); 443 version_buf = (void * *)(&(((IVIDDEC3_Status *)status)->data.buf));
441 } else if( codec_id == OMAP_DCE_VIDENC2 ) { 444 } else if( codec_id == OMAP_DCE_VIDENC2 ) {
442 version_buf = (void * *)(&(((IVIDENC2_Status *)status)->data.buf)); 445 version_buf = (void * *)(&(((IVIDENC2_Status *)status)->data.buf));
443 }else if( codec_id == OMAP_DCE_VIDDEC2 ) { 446 } else if( codec_id == OMAP_DCE_VIDDEC2 ) {
444 version_buf = (void * *)(&(((IVIDDEC2_Status *)status)->data.buf)); 447 version_buf = (void * *)(&(((IVIDDEC2_Status *)status)->data.buf));
445 } 448 }
446 _ASSERT(*version_buf != NULL, DCE_EINVALID_INPUT); 449 _ASSERT(*version_buf != NULL, DCE_EINVALID_INPUT);
447 450
@@ -456,8 +459,8 @@ static XDAS_Int32 get_version(void *codec, void *dynParams, void *status, dce_co
456 459
457 /* Address Translation needed for buffer for version Info */ 460 /* Address Translation needed for buffer for version Info */
458 Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3, 461 Fill_MmRpc_fxnCtx_Xlt_Array(fxnCtx.xltAry, 3,
459 MmRpc_OFFSET((int32_t)status, (int32_t)version_buf), 462 MmRpc_OFFSET((int32_t)status, (int32_t)version_buf),
460 (size_t)P2H(*version_buf), memplugin_share(*version_buf)); 463 (size_t)P2H(*version_buf), memplugin_share(*version_buf));
461 464
462 /* Invoke the Remote function through MmRpc */ 465 /* Invoke the Remote function through MmRpc */
463 coreIdx = getCoreIndexFromCodec(codec_id); 466 coreIdx = getCoreIndexFromCodec(codec_id);
@@ -489,8 +492,8 @@ typedef enum process_call_params {
489 * @ param inBufs [in] : Input buffer details. 492 * @ param inBufs [in] : Input buffer details.
490 * @ param outBufs [in] : Output buffer details. 493 * @ param outBufs [in] : Output buffer details.
491 * @ param inArgs [in] : Input arguments. 494 * @ param inArgs [in] : Input arguments.
492 * @ param outArgs [out] : Output arguments. 495 * @ param outArgs [out] : Output arguments.
493 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs. 496 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs.
494 * @ return : Status of the process call. 497 * @ return : Status of the process call.
495 * #XDM_EOK [0] : Success. 498 * #XDM_EOK [0] : Success.
496 * #XDM_EFAIL [-1] : Failure. 499 * #XDM_EFAIL [-1] : Failure.
@@ -504,11 +507,11 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
504 MmRpc_Xlt xltAry[MAX_TOTAL_BUF]; 507 MmRpc_Xlt xltAry[MAX_TOTAL_BUF];
505 int fxnRet, count, total_count, numInBufs = 0, numOutBufs = 0; 508 int fxnRet, count, total_count, numInBufs = 0, numOutBufs = 0;
506 dce_error_status eError = DCE_EOK; 509 dce_error_status eError = DCE_EOK;
507 void **data_buf = NULL; 510 void **data_buf = NULL;
508 void **buf_arry = NULL; 511 void **buf_arry = NULL;
509 void **bufSize_arry = NULL; 512 void **bufSize_arry = NULL;
510 int numXltAry, numParams; 513 int numXltAry, numParams;
511 int coreIdx = INVALID_CORE; 514 int coreIdx = INVALID_CORE;
512 515
513#ifdef BUILDOS_ANDROID 516#ifdef BUILDOS_ANDROID
514 int32_t inbuf_offset[MAX_INPUT_BUF]; 517 int32_t inbuf_offset[MAX_INPUT_BUF];
@@ -521,27 +524,25 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
521 _ASSERT(outArgs != NULL, DCE_EINVALID_INPUT); 524 _ASSERT(outArgs != NULL, DCE_EINVALID_INPUT);
522 525
523 if( codec_id == OMAP_DCE_VIDDEC3 ) { 526 if( codec_id == OMAP_DCE_VIDDEC3 ) {
524 numInBufs = ((XDM2_BufDesc *)inBufs)->numBufs; 527 numInBufs = ((XDM2_BufDesc *)inBufs)->numBufs;
525 numOutBufs = ((XDM2_BufDesc *)outBufs)->numBufs; 528 numOutBufs = ((XDM2_BufDesc *)outBufs)->numBufs;
526 numXltAry = numInBufs + numOutBufs; 529 numXltAry = numInBufs + numOutBufs;
527 numParams = 6; 530 numParams = 6;
528 } else if( codec_id == OMAP_DCE_VIDENC2 ) { 531 } else if( codec_id == OMAP_DCE_VIDENC2 ) {
529 numInBufs = ((IVIDEO2_BufDesc *)inBufs)->numPlanes; 532 numInBufs = ((IVIDEO2_BufDesc *)inBufs)->numPlanes;
530 numOutBufs = ((XDM2_BufDesc *)outBufs)->numBufs; 533 numOutBufs = ((XDM2_BufDesc *)outBufs)->numBufs;
531 numXltAry = numInBufs + numOutBufs; 534 numXltAry = numInBufs + numOutBufs;
532 numParams = 6; 535 numParams = 6;
533 }else if( codec_id == OMAP_DCE_VIDDEC2 ) { 536 } else if( codec_id == OMAP_DCE_VIDDEC2 ) {
534 numInBufs = ((XDM1_BufDesc *)inBufs)->numBufs; 537 numInBufs = ((XDM1_BufDesc *)inBufs)->numBufs;
535 numOutBufs = ((XDM_BufDesc *)outBufs)->numBufs; 538 numOutBufs = ((XDM_BufDesc *)outBufs)->numBufs;
536 numXltAry = numInBufs + numOutBufs + MAX_OUTPUT_BUFPTRS;/* 2 extra needed for bufs and bufSizes */ 539 numXltAry = numInBufs + numOutBufs + MAX_OUTPUT_BUFPTRS;/* 2 extra needed for bufs and bufSizes */
537 numParams = 7; 540 numParams = 7;
538 } 541 } else{
539 else{
540 eError = DCE_EXDM_UNSUPPORTED; 542 eError = DCE_EXDM_UNSUPPORTED;
541 return eError; 543 return eError;
542 } 544 }
543 545
544
545 /* marshall function arguments into the send buffer */ 546 /* marshall function arguments into the send buffer */
546 /* Approach [2] as explained in "Notes" used for process */ 547 /* Approach [2] as explained in "Notes" used for process */
547 Fill_MmRpc_fxnCtx(&fxnCtx, DCE_RPC_CODEC_PROCESS, numParams, numXltAry, xltAry); 548 Fill_MmRpc_fxnCtx(&fxnCtx, DCE_RPC_CODEC_PROCESS, numParams, numXltAry, xltAry);
@@ -561,132 +562,130 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
561 /* individually mentioned as fxnCtx Params, they need not be mentioned below again */ 562 /* individually mentioned as fxnCtx Params, they need not be mentioned below again */
562 /* Input and Output Buffers have to be mentioned for translation */ 563 /* Input and Output Buffers have to be mentioned for translation */
563 for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) { 564 for( count = 0, total_count = 0; count < numInBufs; count++, total_count++ ) {
564 if( codec_id == OMAP_DCE_VIDDEC3 ) { 565 if( codec_id == OMAP_DCE_VIDDEC3 ) {
565 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf)); 566 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf));
566#ifdef BUILDOS_ANDROID 567#ifdef BUILDOS_ANDROID
567 /* the decoder input buffer filled by the parsers, have an offset */ 568 /* the decoder input buffer filled by the parsers, have an offset */
568 /* for the actual data. the offset within the input buffer is provided */ 569 /* for the actual data. the offset within the input buffer is provided */
569 /* via memheader offset field. Hence the buf ptr needs to be advanced with the offset */ 570 /* via memheader offset field. Hence the buf ptr needs to be advanced with the offset */
570 inbuf_offset[count] = P2H(*data_buf)->offset; 571 inbuf_offset[count] = P2H(*data_buf)->offset;
571 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, 572 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX,
572 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),(size_t)P2H(*data_buf), 573 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),(size_t)P2H(*data_buf),
573 (size_t)memplugin_share((void *)*data_buf)); 574 (size_t)memplugin_share((void *)*data_buf));
574 575
575 *data_buf += inbuf_offset[count]; 576 *data_buf += inbuf_offset[count];
576#else 577#else
577 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, 578 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX,
578 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf), 579 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),
579 (size_t)*data_buf, (size_t)*data_buf); 580 (size_t)*data_buf, (size_t)*data_buf);
580#endif 581#endif
581 } else if( codec_id == OMAP_DCE_VIDENC2 ) { 582 } else if( codec_id == OMAP_DCE_VIDENC2 ) {
582 data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf)); 583 data_buf = (void * *)(&(((IVIDEO2_BufDesc *)inBufs)->planeDesc[count].buf));
583 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, 584 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX,
584 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf), 585 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),
585 (size_t)*data_buf, (size_t)*data_buf); 586 (size_t)*data_buf, (size_t)*data_buf);
586 587
587 } else if( codec_id == OMAP_DCE_VIDDEC2 ) { 588 } else if( codec_id == OMAP_DCE_VIDDEC2 ) {
588 data_buf = (void * *)(&(((XDM1_BufDesc *)inBufs)->descs[count].buf)); 589 data_buf = (void * *)(&(((XDM1_BufDesc *)inBufs)->descs[count].buf));
589#ifdef BUILDOS_ANDROID 590#ifdef BUILDOS_ANDROID
590 /* the decoder input buffer filled by the parsers, have an offset */ 591 /* the decoder input buffer filled by the parsers, have an offset */
591 /* for the actual data. the offset within the input buffer is provided */ 592 /* for the actual data. the offset within the input buffer is provided */
592 /* via memheader offset field. Hence the buf ptr needs to be advanced with the offset */ 593 /* via memheader offset field. Hence the buf ptr needs to be advanced with the offset */
593 inbuf_offset[count] = P2H(*data_buf)->offset; 594 inbuf_offset[count] = P2H(*data_buf)->offset;
594 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, 595 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX,
595 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),(size_t)P2H(*data_buf), 596 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),(size_t)P2H(*data_buf),
596 (size_t)memplugin_share((void *)*data_buf)); 597 (size_t)memplugin_share((void *)*data_buf));
597 598
598 *data_buf += inbuf_offset[count]; 599 *data_buf += inbuf_offset[count];
599#else 600#else
600 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX, 601 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), INBUFS_INDEX,
601 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf), 602 MmRpc_OFFSET((int32_t)inBufs, (int32_t)data_buf),
602 (size_t)*data_buf, (size_t)*data_buf); 603 (size_t)*data_buf, (size_t)*data_buf);
603#endif 604#endif
604 } 605 }
605} 606}
606 607
607 /* Output Buffers */ 608 /* Output Buffers */
608 for( count = 0; count < numOutBufs; count++, total_count++ ) { 609 for( count = 0; count < numOutBufs; count++, total_count++ ) {
609 if(codec_id == OMAP_DCE_VIDENC2 || codec_id == OMAP_DCE_VIDDEC3) { 610 if(codec_id == OMAP_DCE_VIDENC2 || codec_id == OMAP_DCE_VIDDEC3) {
610 if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) { 611 if(((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].buf != ((XDM2_BufDesc *)outBufs)->descs[CHROMA_BUF].buf ) {
611 /* Either Encode usecase or MultiPlanar Buffers for Decode usecase */ 612 /* Either Encode usecase or MultiPlanar Buffers for Decode usecase */
612 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); 613 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
613 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, 614 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX,
614 MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), 615 MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf),
615 (size_t)*data_buf, (size_t)*data_buf); 616 (size_t)*data_buf, (size_t)*data_buf);
616 } 617 }
617#if defined(BUILDOS_LINUX) || defined(BUILDOS_ANDROID) 618#if defined(BUILDOS_LINUX) || defined(BUILDOS_ANDROID)
618 else { 619 else {
619 /* SinglePlanar Buffers for Decode usecase*/ 620 /* SinglePlanar Buffers for Decode usecase*/
620 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); 621 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
621 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, 622 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX,
622 MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), 623 MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf),
623 (size_t)*data_buf, (size_t)*data_buf); 624 (size_t)*data_buf, (size_t)*data_buf);
624 625
625 if( count == CHROMA_BUF ) { 626 if( count == CHROMA_BUF ) {
626 if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW || 627 if(((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_RAW ||
627 ((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_TILEDPAGE ) { 628 ((XDM2_BufDesc *)outBufs)->descs[count].memType == XDM_MEMTYPE_TILEDPAGE ) {
628 *data_buf += ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.bytes; 629 *data_buf += ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.bytes;
629 } else { 630 } else {
630 *data_buf += ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.tileMem.width * 631 *data_buf += ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.tileMem.width *
631 ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.tileMem.height; 632 ((XDM2_BufDesc *)outBufs)->descs[LUMA_BUF].bufSize.tileMem.height;
632 } 633 }
633 } 634 }
634 } 635 }
635#endif 636#endif
636 }else if(codec_id == OMAP_DCE_VIDDEC2) { 637 } else if(codec_id == OMAP_DCE_VIDDEC2) {
637 if(count == LUMA_BUF) { 638 if(count == LUMA_BUF) {
638 buf_arry = (void * *)(&(((XDM_BufDesc *)outBufs)->bufs)); 639 buf_arry = (void * *)(&(((XDM_BufDesc *)outBufs)->bufs));
639 640
640 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, 641 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX,
641 MmRpc_OFFSET((int32_t)outBufs, (int32_t)buf_arry), 642 MmRpc_OFFSET((int32_t)outBufs, (int32_t)buf_arry),
642 (size_t)P2H(*buf_arry), (size_t)memplugin_share(*buf_arry)); 643 (size_t)P2H(*buf_arry), (size_t)memplugin_share(*buf_arry));
643 644
644 total_count++; 645 total_count++;
645 646
646 bufSize_arry = (void * *)(&(((XDM_BufDesc *)outBufs)->bufSizes)); 647 bufSize_arry = (void * *)(&(((XDM_BufDesc *)outBufs)->bufSizes));
647 648
648 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, 649 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX,
649 MmRpc_OFFSET((int32_t)outBufs, (int32_t)bufSize_arry), 650 MmRpc_OFFSET((int32_t)outBufs, (int32_t)bufSize_arry),
650 (size_t)P2H(*bufSize_arry), (size_t)memplugin_share(*bufSize_arry)); 651 (size_t)P2H(*bufSize_arry), (size_t)memplugin_share(*bufSize_arry));
651 652
652 total_count++; 653 total_count++;
653 } 654 }
654 655
655 Fill_MmRpc_fxnCtx_OffPtr_Params(&(fxnCtx.params[OUTBUFS_PTR_INDEX]), GetSz(*buf_arry), P2H(*buf_arry), 656 Fill_MmRpc_fxnCtx_OffPtr_Params(&(fxnCtx.params[OUTBUFS_PTR_INDEX]), GetSz(*buf_arry), P2H(*buf_arry),
656 sizeof(MemHeader), memplugin_share(*buf_arry)); 657 sizeof(MemHeader), memplugin_share(*buf_arry));
657 658
658 data_buf = (void * *)(&(((XDM_BufDesc *)outBufs)->bufs[count])); 659 data_buf = (void * *)(&(((XDM_BufDesc *)outBufs)->bufs[count]));
659 660
660 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_PTR_INDEX, 661 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_PTR_INDEX,
661 MmRpc_OFFSET((int32_t)*buf_arry, (int32_t)data_buf), (size_t)*data_buf, (size_t)*data_buf); 662 MmRpc_OFFSET((int32_t)*buf_arry, (int32_t)data_buf), (size_t)*data_buf, (size_t)*data_buf);
662 663 }
663 } 664 }
664 665
665}
666 /* Invoke the Remote function through MmRpc */ 666 /* Invoke the Remote function through MmRpc */
667 coreIdx = getCoreIndexFromCodec(codec_id); 667 coreIdx = getCoreIndexFromCodec(codec_id);
668 _ASSERT(coreIdx != INVALID_CORE, DCE_EINVALID_INPUT); 668 _ASSERT(coreIdx != INVALID_CORE, DCE_EINVALID_INPUT);
669 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet);
670 669
670 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet);
671 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL); 671 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL);
672 672
673#ifdef BUILDOS_ANDROID 673#ifdef BUILDOS_ANDROID
674
675 for( count = 0; count < numInBufs; count++ ) { 674 for( count = 0; count < numInBufs; count++ ) {
676 if( codec_id == OMAP_DCE_VIDDEC3 ) { 675 if( codec_id == OMAP_DCE_VIDDEC3 ) {
677 /* restore the actual buf ptr before returing to the mmf */ 676 /* restore the actual buf ptr before returing to the mmf */
678 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf)); 677 data_buf = (void * *)(&(((XDM2_BufDesc *)inBufs)->descs[count].buf));
679 *data_buf -= inbuf_offset[count]; 678 *data_buf -= inbuf_offset[count];
680 }else if( codec_id == OMAP_DCE_VIDDEC2 ) { 679 } else if( codec_id == OMAP_DCE_VIDDEC2 ) {
681 /* restore the actual buf ptr before returing to the mmf */ 680 /* restore the actual buf ptr before returing to the mmf */
682 data_buf = (void * *)(&(((XDM1_BufDesc *)inBufs)->descs[count].buf)); 681 data_buf = (void * *)(&(((XDM1_BufDesc *)inBufs)->descs[count].buf));
683 *data_buf -= inbuf_offset[count]; 682 *data_buf -= inbuf_offset[count];
684 } 683 }
685 } 684 }
686
687#endif 685#endif
688 686
689 eError = (dce_error_status)(fxnRet); 687 eError = (dce_error_status)(fxnRet);
688
690EXIT: 689EXIT:
691 return (eError); 690 return (eError);
692} 691}
@@ -694,9 +693,9 @@ EXIT:
694/*===============================================================*/ 693/*===============================================================*/
695/** delete : Delete Encode/Decode codec instance. 694/** delete : Delete Encode/Decode codec instance.
696 * 695 *
697 * @ param codec [in] : Codec Handle obtained in create() call. 696 * @ param codec [in] : Codec Handle obtained in create() call.
698 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs. 697 * @ param codec_id [in] : To differentiate between Encoder and Decoder codecs.
699 * @ return : NIL. 698 * @ return : None.
700 */ 699 */
701static void delete(void *codec, dce_codec_type codec_id) 700static void delete(void *codec, dce_codec_type codec_id)
702{ 701{
@@ -713,17 +712,17 @@ static void delete(void *codec, dce_codec_type codec_id)
713 Fill_MmRpc_fxnCtx_Scalar_Params(&(fxnCtx.params[1]), sizeof(int32_t), (int32_t)codec); 712 Fill_MmRpc_fxnCtx_Scalar_Params(&(fxnCtx.params[1]), sizeof(int32_t), (int32_t)codec);
714 713
715 /* Invoke the Remote function through MmRpc */ 714 /* Invoke the Remote function through MmRpc */
716 coreIdx = getCoreIndexFromCodec(codec_id); 715 coreIdx = getCoreIndexFromCodec(codec_id);
717 _ASSERT(coreIdx != INVALID_CORE, DCE_EINVALID_INPUT); 716 _ASSERT(coreIdx != INVALID_CORE, DCE_EINVALID_INPUT);
718 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet);
719 717
718 eError = MmRpc_call(MmRpcHandle[coreIdx], &fxnCtx, &fxnRet);
720 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL); 719 _ASSERT(eError == DCE_EOK, DCE_EIPC_CALL_FAIL);
721 720
722EXIT: 721EXIT:
723 return; 722 return;
724} 723}
725 724
726/*************** Decoder Codec Engine Functions ***********************/ 725/***************** VIDDEC3 Decoder Codec Engine Functions ****************/
727VIDDEC3_Handle VIDDEC3_create(Engine_Handle engine, String name, 726VIDDEC3_Handle VIDDEC3_create(Engine_Handle engine, String name,
728 VIDDEC3_Params *params) 727 VIDDEC3_Params *params)
729{ 728{
@@ -743,9 +742,9 @@ XDAS_Int32 VIDDEC3_control(VIDDEC3_Handle codec, VIDDEC3_Cmd id,
743 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p", 742 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p",
744 codec, id, dynParams, status); 743 codec, id, dynParams, status);
745 if( id == XDM_GETVERSION ) { 744 if( id == XDM_GETVERSION ) {
746 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDDEC3); 745 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDDEC3);
747 } else { 746 } else {
748 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDDEC3); 747 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDDEC3);
749 } 748 }
750 DEBUG("<< ret=%d", ret); 749 DEBUG("<< ret=%d", ret);
751 return (ret); 750 return (ret);
@@ -771,7 +770,7 @@ Void VIDDEC3_delete(VIDDEC3_Handle codec)
771 DEBUG("<<"); 770 DEBUG("<<");
772} 771}
773 772
774/*************** Enocder Codec Engine Functions ***********************/ 773/***************** VIDENC2 Encoder Codec Engine Functions ****************/
775VIDENC2_Handle VIDENC2_create(Engine_Handle engine, String name, 774VIDENC2_Handle VIDENC2_create(Engine_Handle engine, String name,
776 VIDENC2_Params *params) 775 VIDENC2_Params *params)
777{ 776{
@@ -791,10 +790,9 @@ XDAS_Int32 VIDENC2_control(VIDENC2_Handle codec, VIDENC2_Cmd id,
791 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p", 790 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p",
792 codec, id, dynParams, status); 791 codec, id, dynParams, status);
793 if( id == XDM_GETVERSION ) { 792 if( id == XDM_GETVERSION ) {
794 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDENC2); 793 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDENC2);
795 } 794 } else {
796 else { 795 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDENC2);
797 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDENC2);
798 } 796 }
799 DEBUG("<< ret=%d", ret); 797 DEBUG("<< ret=%d", ret);
800 return (ret); 798 return (ret);
@@ -819,7 +817,8 @@ Void VIDENC2_delete(VIDENC2_Handle codec)
819 delete(codec, OMAP_DCE_VIDENC2); 817 delete(codec, OMAP_DCE_VIDENC2);
820 DEBUG("<<"); 818 DEBUG("<<");
821} 819}
822/*************** Decoder Codec Engine Functions ***********************/ 820
821/***************** VIDDEC2 Decoder Codec Engine Functions ****************/
823VIDDEC2_Handle VIDDEC2_create(Engine_Handle engine, String name, 822VIDDEC2_Handle VIDDEC2_create(Engine_Handle engine, String name,
824 VIDDEC2_Params *params) 823 VIDDEC2_Params *params)
825{ 824{
@@ -839,9 +838,9 @@ XDAS_Int32 VIDDEC2_control(VIDDEC2_Handle codec, VIDDEC2_Cmd id,
839 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p", 838 DEBUG(">> codec=%p, id=%d, dynParams=%p, status=%p",
840 codec, id, dynParams, status); 839 codec, id, dynParams, status);
841 if( id == XDM_GETVERSION ) { 840 if( id == XDM_GETVERSION ) {
842 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDDEC2); 841 ret = get_version(codec, dynParams, status, OMAP_DCE_VIDDEC2);
843 } else { 842 } else {
844 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDDEC2); 843 ret = control(codec, id, dynParams, status, OMAP_DCE_VIDDEC2);
845 } 844 }
846 DEBUG("<< ret=%d", ret); 845 DEBUG("<< ret=%d", ret);
847 return (ret); 846 return (ret);
@@ -860,7 +859,6 @@ XDAS_Int32 VIDDEC2_process(VIDDEC2_Handle codec,
860 return (ret); 859 return (ret);
861} 860}
862 861
863
864Void VIDDEC2_delete(VIDDEC2_Handle codec) 862Void VIDDEC2_delete(VIDDEC2_Handle codec)
865{ 863{
866 DEBUG(">> codec=%p", codec); 864 DEBUG(">> codec=%p", codec);