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.

Is it possible to call processAsync from an algorithm that is considered local?

Is it possible to call processAsync from an algorithm that is considered local? The algorithm would run in the co-processor of DM365, the algorithm is h264enc. In the API of CE 2.26.02.11 the  processAsync function is set to work with platforms that have a DSP (which process the algorithm). Is there a way of executing this async call from the co-processor?

As I mentioned, I am working with a DM365 Leopard board.

I would appreciate if you could provide me a hint on how to do this, or maybe you could point me out to someone inside TI that can help me.

Luis Fernando Arce
RidgeRun Engineering.

  • Nope.  When the codec is 'local' the threading decisions are yours - the process() call is "just a function call" into the codec.

    The main thread could spawn an encoder worker thread (at whatever priority is right for you) that calls process() then posts a semaphore to the main thread when the process() call completes.  In that way, the main thread can work while the encoder worker thread is busy calling process() - perhaps waiting for the hardware assist to complete the encode.

    CE doesn't impose (or provide) any scheduling assist for local codecs.

    Chris

  • Thanks a lot Chris!

    I could encode asynchronously using this two functions:

    • pthread_create: for create and init the thread.
    • pthread_join: for wait the return of the previos pthread_create call.

    I thinks that pthread_create behaves like process call and pthread_join like wait call.

    Luis Fernando Arce
    RidgeRun Engineering