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.

Querry on System_putLinksEmptyFrames()



Hi All,

SW: IPNC_RDK_V3.2

Reffering to mcfw user guide System_putLinksEmptyFrames() function used to put the  back the used buffers to PrevLink.

Please readout below scenario:

  •  First notification, I receive 2 buffers/frames & I hold both and Process.
  • Second notification, I receive 1 buffer, I hold It, Process and after Processing I want to release previously received and processed buffers. i.e. first 2 buffers.
    SO I cal, System_putLinksEmptyFrames() by updating pObj->inFrameList.numFrames=2. Now I am releasing old 2 frame or New frame also released?

       

  • Ravi,

    Your question is not clear in 2nd bullet? Could you clarify a bit?

  • Hi Rajesh,

    Here I am trying to simplify my query.

    • I am receiving the buffers from PrvLink(Camera) using: System_getLinksFullFrames(pInQueParams->prevLinkId,pInQueParams->prevLinkQueId, &frameList);
      Assume I received 2 filled buffers.(i.e. frameList.numFrames=2)
    • Now I Process those buffers using my Algorithm.
    • Ideally  I need return those buffers back to previous Link using:  System_putLinksEmptyFrames(pInQueParams->prevLinkId,pInQueParams->prevLinkQueId, &frameList); 
      But, I want to retain those buffers. So I will just return from My process frame WITHOUT CALLING System_putLinksEmptyFrames(pInQueParams->prevLinkId,pInQueParams->prevLinkQueId, &frameList); 

      In that case, my next interrupt start writing to some buffers. But, As per my observation even though I hold the buffers, interrupt start writing to the same address as before !!
      Why?
  • Just to cross check, I hope you are storing framelist across different process call. As you want to release 2 buffers later then you need to store frameList somewhere and release in the next process call.

    Now, let me restate your problem for better understanding. In your case even if you dont release the 2 buffers and stores them in your current link then also previous link starts using them. Am I correct here?

    If yes, then could you tell us how are you creating that queue in previous link.  Queue access should be blocked until it does not have empty buffers.  what is the depth of the queue you are keeping?

  • Hi Ritesh Rajore,

    My previous Link is "Camera Link"  (Implemented by TI) with 8 buffers in queue.

    "Now, let me restate your problem for better understanding. In your case even if you dont release the 2 buffers and stores them in your current link then also previous link starts using them. Am I correct here?"

    Yes, looks like. But I am not sure that, whether previous Link has re-used it, or  it informs next Link that data available in all those buffers, Since I havn't released it.

  • Hi Ravikiran,

    If you don't give back empty buffers to camera link then the resizers will continue to write into the buffer whose address is programmed into its registers.

    Resizer buffers are switched only when empty buffers are provided by camera link.

    regards,

    Anand