1 / 18

Overview - PowerPoint PPT Presentation

  • Uploaded on

Overview. General View of DAVINCI development Developing non-XDM algorithms. What is DAVINCI. Typical application runtime. The development procedure. Developing non-XDM algorithms. Application range. Development overview.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Overview' - nasia

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  • General View of DAVINCI development

  • Developing non-XDM algorithms

Development overview
Development overview

  • Codec Engine provides an easy-to-use application interface-VISA-for multi-media developers to integrate and deploy compliant codecs. CE uses the codec’s xDM interface to call specific processing and control functions.

  • Developing non-XDM is extend CE by adding new VISA-like APIs for remotely accessing xDAIS algorithms that do not implement the xDM interface.

1.The GPP-side ap-plication makes an algorithm MOD_pro-cess() call.

2.CE forwards this call and its argume-nts to the GPP-side algorithm stub.

3.The stub places the arguments in an inter-CPU message and replaces all GPP-side (virtual address) pointer values with DSP-side (physical address) values. This called “marshalling” the arguments.

4.CE delivers the message to the DSP-side algorithm skeleton.

5.The skeleton unmarshals the arguments and calls the actual xDAIS algo-rithm’s process() function.

6.On the way back, the skeleton marshals any return arguments, places th-em in a message, and the stub unmarshals them for the application.

Tasks MOD_pro-cess() call.

(The core xDAIS algorithm interface is alre-ady there.)

  • Create CE extension layer.

    • Custom stub interface

    • Custom skeleton interface

  • Perform CE packaging and configuration (Codec Server & Codec Engine engineers’ job)

Create ce extension layer
Create CE extension layer MOD_pro-cess() call.

  • Design a new application interface, including the following core functions: ROTATE_create(), ROTATE_delete(), ROTATE_process()

ROTATE_Handle MOD_pro-cess() call.ROTATE_create(Engine_Handle server, String name,

ROTATE_Params *params)


ROTATE_Handle visa;

static Bool curInit = FALSE;

if (params == NULL) {

params = &ROTATE_PARAMS;


visa = VISA_create(server, name, (IALG_Params *)params,

sizeof (_ROTATE_Msg), "ti.sdo.apps.extensions.rotate.IROTATE");

return (visa);


Void MOD_pro-cess() call.ROTATE_delete(ROTATE_Handle handle)




XDAS_Int32 MOD_pro-cess() call.ROTATE_process(ROTATE_Handle handle, char inBuf[], char outBuf[],

XDAS_Int32 bufSize, XDAS_Int16 cosine, XDAS_Int16 sine)


Int32 retVal = ROTATE_EFAIL;

ROTATE_InArgs inArgs;

inArgs.bufSize = bufSize;

inArgs.cosine = cosine;

inArgs.sine = sine;

if (handle) {

IROTATE_ADAPT_Fxns *fxns =

(IROTATE_ADAPT_Fxns *)VISA_getAlgFxns((VISA_Handle)handle);

IROTATE_Handle alg = VISA_getAlgHandle((VISA_Handle)handle);

if (fxns && (alg != NULL)) {


retVal = fxns->process(alg, (XDAS_Int8 *)inBuf,

(XDAS_Int8 *)outBuf, &inArgs);

VISA_exit((VISA_Handle)handle); } }

return (retVal);


Create ce extension layer1
Create CE extension layer MOD_pro-cess() call.

  • Develop CE stubs

    • Define a new VISA “message” type used for marshalling and unmarshalling call

    • Marshal the call and its arguments using the VISA “message”

    • Dispatch the call to the server

    • Unmarshal the returned arguments

    • Free any required VISA message

    • Return the results of remote computation

/* ======== rotate_stubs.c ========*/ MOD_pro-cess() call.

_ROTATE_Msg *msg;

if ((msg = (ROTATE_Msg *)VISA_allocMsg(visa)) == NULL)

{ return (ROTATE_ERUNTIME); } //Create the “message”

msg->visa.cmd = _ROTATE_CPROCESS;//Set the command ID

msg->cmd.process.inBuf = (XDAS_Int8 *)

Memory_getBufferPhysicalAddress(inBuf, inArgs->bufSize, NULL);

if (msg->cmd.process.inBuf == NULL) {


}//Marshalling:Translate the address references to server’s address space

msg->cmd.process.outBuf = (XDAS_Int8 *)

Memory_getBufferVirtualAddress(outBuf, inArgs->bufSize, NULL);

if (msg->cmd.process.outBuf == NULL) {



msg->cmd.process.inArgs = *inArgs;

retVal = VISA_call(visa, (VISA_Msg *)&msg);


VISA_freeMsg(visa, (VISA_Msg)msg);

return (retVal);//return the rusults of remote computation

Create ce extension layer2
Create CE extension layer MOD_pro-cess() call.

  • Develop skeletons for CE extension

    • Select the dispatch function by parsing the command ID in the message

    • Unmarshalling “processing” function arguments

    • Call the core xDAIS algorithm interface function

    • Marshal return arguments into the reply message

    • Send the reply message back to the caller

/* ======== rotate_skel.c ========*/ MOD_pro-cess() call.

static VISA_Status call(VISA_Handle visaHandle, VISA_Msg visaMsg) {

_ROTATE_Msg *msg = (_ROTATE_Msg *)visaMsg;

ROTATE_Handle handle = (ROTATE_Handle)visaHandle;

switch (msg->visa.cmd) {


inBuf = msg->cmd.process.inBuf;

outBuf = msg->cmd.process.outBuf;

Memory_cacheInv(inBuf, msg->cmd.process.inArgs.bufSize);

/* make the process call */

msg->visa.status = ROTATE_process(handle, (char *)inBuf,

(char *)outBuf, msg->cmd.process.inArgs.bufSize,

msg->cmd.process.inArgs.cosine, msg->cmd.process.inArgs.sine);

Memory_cacheWbInv(outBuf, msg->cmd.process.inArgs.bufSize);

break; }

default: {

msg->visa.status = VISA_EFAIL;

break; } }

return (VISA_EOK);


Packaging the extension
Packaging the extension MOD_pro-cess() call.

Compile the packaging file: package.xdc, package.xs, package.bld, IROTATE.xdc, makefile

Build the extension package

Advice MOD_pro-cess() call.

and Criticism

are warmly welcomed!