What is the function of useModule in the Da Vinci routine video_copy?
[Copy link]
When developing the video_copy routine provided by TI , I did not quite understand the functions or principles of some codes in the routine. I had the following three questions.
- Video_copy is divided into three parts: codecs, app, and servers. The cfg configuration files in apps and servers have the following content
varVIDDEC_COPY=
xdc.useModule('ti.sdo.ce.examples.codecs.viddec_copy.VIDDEC_COPY');
varVIDENC_COPY=
xdc.useModule('ti.sdo.ce.examples.codecs.videnc_copy.VIDENC_COPY');
It seems to be closely related to the specific algorithm called later, so I would like to ask what role the useModule function itself plays? And what is the content of the generated VIDDEC_COPY variable, or what role it plays in the subsequent algorithm call.
- The content of the main.c file on the servers side is as follows:
Voidmain(Intargc,Char*argv[])
{
/*initCodecEngine*/
CERuntime_init();
/*inittrace*/
GT_init();
/*createamasktoallowatrace-printwelcomemessagebelow*/
GT_create(>Mask,"servers.video_copy.evmDM6446");
/*...andinitializeallmasksinthismoduleto"on"*/
GT_set("servers.video_copy.evmDM6446=01234567");
GT_0trace(gtMask,GT_4CLASS,"main>WelcometoDSPserver'smain().\n");
}
It seems to be some functions related to tracking and printing information, so I don't quite understand what role the main function plays? Where is the server itself started?
- The codecs side has a function called VIDDECCOPY_TI_ process
It should be the process function on the ARM side . How does the process on the DSP side correspond to the function on the ARM side during this calling process ? I saw the following code that may be related, but I don't know the specific principle, so I would like to ask for your advice.
metaonly module VIDDEC_COPY inherits ti.sdo.ce.video.IVIDDEC
{
/*!
* ======== ialgFxns ========
* name of this algorithm's xDAIS alg fxn table
*/
override readonly config String ialgFxns = "VIDDECCOPY_TI_VIDDECCOPY";
}
IVIDDEC_FxnsVIDDECCOPY_TI_VIDDECCOPY={/*module_vendor_interface*/
{IALGFXNS},
VIDDECCOPY_TI_process,
VIDDECCOPY_TI_control,
};
|