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.

What does VISA_enter do to consume so much DSP load and who do the crop process for DM6467 video encoding?

Hi, all.

I'm running the H264 720P encoder on DM6467, with the codec engine profiling 'CE_DEBUG=1 CE_DSP0TRACE="CV=5;GT_time=2" ' to profile the DSP consumption. But what troubles me is that when encoding with 720P resolution, the time used is as follows:

---------------------------------------------------------------------------------------------------------------------------------

[DSP] @+006,103us: [+5 T:0x8bd98ca4] CV - VISA_enter(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+079,785us: [+5 T:0x8bd98ca4] CV - VISA_exit(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+005,109us: [+5 T:0x8bd98ca4] CV - VISA_enter(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+080,580us: [+5 T:0x8bd98ca4] CV - VISA_exit(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0

----------------------------------------------------------------------------------------------------------------------------------

But when encoding with 720x576 resolution, the time used is as below:

---------------------------------------------------------------------------------------------------------------------------------

[DSP] @+040,425us: [+5 T:0x8bb8be24] CV - VISA_enter(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+036,917us: [+5 T:0x8bb8be24] CV - VISA_exit(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+040,423us: [+5 T:0x8bb8be24] CV - VISA_enter(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0
[DSP] @+036,870us: [+5 T:0x8bb8be24] CV - VISA_exit(visa=0x8fa4cca0): algHandle = 0x8fa4ccd0

---------------------------------------------------------------------------------------------------------------------------------

as far as I know, the time between VISA_enter and VISA_exit is consumed by the videnc_process function, but what about the time between the VISA_exit and VISA_enter. For 720P capture input, when encoding with 720x576, so much time is used between VISA_exit and VISA_enter. I find there's no crop from the input resolution to the encoding resolution at the app arm side, so which processor do this function then? Is there a cropper for the DM6467 capturer just as DM6446?

  • Yes, the time between VISA_enter() and VISA_exit() is roughly the time spent during the codec's process() fxn.  I say "roughly" b/c technically it also includes any time to 'activate' the codec - which may involve saving/restoring the previous codec's context if different codecs are in the system and sharing any resources... but this time is typically very small.

    The time between VISA_exit() and the next VISA_enter() includes the time it takes to return to the ARM-side application (assuming the codec is remote), the time it takes the ARM-side app to prepare the next buffer, invoke the next frame's process() call (from the ARM), queue that job for the DSP and get the DSP to the VISA_enter().  This time between process() calls (or VISA_exit() and the next VISA_enter()) is driven by the ARM-side application.

    There's a code snippet that includes the VISA_enter()/VISA_exit() calls here that may provide a little context:

    http://tiexpressdsp.com/index.php/Codec_Engine_Overhead

    So it's not that the DSP is loaded (or even doing anything at all!), it's just waiting for the next job from the ARM.

    Chris