This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM DSP Parallel processing in DM6467

Hi,

We have written a video processing algorithm in DM6467.We used the SCALE project example under DVSDK to put it under framework .

The algorithm reads a file process it and display it using V4L2.The file read and display is done under ARM and DSP does the alogrithm.It is not very fast as file read,algrotihm processing and display are all sequential. To improve the speed i want the ARM to read the next frame when DSP process the current frame.

 

How can i make this happen.When i call SCALE_process ,ARM waits till DSP retruns from the process call.I read somewhere that there is process_async function which take care of this .Can i use it with SCALE_PROCESS also or does it work only with VIDEC2_PROCESS .

Please provide some inputs on this.

Thanks & Regards,

Manoj

 

  • The SCALE codec class example does not currently support the VISA asynch interface.  All the "standard" VISA classes (those not implemented under an example as SCALE is), such as AUDENC1/VIDENC1/etc., support the asynch mode, but SCALE was left "off the radar".

    You can still achieve asynchronous access by creating a multi-threaded application, whereby the thread calling SCALE_process() will block while waiting for it to return, allowing the app's other thread to read input data simultaneously (or do whatever else).

    Regards,

    - Rob

  • Hi Manoj,

    One thing you can do is to create separate threads on the ARM, one "Loader" thread and one "Processing" thread. The "Loader" thread is in charge of reading the file and queueing up the data for the "Processing" thread e.g. via a fifo. The "Processing" thread can be used to call SCALE_PROCESS. You can also have a separate thread for display to fully decouple the processing from the rest of the system.

    You may want to take a look at the dvsdk decode demo for the DM6467 as an example.  It uses the Loader module in DMAI to read from a file asynchronously in its own "Loader" thread (loader.c), separate from the video processing done in the "Video" thread (video.c).

    Best regards,

    Vincent 

  • Hi,

     

    Thanks for ur replies.

     

    However i am still confused  with the fact that even if i write a mutli-threaded application ,if i cannot have an "async" call,will not ARM wait for DSP to return from SCALE_PROCESS.In that case how can we say that both file read and  SCALE_PROCESS  happen parellely.

     

    Please clarify.

     

    Regards,

    Manoj

  • The thread calling SCALE_process() will get blocked on a semaphore while waiting, allowing other threads and/or processes to execute, including another thread in your multi-threaded processes that reads the file.

    If this doesn't make sense to you then perhaps you're not familiar with multi-threaded apps and should read about multi-threaded programming.

    Regards,

    - Rob