2024 views|1 replies

2

Posts

0

Resources
The OP
 

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.

  1. 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.

  1. 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?

  1. 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,

};

This post is from DSP and ARM Processors
 

2

Posts

0

Resources
2
 

However, I will explain my current understanding, I don't know if it is correct...
The third paragraph is actually the definition of the VIDDEC_COPY module, which is defined by the standard module ti.sdo.ce.video.IVIDDEC provided by TI. The content in the brackets of the third paragraph specifies the function set variable name corresponding to VIDDEC_COPY in the code, and the process function corresponding to the function set variable is VIDDECCOPY_TI_process

Then the first useModule is the use of the VIDDEC_COPY module generated by codecs, which is equivalent to declaring that both server and app should use VIDDEC_COPY in codecs, thus linking server/app with codecs.

I don't understand the main function of the servers in the second paragraph. There is no specific description of the main function in the information I found. Although it seems that the main function is just an initialization function plus some tracking functions. But does it mean that the dsp end only needs to do initialization and tracking during the code running? Then doesn't the program stop after the main function exits? So I still don't understand this.

This post is from DSP and ARM Processors
 
 

Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list