![Texas Instruments DM365 Скачать руководство пользователя страница 41](http://html.mh-extra.com/html/texas-instruments/dm365/dm365_user-manual_1094517041.webp)
Sample Usage
3-7
3.2.2 Handshaking Between Application and Algorithms
Application provides the algorithm with its implementation of functions for
the video task to move to SEM-pend state, when the execution happens in
the co-processor. The algorithm calls these application functions to move
the video task to SEM-pend state.
Figure 3-4. Interaction Between Application and Codec.
Note:
Process call architecture shares Host resource among multiple
threads.
ISR ownership is with the FC resource manager – outside the
codec.
Codec implementation is OS independent.
The functions to be implemented by the application are:
1)
HDVICPSYNC_start(IALG_Handle handle,
HDVICPSYNC_InterruptType intType, IRES_HDVICP_Handle
hdvicpHandle)
This function is called by the algorithm to register the interrupt with the
OS. This function also configures the Framework Component interrupt
synchronization routine.
2)
HDVICPSYNC_wait (IRES_HDVICP_Handle hdvicpHandle)
This function is a FC call back function use to pend on a semaphore.
Whenever the codec has completed the work on Host processor (after
transfer of frame level encode/decode to HDVICP) and needs to relive
the CPU for other tasks, it calls this function.
Framework Provided
HDVICP Callback APIs
_process()
Application Side
Codec
#include <…/ires_hdvicp.h>
void _MyCodecISRFunction();
MYCODEC::IVIDENC1::process() {
:
…. set up for frame encoder
HDVICPSYNC_start(
handle,
HDVICPSYNC_FIQ,
handle
->
hdvicpResourceHandles[0])
HDVICPSYNC_wait
(((H264VENC_TI_Obj
*)handle)
->
hdvicpResourceHandles[0]);
/* Wait until HDVICP set interrupt */
// Release of HOST
…. End of frame processing
}
void H264VENC_TI_isrfunction
(IALG_Handle handle)
{ H264venc_TII_Obj *h264venc = (void
*)handle;
int _doneSemaphore;
HDVICP_configure(handle,
hdVicpHandle, ISRFunction){
installNonBiosISR(handle,
hdvicpHandle, ISRFunction);
}
VICP_register();
VICP_done();
VICP_unregister();
Содержание DM365
Страница 10: ...x This page is intentionally left blank ...
Страница 12: ...xii This page is intentionally left blank ...
Страница 24: ...Introduction 1 12 This page is intentionally left blank ...
Страница 34: ...Installation Overview 2 10 This page is intentionally left blank ...
Страница 116: ...API Reference 4 70 This page is intentionally left blank ...
Страница 120: ...Error Description B 2 This page is intentionally left blank ...
Страница 124: ...ARM926 TCM Buffer Usage By Codec D 2 This page is intentionally left blank ...
Страница 126: ...Simple Two pass Encoding Sample Usage E 2 Case 1 Case 2 Case 3 Case 4 Frame Skip ...
Страница 130: ...Simple Two pass Encoding Sample Usage E 6 This page is intentionally left blank ...