![background image](http://html.mh-extra.com/html/texas-instruments/dm365/dm365_user-manual_1094517039.webp)
Sample Usage
3-5
Note:
The process call returns control to the application after the initial
setup related tasks are completed.
Application can schedule a different task to use the Host resource
released free.
All service requests from HDVICP are handled through interrupts.
Application resumes the suspended process call after handling the
last service request for HDVICP.
Application can now complete concluding portions of the process
call.
The
control()
and
process()
functions should be called only within
the scope of the
algActivate()
and
algDeactivate()
XDAIS
functions. The
algActivate()
and
algDeactivate()
XDAIS functions
activate and deactivate the algorithm instance respectively. Once the
algorithm is activated, the
control()
and
process()
functions can be of
any order. The following APIs are called in a sequence:
1)
control()
(optional) - To query the algorithm on status or setting of
dynamic parameters and so on, using the seven available control
commands.
2)
process()
- To call the Encoder with appropriate input/output buffer
and arguments information.
3)
control()
(optional) - To query the algorithm on status or setting of
dynamic parameters and so on, using the seven available control
commands.
4)
algDeactivate()
- To deactivate the algorithm instance.
The for loop encapsulates frame level
process()
call and updates the
input buffer and the output buffer pointer every time before the next call.
The for loop runs for the designated number of frames and breaks-off
whenever an error condition occurs.
In the sample test application, after calling
algDeactivate()
, the output
data is either dumped to a file or compared with a reference file.
3.1.4 Algorithm Instance Deletion
Once decoding/encoding is complete, the test application deletes the
current algorithm instance The following APIs are called in a sequence:
1)
algNumAlloc()
- To query the algorithm about the number of
memory records it used.
2)
algFree()
- To query the algorithm to get the memory record
information, which can be used by the application for freeing them up.
A sample implementation of the delete function that calls
algNumAlloc()
and
algFree()
in sequence is provided in the
aLG_delete()
function
implemented in the alg_create.c file.
Summary of Contents for DM365
Page 10: ...x This page is intentionally left blank ...
Page 12: ...xii This page is intentionally left blank ...
Page 24: ...Introduction 1 12 This page is intentionally left blank ...
Page 34: ...Installation Overview 2 10 This page is intentionally left blank ...
Page 116: ...API Reference 4 70 This page is intentionally left blank ...
Page 120: ...Error Description B 2 This page is intentionally left blank ...
Page 124: ...ARM926 TCM Buffer Usage By Codec D 2 This page is intentionally left blank ...
Page 126: ...Simple Two pass Encoding Sample Usage E 2 Case 1 Case 2 Case 3 Case 4 Frame Skip ...
Page 130: ...Simple Two pass Encoding Sample Usage E 6 This page is intentionally left blank ...