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.

DSP Alg as part of the link chain

We would like to use the DSP to modify the input video buffer, and afterwards display and encoded the modified video.

The DspAlg is configured as a process link, where it gets frames queue in but does not queue out frames.

The problem with this configuration is we suspect the following links on the chain are not synchronized with the DspAlg process. After the dsp there are dup links and possibly the dup links are copying the memory before the dsp has had a chance to modify the content.


Is it possible to create a frame out queue attached to the DspAlg link? (to use the dsp link not from the process link of ipcframesout but from the out link of ipcframes out?)


Or should I solve this issue by adding messages and signaling the following link that it can continue?

thanks!

  • The nextLink after ipcFramesOutLink will NOT receive the frame until processLink has returned the buffer. ProcessLink will return the buffer only after algLink has completed processing the frame.The problem you are seeing is not due to use of processLink and adding output frame queue to algLink will not resolve the issue. What is the actual issue you are seeing ?

  • Hi Badri,

    We see in the file ipcFramesOutLink_tsk.c in function

    Void IpcFramesOutLink_tskMain(struct Utils_TskHndl * pTsk, Utils_MsgHndl * pMsg)

    in

                case SYSTEM_CMD_NEW_DATA:
                    Utils_tskAckOrFreeMsg(pMsg, status);

                    IpcFramesOutLink_processFrameBufs(pObj);
                    IpcFramesOutLink_releaseFrameBufs(pObj);
                    break;

    and inside IpcFramesOutLink_processFrameBufs()

            if (pObj->createArgs.baseCreateParams.processLink != SYSTEM_LINK_ID_INVALID)
            {
                if (pObj->createArgs.baseCreateParams.notifyProcessLink)
                {
                    System_ipcSendNotify(pObj->createArgs.baseCreateParams.processLink);
                }
            }
            else
            {
                for (queId = 0; queId < pObj->createArgs.baseCreateParams.numOutQue; queId++)
                {
                    if ((pObj->createArgs.baseCreateParams.notifyNextLink) && (sendMsgToTsk & 0x1))
                    {
                        System_ipcSendNotify(pObj->createArgs.baseCreateParams.outQueParams[queId].
                            nextLink);
                    }
                    sendMsgToTsk >>= 1;
                    if (sendMsgToTsk == 0)
                        break;
                }
            }

     

     

    If I understand correctly, the process link gets notified and not the out link, however immediately after this notification the buffers get released  by   IpcFramesOutLink_releaseFrameBufs

     

    We are trying to copy parts of images between channels, we see that when we copy parts of the image to a temp buffer, and then copy the buffer onto an image from another channel, that it only works some of the time resulting in a flashing kind of image in the output video. However when we stop with a breakpoint using the JTAG it always works, so we think this is a timing or some other kind of memory issue where we are not writing to the correct memory corresponding to the video of the channel because it  has already been released and reassigned.

  • IpcLinks are connected to exchange frames across cores using ListMP. ListMp is a multi core linked list

    Below is the sequence of steps that take place to exchange frames between ipcFrames links

    IpcFramesOut

        Put  frame pointer into tail of  ListMPOut

    ipcFramesIn

        Get frame pointer from head of ListMPOut

        Forward the frame pointer to nextLink

        When nextLink frees the frame put frame pointer into tail of ListMPIn

    ipcFramesOut

        Get freed frames from head of ListMPIn

        Forward the freed frame to nextLink.

     

    As you can see releaseFrameBufs will get freed frames from ListMPIn and then forward it.There is no chance of ipcFrames forwarding a frame that is not processed by processLink.