4-77
4.4.2
Initialization API
Initialization API is used to initialize an instance of the algorithm. The initialization parameters are
defined in the
IVIDENC2_Params
structure (see section 4.2 for details).
║
Name
algInit()
– initialize an algorithm instance
║
Synopsis
XDAS_Int32 algInit(IALG_Handle handle, IALG_MemRec
memTab[], IALG_Handle parent, IALG_Params *params);
║
Arguments
IALG_Handle handle; /* algorithm instance handle*/
IALG_memRec memTab[]; /* array of allocated buffers */
IALG_Handle parent; /* handle to the parent instance */
IALG_Params *params; /*algorithm init parameters */
║
Return Value
IALG_EOK; /* status indicating success */
IALG_EFAIL; /* status indicating failure */
║
Description
algInit()
performs all initialization necessary to complete the run time creation of an algorithm
instance object. After a successful return
from
algInit(), the instance object is ready to be used to
process data.
The first argument to
algInit()
is a handle to an algorithm instance. This value is initialized to the
base field of
memTab[0].
The second argument is a table of memory records that describe the base address, size, alignment,
type, and memory space of all buffers allocated for an algorithm instance. The number of initialized
records is identical to the number returned by a prior call to
algAlloc().
The third argument is a handle to the parent instance object. If there is no parent object, this
parameter must be set to
NULL.
The last argument is a pointer to a structure that defines the algorithm initialization parameters.
For more details, see
TMS320 DSP Algorithm Standard API Reference
(literature number
SPRU360).